This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

flash app compiled with gcc using DFU with bootloader compiled with keil

I compiled the bootloader and my app with keil arm and I can perform app flashing using DFU, then I compiled the app using gcc, then I can no longer flash using DFU.

is there any issue with flashing an app compiled using gcc with a bootloader compiled with keil arm ?

Parents
  • Flashing bootloader and application, one with GCC and one with Keil is not safe since the two compilers places the stack at different locations in RAM (GCC at the top of the RAM and Keil above the heap).

    The reason it does not work in this case is probably because bond sharing is stored at the top of the RAM if it is 16KB (more specific at address 0x20003F80), which is the same place as GCC places the stack. If this information is corrupted when the starting the DFU, the device will not connect automatically to the master and start the firmware transfer.

    Bottom line: Do not flash the bootloader and application with different compilers.

Reply
  • Flashing bootloader and application, one with GCC and one with Keil is not safe since the two compilers places the stack at different locations in RAM (GCC at the top of the RAM and Keil above the heap).

    The reason it does not work in this case is probably because bond sharing is stored at the top of the RAM if it is 16KB (more specific at address 0x20003F80), which is the same place as GCC places the stack. If this information is corrupted when the starting the DFU, the device will not connect automatically to the master and start the firmware transfer.

    Bottom line: Do not flash the bootloader and application with different compilers.

Children
No Data
Related