Can I add a js into firmware as a init.js? #691
Replies: 6 comments
-
Posted at 2017-02-17 by Wilberforce This is what On the right hand side of the ide, upload you code. Test it is working as intended. Then on the left hand side of the ide, type This code you had uploaded is then saved into flash memory. On restart, the code will be loaded and run. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-17 by Aifer Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-17 by Aifer We can reference to the architecture of Mongoose OS's firmware and the conception of init.js. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-17 by Wilberforce Which board are you using? The code save area does not get overwritten when you flash the firmware, so the previous saved code would still be intact. Sorry, I'm not familiar with the Mongoose OS's init.js |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-18 by @gfwilliams It sounds like he's using ESP8266? You can use An easier way would be to add some C code yourself that calls |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-18 by Aifer Thanks. I use ESP32 and ESP8266. That is a good idea about jswrap_flash.c, jspEvaluate("your_code"). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-02-17 by Aifer
Can I add a js into firmware as a init.js?
I mean that when I build a firmware, I can add a js file into the firmware, and when the Espruino starts,
the js file can be auto loaded( I call it init.js :-) )
Beta Was this translation helpful? Give feedback.
All reactions