Thank you for creating the thread.
As I mentioned, I am using the APPNAME variable that is in the makefile -
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.
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
Using_APPNAME_in_main.zip 59.8 MB
Thank you. That worked. It's a pretty simple 'fix'