Avoid rebuild of generated source.

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

cross mob
xy_283156
Level 2
Level 2

Hi,

because i want to use two slave addresses, I had to edit a line in the generated source code for the i2c component. (line 40 of I2C_INT.c)

But everytime I rebild the project the line is deleted understandably. I know there has been a similar question, but this thread is some years old.

Is there a way to avoid this?

thanks a lot

0 Likes
3 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

That is expected behavior.

Have you tried doing only Build not "Clean & Build"option for building the project.

0 Likes

Hello anks, yes, i have tried that and most of the times it works. But sometimes the file seems to be rebuild and my editing is deleted. Will the project be cleaned after adding new components?

0 Likes

Any editing done in generated source files will be deleted after a Clean or Clean & Build.That is expected behavior.

Please look for callback functions in the I2C component, those are available for user to edit and do not get cleaned after a rebuild in Generated Source.

0 Likes