PSOC4 Bootloader is 88kB, but shows up as 131072bytes when bundled with Bootloadable? How can I recover that lost area?

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

cross mob
DaGa_4378306
Level 4
Level 4
10 replies posted 5 replies posted 5 questions asked

I have a fixed-stack bootloadable project with PSOC4. Separately, when I build the bootloader, it reports 88 kB of space. But when I build the bootloadable project, it reports the bootloader is 131072 bytes.  Even if I manually override the application start space, I can't recover that lost space that I need for the application.

Any ideas of the descrepancy?

0 Likes
1 Solution

Thanks, I finally figured it out.  I failed to update the cm0gcc.ld in the bootloader project to the 256kB settings, so even though the boatloadable cm0gcc.ld was correct. I guess that mismatch caused the booatloadable to get confused on the actual size.

View solution in original post

0 Likes
3 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hello,

I assume you are using our BLE OTA Fixed stack example projects. Please correct me, if I am wrong.

Which is the PSoC4 BLE device that you use in your application? BLE OTA Fixed Stack example projects use custom linker scripts, so PSoC Creator will not be able to configure linker scripts to provide the correct linking and placement. Please refer the section "Configuring Fixed Stack OTA Projects for Other Cypress BLE Devices" on page 47 of our application note, https://www.cypress.com/file/198301/download , and update the linker script file "cm0gcc.ld" in both bootloader and bootloadable projects and test again.

If the above information does not resolve the issue, I request you to share your bootloader and bootloadable projects with us.

Thanks and Regards,

Sudheesh

0 Likes

Thanks, I'm following the fixed-stack Bootloader code. I'm using the CYBLE-214015-01, and I've already updated the cm0gcc.ld file with the 256kB flash size and rows, the BootloaderSymbolsGCC.ld is copied over after each time I compile the bootloader.

I have some additional complexity where the project diverges from the fixed-stack example. I need an upgrade-able BTLE profile, but I can't afford the dual-application boot space in FLASH.  Here is my thinking:

  • Create fixed stack bootloader with the full BTLE component (roughly 80 kB -> 88 kB when rounded up to FLASH rows)
  • Create the bootloadable application which instantiates it's own version BTLE component profile and stack so my application can change the BTLE profile with the OTA updates.   My application code is roughly 140 kB including BTLE stack + profile.

So I followed everything in the fixed stack example, but I don't have any the "ota_mandatory.h/c" code including because it mostly seems like it's related to sharing the BTLE RAM code.  Is there something in the ota_mandatory code needed to help locate the bootloader and application?

0 Likes

Thanks, I finally figured it out.  I failed to update the cm0gcc.ld in the bootloader project to the 256kB settings, so even though the boatloadable cm0gcc.ld was correct. I guess that mismatch caused the booatloadable to get confused on the actual size.

0 Likes