Making changes to generated code

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

cross mob
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

Hi,

   

In PSoC Designer it was relatively easy to make small changes to user modules by finding the library code file and editing it, so that changes were always fed through when rebuilding.

   

I cant find anything in PSoC Creator. Specifically I need to make a small change to BLE_Gatt.c but I cant find where this file comes from when generating the application. Everything seems well hidden in Creator. 

   

Is there any way to do this or to have the file not updated when re-generating the app?

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Cypress has recently introduced "Callback Macros" within the generated files to avoid making changes. Tampering the generated code will get overwritten at a new build and at least at a component version change. Using callback macros will even survive major version changes of Creator. I would suggest you to evolve whether your needed functionality cannot be performed using a different way. When all fails, consider to contact Cypress directly by creating a support case.

   

 

   

Bob

View solution in original post

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Cypress has recently introduced "Callback Macros" within the generated files to avoid making changes. Tampering the generated code will get overwritten at a new build and at least at a component version change. Using callback macros will even survive major version changes of Creator. I would suggest you to evolve whether your needed functionality cannot be performed using a different way. When all fails, consider to contact Cypress directly by creating a support case.

   

 

   

Bob

0 Likes
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

To be more specific all I want to change is remove the word "Static" from the declaration of an array within Gatt.C so I can access it from my own code.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

And there are no APIs provided to access elements of that array?

   

Or access cyBle_gatts directly.

   

Bob

0 Likes
Anonymous
Not applicable

simple way is to import the component into your project. perhaps rename it as ComponentX, then edit the source. of course you will have to do that when a new version comes out.

   

-Ed