This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flashing bootloader and application via J-Link

Hello. I want to make flashing of devices for production faster. So I want to write application together with bootloader via J-Link simultaneously and not via OTA DFU. I'm using S110 v6 and dual bank BLE DFU from SDK 5.1 example. I know that after flashing bootloader and application I just need to compute CRC16 of the DFU bank 0 and write this value to the bootloader settings in the flash, but maybe someone already has a solution to this problem?

  • Sorry! That change is actually there... Git didn't export the latest code base. bl2.zip

  • Something is strange... I'm using gcc and it seems that it's something with Keil's linker because I have hex like this: /attachment/50b3f5b9a4a01250aa03a626a7216643 And your hex is like this: /attachment/c589a5a67c914868bfc69e9342fd0208 As you can see in bootloader settings address (0x3FC00) I have 0x01 in the beginning and all other data is 0: :020000023000CC ... :10FC000001000000000000000000000000000000F3 But in your hex file you have some garbage in bootloader settings address - 02FF0101FF01FF01FF810000: :020000040003F7 :0CFC000002FF0101FF01FF01FF81000075 I don't know why it is so, I'll try to look more into it.

  • Oh, okay, I suddenly made it work. Just add -O3 optimization.

  • You're right! -O3 solves the issue. The reason I had it on -O0 was because -O3 was making some of my I2C code behave strangely... I guess I need to solve that now! Thank you so much for your help! :)

  • It's strange that more optimization solves the issue... I wonder which parts of the code actually requires the optimization (note: -O2 does not work either)... I've tried setting -O0 on various individual source files to get my I2C code working but to no avail - Any ideas?

Related