Hex files generated by Fixed Stack OTA Bootloader

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
EyGe_3183606
Level 4
Level 4
25 replies posted 10 sign-ins 10 replies posted

Hello,

We have implemented the Fixed Stack OTA Bootloader example and also made several changes to meet our requirements and it runs successfully.

We see that the PSOC Creator IDE generates two hex files - one for each project (bootloader and bootloadable).

We are able to load the bootloader hex via the serial programmer and then using the BLE dongle, load the bootloadable cyacd file using OTA. It all works fine.

The "problem" is that we see that if we erase the flash of the device, and then just load the bootloadble hex via the serial programmer then both the bootloader AND the bootloadable applications run on the device! So we don't understand what's going on and how is this working? We thought that the hex generated when compiling the bootloadable project holds ONLY the bootloadable project and not both the bootloader and the bootloadable. Also, if the hex holds both the projects then how were we able to successfully load the bootloadable project via FOTA?

Thanks a lot.

Regards,

David

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

OTA bootloading uses the .cyacd file which contains code and data for just the bootloadable project, without the associated bootloader. It is intended to be used by a bootloader host program, and downloaded to a target PSoC that has the associated bootloader project already installed.

Bootloadable .hex files are different in that they contain code and data bytes for the bootloadable and the associated bootloader project. Bootloadable gets the bootloader project's hex file from dependency selected in bootloadable componenent configurarion wondow. Once you program the bootloadable.hex file; both projects are programmed in at the same time. This option is provided for production programming.

  • If you want to create just the bootloadable project hex file; please disable bootloadable component, remove associated code from source files and build the project.

  • Suppose you want to debug the bootloadable project;  you can program the normal bootloadable hex file (containing the bootloader hex), go to Debug > Attach to Running Target once the firmware begins execution.

View solution in original post

2 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

OTA bootloading uses the .cyacd file which contains code and data for just the bootloadable project, without the associated bootloader. It is intended to be used by a bootloader host program, and downloaded to a target PSoC that has the associated bootloader project already installed.

Bootloadable .hex files are different in that they contain code and data bytes for the bootloadable and the associated bootloader project. Bootloadable gets the bootloader project's hex file from dependency selected in bootloadable componenent configurarion wondow. Once you program the bootloadable.hex file; both projects are programmed in at the same time. This option is provided for production programming.

  • If you want to create just the bootloadable project hex file; please disable bootloadable component, remove associated code from source files and build the project.

  • Suppose you want to debug the bootloadable project;  you can program the normal bootloadable hex file (containing the bootloader hex), go to Debug > Attach to Running Target once the firmware begins execution.

Thanks geon.

You were very helpful. Thanks for clarifying things for me.

0 Likes