cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to disable code generation for specific files in STM32CubeIDE

DHarr.3
Associate

We are using the STM32CubeIDE for a project using the stm32h745. IDE version 1.3.0 Config tool 5.6.0

We have significant changes to generated code using the configuration (e.g. critical fixes for Ethernet & USB) as well as adding functionality for USB.

Is there a way to disable code generation for specific files without copying the relevant files in to a new folder and turning off whatever option in the configuration? We would like to be able to continue to use the configuration tool for other peripherals as we add them to the project, clock config, etc.

it is especially egregious considering the linker scripts are incorrect for Ethernet peripheral usage, and are plowed over every time code is generated.

If possible I would prefer a solution that is fully containable in a project to keep source control clean and easy.

2 REPLIES 2

Use preprocessor conditionals (#if/#ifdef)?

JW

I'm afraid this is what I might have to do. Unfortunately not all files have user code blocks at the beginning/end so I may have to get creative in how to best disable them.