Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I implemented once an Espruino target for webpack to enable a git workflow, npm packages, and transpile modern JS features to ES5, as supported by Espruino (targeting an esp8266 specifically).

Boy oh boy I did not expect to run into memory issues so quickly. Including async/await increases the size of the build so much the esp just dies.

But most npm packages worked just fine, including lodash ( a life saver), as long as you’re willing to work with the super tiny memory budget and the difficulty to detect memory leaks.

Using an esp32 with 8mb of PSRAM yielded much better results.

Good times.



Well it's designed to run on NRF processors with just 64KB of RAM and as little as 128KB of flash, which last a week on one CR2032 battery.

You might have been over doing it! /s

I regularly develop intensive apps in Espruino for the ESP32 (I mentioned in another thread how I pull in exchange data directly using HTTPS, and process it on the TTGO Watch 2020), but it's all hand crafted code. Maybe you should consider a small Friendly Elec board and node...

...and yes PSRAM is super awesome! :)


> You might have been over doing it! /s

You’re completely right! Fed up with Arduino C, I tried to bring the entirety of the web toolchain and related dev patterns to the embedded world. :’)

What you’re doing sounds super cool! Is it just as a hobby or your day job as well?

Do you have any tips on debugging long running memory leaks? (basically the board crashes after a few days running continuously, which were my specs)

Nowadays I’m back to Arduino C and the M5Stack/M5Paper boards, it’s a bunch of fun when I find time for it!


> What you’re doing sounds super cool! Is it just as a hobby or your day job as well?

It's kind of a serious hobby. I enjoy it.

In Espruino the memory leaks are always almost the variables. So you can do say process.memory() to see if indeed your memory is decreasing, and if it is, then you can E.getSizeOf(global) to see which variable it might be. It's still javascript at the end so, standard techniques apply.

Yeah I like the M5Stack boards, they're quite interesting. I use the their StickC. The orange one. It does take time for sure!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: