We are implementing the firmware update feature in our product using PSoC Creator 4.0.
We were able to successfully run the example in Fixed Stack mode using the CY8CKIT 042 BLE PIONEER kit.
We also succeeded in running this example by making a little change at custom linker script to run over the part number and memory we use in our product (CYBL10573-56LQXI, Flash 256K and 32K RAM), based on the script generated by PSoC itself.
All projects using the BLE 4.2 v3.20, Bootloader v1.50 and Bootloadable v1.50 components.
We then add the Bootloader project to our official firmware workspace.
Some changes were made in the code so that the application could see the functions we are using from the BLE that was moved from the application to the Bootloader, following the procedure described in the Cypress app notes. That is, we are using the original BLE component settings of our project. But to it was added a copy of the example Bootloader service.
The bootloader compiles correctly and we can run it in our device, but we are facing a difficulty in the moment of linking the bootloadable with the following error:
ERROR: section .cyloadablemeta loaded at [0003ffc0,0003ffff] overlaps section .cy_checksum_exclude loaded at [0003ff00,000402ff]
Collect2.exe: error: ld returned 1 exit status
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
It seems that there is a confusion in the allocation and size for the exclude checksum region that is even going beyond the size of our flash.
This happens whether or not we enable application validation.
We need an urgent help because we do not know how to solve this, the script seems correct and works well when using with the example application.
Solved! Go to Solution.
Did you get the issue resolved? We have been doing the same thing (i.e., adding the firmware upgrade feature) but have not gotten this far. We are facing a different issue. We can compile the Bootloader project but linking the bootloadable results in the following error:
.\LinkerScripts\cm0gcc.ld:261 cannot move location counter backwards (from 20000340 to 200002c0)
collect2.exe: error: ld returned 1 exit status
Did you experience this issue? I thought it was an out-of-memory issue but "doubling" both Flash and SRAM (by choosing a different device) did not resolve the issue. Our current firmware is using about 100KB of flash and 12KB of SRAM. So 256KB of flash and 32KB of SRAM should be sufficient.
Yes, the issue was solved. I simply put an appropriate value to CY_CHECKSUM_EXCLUDE_SIZE on the line 41. You are experiencing a different issue from mine and I would not be able to help you without looking at the script. But it looks like you're doing some calculation that takes the dot (location counter) to a smaller memory address than the current one. Each line in the script must follow an increasing memory allocation.