Default startup code in Espruino binary #7220
Replies: 1 comment
-
Posted at 2018-03-20 by @gfwilliams Hi - I'm not sure which board you're using, but you could possibly use If you're building yourself why not just add ... to add your own code you'd be better off adding your own library - for example the Wio LTE executes JS this way: https://github.com/espruino/Espruino/blob/master/libs/wio_lte/jswrap_wio_lte.c#L150 Posted at 2018-03-20 by TomasJ Hi Gordon,
I can't set it because when I unplug the USB, the console will switch and in an application which uses Bluetooth or wifi module the transported data will be evaluated by Espruino and not by application. Right? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-03-20 by TomasJ
Hi, I use Espruino to teach children programming and robotics and recently I got an idea that it would be cool to program boards over Bluetooth or wifi. So I purchased HC-06 Bluetooth module and tested it. It is working fluently and without any issues but I want to be able to program over USB too. To solve this I created simple startup code to switch default console to Serial6 when a specific button is pressed. The boot code is as follows:
Unfortunately, I can't set the Serial6 default while compiling because it can be used for programming or for data transfer to the loaded application.
I also sometimes have to repair the boards by reflashing them. Therefore the boot code is lost and must be written again.
My question is if it is possible to create boot code, which will be included in the binary itself? I dig in the code and I found symbols which are used for storing the boot code in memory, but I do not know, how to add my code to it.
If anyone could give me some advice, I will be glad.
Best regards,
Tomas
Beta Was this translation helpful? Give feedback.
All reactions