change bin files names by define from the code

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

cross mob
NatiUnger
Level 1
Level 1
First question asked Welcome!

Hi,

Im writting a software that need to be released for more then 80 devices, all with the same aoftware but another ID, the usb pid is effected.

I have a file name config.h and a define that define the ID, the usb library generated by psoc creator (generated.once and been modified). I wish that the file compiled the .hex and all others will be with a name like "compiled_id_" DEV_ID ".HEX"

 

Is it possible? 

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

You might want to use scripts to compile your project where the script changes the DEV_ID.
See the following thread for this.
Solved: Compile project from command line - Infineon Developer Community

Good luck with your project.

View solution in original post

0 Likes
2 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

You might want to use scripts to compile your project where the script changes the DEV_ID.
See the following thread for this.
Solved: Compile project from command line - Infineon Developer Community

Good luck with your project.

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

NatiUnger,

BiBi is correct.  You can create batch scripts that can name the output HEX files the names you desire.

Another possible method is to use the "Build Settings.../ARMxxx/User Commands/" to place CLI commands in either "Pre Build" and/or "Post Build" arguments.  I have used "Post Build" to move the HEX file generated to a different directory.

Len_CONSULTRON_0-1639406707083.png

 

Len
"Engineering is an Art. The Art of Compromise."