ModusToolbox equivalent to the PSoC Creator CY_PROJ_NAME

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

cross mob
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Hi,

Coding with PSoC Creator projects has a #define CY_PROJECT_NAME that is the name string of the project being built.  Change the project name and recompile, CY_PROJECT_NAME matches the new project name.

Is there an equivalent in ModusToolbox to CY_PROJECT_NAME that lists the project name string?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi LePo_1062026​,

Thank you for creating the thread.

As I mentioned, I am using the APPNAME variable that is in the makefile -

pastedImage_0.png

This variable cannot be used directly in the .c code as this is a makefile variable. So, to pass this variable into the C code I am using the DEFINES field in the makefile which is used to define a preprocessor macro.

pastedImage_2.png

The APP_NAME macro can now be used in the main.c file. I have created a simple example to print the name of the application every 3 seconds and I have attached the project. Please let me know if this meets your requirement.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi LePo_1062026​,

Thank you for creating the thread.

As I mentioned, I am using the APPNAME variable that is in the makefile -

pastedImage_0.png

This variable cannot be used directly in the .c code as this is a makefile variable. So, to pass this variable into the C code I am using the DEFINES field in the makefile which is used to define a preprocessor macro.

pastedImage_2.png

The APP_NAME macro can now be used in the main.c file. I have created a simple example to print the name of the application every 3 seconds and I have attached the project. Please let me know if this meets your requirement.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Rakshith,

Thank you.  That worked.  It's a pretty simple 'fix'

Len

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

Hi LePo_1062026​,

Glad your issues are resolved

Regards,

Rakshith

Thanks and Regards,
Rakshith M B
0 Likes