Build Espruino with user code

Posted on
  • Hey guys,
    I have recently started using Espruino for some projects, and thus far it has been quite enjoyable.

    My issue that is arising is when I am moving into production. It is quite tedious to flash espruino via jtag, then connect to espruino ide to save my code to the device.

    Is there a way to compile a custom binary of espruino with my code so I can flash the device with jtag and be done with it??

    Cheers Chris.

  • Yes, there is - use the Espruino command-line tools (https://www.npmjs.com/package/espruino) with the --ohex option - there are some docs for it on that page.

    It depends a little on the MCU you're using, but if you're using nRF52 like most people seem to then you can just use normal tools used to merge the softdevice to merge the generated hex file.

    Or... You can just set one device up how you like it, read back the contents of flash into a file, and write that file to everything.

  • Thank you Gordon.

    I will take a look at the npm repo.

    Heck I wish I knew the last part last year. We deployed 25 or so Pucks, never occurred to me to just read back the flash... Used to lock bits back in my AVR days, where that was near impossible.

    Thank you. Now on to the next task of getting this RAK8212 to function properly. Wanted to make sure I could be production ready before ending knee deep in trying to program 1000's of these. Cheers.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Build Espruino with user code

Posted by Avatar for user97978 @user97978

Actions