Adding variables to a pre-build step

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

cross mob
DaGr_294516
Level 3
Level 3
10 sign-ins 10 questions asked First solution authored

Is there a way to add the device name as an argument to a pre-build step? I presume there is a list of variables accessible to pre/post build commands but I can't find it easily....

Could someone point me in the right direction please?

Cheers,

Dan

 

0 Likes
1 Solution

Dan,

Would this be helpful?:

The project file xxx.cyprj is an xml file.

If you can parse the xml and look for a string:

"selected_device v="  the string in the xml field is the PsoC device being used in the project.

You can then create a script that parses the .cyprj file places the selected device into your own local environment variable and then use it in your own pre- or post- build executables.

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

View solution in original post

0 Likes
10 Replies