cancel
Showing results for 
Search instead for 
Did you mean: 

Having to modify generated files...

farble1670
Associate III

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
Lead II

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 someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.
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
Lead II

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 someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.