How to merge application code compiled by Arduino toolchain and bootloader code into single hex file


#1

We are currently using Arduino tool chain for developing redbear BLE nano board (V1.5, 32KB RAM). The recommended DAPLink is used for programming and flashing the chip.

Currently, we can successfully flash the chip by:

  • dragging bootloader code into file system created by DAPLink programmer;
  • dragging exported compiled binary code from provided Arduino tool-chain into file system created by DAPLink programmer;

However we can’t flash the chip by putting a merged bootloader and application code into file system created by DAPLink… The issue is that the chip cannot jump from bootloader to application code. Can anyone suggest some solutions?


#2

Nordic has a tool called mergehex in the command line tools:
https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52-DK#Downloads