Compile Espruino bootloader with specific start address

Posted on
  • I want to compile Espruino bootloader but with a specific bootloader start address.
    Default Espruino bootloader starts at 0x78000 and BangleJs at 0x7a000.

    As I know that there are no MAKE parameter is available to do, so I have to change the start address somewhere in the source (linker file???)...

    Can some one give how to do it?

    Actually I want to compile Espruino bootloader with starting address say 0x7a000 or 0x79000.


  • Best to look at Bangle.js as I believe that starts the bootloader at 0x7a000. I'm pretty sure you just need a modified linker file.

    However the bootloader is more or less Nordic's own one (just with some LCD handling added) - you should be able to find a bunch of info on Nordic's site and forums.

  • Great!! I will have a look.. @Gordon Another thing that I am planning to buy MDBT42Q­eakout

    How I interface it to laptop/computer for stuff like flashing? I have a StLink V2 clone SWD and sole FTDI/TTL breakout. Will this work?

    Also it does not have pins soldered, is it possible if I order one you can send(shipping UK) a pre soldered?

  • You'd just flash the JS (or firmware updates) via Bluetooth as you would with Bangle.js or Puck.js... or you can wire up the USB-TTL and write JS that way if you want.

    Personally I'd advise against using SWD to flash firmware unless you're developing Espruino interpreter firmware. The SWD pins aren't on 0.1" pin strip so it's a bit of a faff getting connected.

    I haven't been offering pin header soldering since it can end up being a bit of a faff, but I'll ask Christine how much extra she'd want to solder pins on - I could add it as an option in the shop when you go to purchase.

  • I just wanted to use this module to play and test Softdevice and bootloader updates. Like changing the bootloader address, and upload different supported SDK/softdevices targeted to nrf52832 chip

  • Ahh, ok - so in that case you'd need to use SWD which is via two pads on the rear of the breakout board. I've never tried it with StLink V2 but I think OpenOCD should handle it.

    Honestly if you're doing that I'd strongly suggest the Nordic nRF52832DK though

  • There's also the jlink edu mini which is around $20 from digikey­n/segger-microcontroller-systems/8-08-91­-J-LINK-EDU-MINI/899-1061-ND/7387472 but then again the nrf52832 DK is just $40 which gives you a chip, as well as a jlink you can use to program other chips.

    Too bad Nordic stopped supporting the nrf52832 DK though :( So maybe the jlink edu mini would be your best bet? I used to flash with my stlink and openocd as well, but I was amazed at how much faster the segger stuff is when I got them.

  • @Gordon so what will be the Make file command to create DFU package

    bootloader hex
    bootloader + softdevice hex

    When I use this command
    make clean &&
    VERBOSE=1 make

    and in BOARD.PY I have set
    'bootloader' : 1,

    It generates the DFU package just having Espruino application hex. The hex works perfect with a device which already have a valid bootloader installed.

  • thanks parasquid, nice but it has too much of soldering/pcb job that i ant to avoid atm

  • All I do for builds is:


    NRF_SDK11=1 should really be in the (See, and I think you should leave USE_BOOTLADER=1 out - that could be it?

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

Compile Espruino bootloader with specific start address

Posted by Avatar for Abhigkar @Abhigkar