cancel
Showing results for 
Search instead for 
Did you mean: 

Having to modify generated files...

farble1670
Associate II

Hello, we are finding it necessary to modify generated files. We have a few different cases, but just taking the first example, we had to change generated/OSWrappers.cpp as the variant of FreeRTOS we're using has slightly different function names.

Is there a system for dealing with situations like this?

Thanks.

14 REPLIES 14
BarryWhit
Senior III

Good version control comes with convenient diffing and merge tools.

I think OP wanted to *generate* the right code to begin with, instead of finding better ways to maintain and apply a  patchset.

 

AI also will come much earlier than you think. 

I, for one, welcome our new dystopian overlords. Though, we should have voted for Kang (very obscure reference, don't feel bad).

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.
Pavel A.
Evangelist III

So what means "well defined"? Something automatic? Point and click?


@Pavel A. wrote:

So what means "well defined"? Something automatic? Point and click?


Something other than having to go in after generation and reconcile the tool-edited version of generated file.

I was mainly wondering if there's some configuration somewhere like "don't generate this file", or a way to move the problem generated code into non-generated code. I'm hearing there is not.

Thanks everyone for the feedback.

Hi @farble1670 

Is python script not an option ? Or even a Windows batch file could do that I recon - string find&replace. I got something similar running pretty qiuckly (mostly programmed by GPT).

BarryWhit
Senior III

I was mainly wondering if there's some configuration somewhere like "don't generate this file", 

really? because you never asked that question. There are some knobs for controlling some of that, for peripherals.

Also "don't generate" is quite easy to do by just deleting with a post-generation script. if that's what you mean.

Gencode.jpg

 

gencode2.jpg

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.