Making projects more friendly to version control systems

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

cross mob
david-given
Level 4
Level 4
10 sign-ins 5 sign-ins First solution authored

I want to use a version control system to manage my project. Right now it's pretty hard, as my source code ends up mixed in with all kinds of autogenerated code that I don't care about and shouldn't check in --- some of the source code is actually embedded inside autogenerated code that I don't care about etc. I really don't like having my precious content in a directory called Generated_Source.

Does anyone have any suggestions for whether it's possible to rearrange my project to be a bit easier to manage?

Most of the autogenerated source is library code that I will never have to modify, and so don't need to worry about. So far the only things I've found I need to modify are interrupt handlers where I need to insert my own code into the `Foo_Interrupt()` routine. Is there any way I have this routine in my main source code? If so, I wouldn't need to modify anything in Generated_Source.

The ideal solution, of course, is to put everything that's produced by the compiler in an obj directory, but I suspect that's not possible...

0 Likes
1 Solution

Cypress also added callback capabilities to some places / components, so there should not be any need to edit the generated code anymore.

View solution in original post

0 Likes
4 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You can define the interrupt handler in your own code, and then use ISR_StartEx(&handleInterrupt) to assign this handler to your component. That way you don't need to modify the generated code at all.

D'oh --- I'd forgotten I can do that.

Does this technique apply to all the other autogenerated code as well? Is there every any necessity to edit it?

0 Likes

Cypress also added callback capabilities to some places / components, so there should not be any need to edit the generated code anymore.

0 Likes

Awesome --- thanks.

0 Likes