cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

chsh_4442971
New Contributor II

Hi Friends,

I need to add a variable in Generated Source Files (in FIleName_UART.c & FileName_SPI_UART.h) every time.

If I clean & rebuild my project or restart PSoC Creator, then these modified files are overlapped by newly generated ones.

How can I solve my problem?

-Chinmay

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator

Hello chsh_4442971​,

You can make use of "Skip Code Generation" option in the Build Settings. To open Build Settings, right click on the project and then set "Skip Code Generation" to True as shown below:

pastedImage_0.png

Regards,

Dheeraj

View solution in original post

2 Replies
DheerajK_81
Moderator
Moderator

Hello chsh_4442971​,

You can make use of "Skip Code Generation" option in the Build Settings. To open Build Settings, right click on the project and then set "Skip Code Generation" to True as shown below:

pastedImage_0.png

Regards,

Dheeraj

View solution in original post

MotooTanaka
Esteemed Contributor

Dear Chinmay-san,

If the variable is not affecting "Generated Source", you can add <your_own>.h and <your_own>.c in your project by Add New at Header Files folder and Source Files folder in the Workspace Explorer like below.

adding a new header file

005-header_add_new.JPG

adding a new source file

006-Source-add_new.JPG

I did similar thing in my sample below.

tty_utils a utility sample for CLI type program

I added tty_utils.h and tty_utils.c

But if you need to modify the generated source, although IMHO it is not recommended,

I have no idea to workaround it.

Best Regards,

4-Dec-2019

Motoo Tanaka

0 Likes