Fixed cymetadata.c file during clean build

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

cross mob
PaBr_4578176
Level 2
Level 2
First like given Welcome!

As the auto-generated cymetadata.c file is not in the specific component, I do not know how to exclude this file from clean build in PSoC Creator.

The goal is to set a custom bootloadable version (periodically) in the metadata section using a script and perform a clean build.

Kindly, please take a look.

0 Likes
1 Solution

I think the solution should work. If you are changing anything in the cymetadata.c file, another build is required for the .cymeta section in the linker script section to be updated with these changes. So, I guess the drawback is you need to perform a build again, but since PSoC Creator uses incremental builds, the consecutive build should be faster.

Alternate Solution: You could modify the Bootloader.h file, the macro Bootloader_BOOTLOADER_APP_VERSION specifically with the new app version. Do remember to build the project again.

Note that in either case if you do a clean and build, you lose any changes done to the files in the Generated Source folder.

Let me know if this solution works for you

Regards,

Dheeraj

View solution in original post

0 Likes
3 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

The cymetadata.c contains flash and chip protection settings and is needed for a successful build.

The goal is to set a custom bootloadable version (periodically) in the metadata section using a script and perform a clean build.

Kindly, please take a look.

Can you please tell us more details about what are you going to do exactly? like why do you want to modify it.

Thanks

Ganesh

0 Likes

I want to provide an incremental "bootloadable application version" (0x16 and 0x17 byte in metadata) after each build (e.g. using Jenkins). To not manually set it in Bootloadable component every time.

Currently, I'm using a workaround, where after cyprjmgr.exe and .cywrk  build (clear build), I'm changing particular bytes in the cymetadata file and then build again. But I believe it is not the best solution.

0 Likes

I think the solution should work. If you are changing anything in the cymetadata.c file, another build is required for the .cymeta section in the linker script section to be updated with these changes. So, I guess the drawback is you need to perform a build again, but since PSoC Creator uses incremental builds, the consecutive build should be faster.

Alternate Solution: You could modify the Bootloader.h file, the macro Bootloader_BOOTLOADER_APP_VERSION specifically with the new app version. Do remember to build the project again.

Note that in either case if you do a clean and build, you lose any changes done to the files in the Generated Source folder.

Let me know if this solution works for you

Regards,

Dheeraj

0 Likes