How do I locate a variable in the checksum exclude region for a bootloadable app

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

cross mob
Anonymous
Not applicable

I have a bootloadable application that stores configuration data in flash. Is it possible to store the data in the checksum exclude section and can it survive a bootload or will it be erased?

currently I'm using const unsigned char FLASH_ALIGNED  ConfigFlashData CY_SECTION(".cy_checksum_exclude")={0}; to locate the variable, but it seems to prevent the application from starting.

Blair

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

Hi Blair,

An example is FYI.

The difference is in the example, it uses CySysFlashWriteRow(), while you are using CY_Section.

Thanks,

Ryan

0 Likes
Anonymous
Not applicable

This looks exactly like what I want to do. Basically I want to locate the exclude section at a given location so the data will survive a bootload and the new code can read it. The issue I'm having is that PSOC Creator over writes the linker file and the line .cy_checksum_exclude 0x7ff: { KEEP(*(.cy_checksum_exclude)) } is overwritten with .cy_checksum_exclude ((LENGTH(rom) - CY_FLASH_ROW_SIZE * CY_APPL_MAX) - CY_CHECKSUM_EXCLUDE_SIZE): { KEEP(*(.cy_checksum_exclude)) }.

Is there a way to prevent this?

Blair

0 Likes
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Emmm......maybe we can try to copy and paste the linker file modified to another folder in the project, and add the linker file as custom script. See the picture FYI. Right click the project name in the workspace explorer to open the build setting window:

pastedImage_0.png

Thanks,

Ryan

0 Likes