2025-03-07 2:33 AM
When unchecking "Generate Code" for MX_LWIP_Init, the code is still generated anyway. It's very annoying because I have to delete the generated function every time I generate code. Using CubeMX version 6.14.
2025-03-07 3:08 AM - edited 2025-03-07 3:23 AM
Hello @AAlis.23
First let me thank you for posting.
When you configure peripherals and middleware in STM32CubeMX, the tool generates initialization code for these components. By default, STM32CubeMX includes function calls to initialize the configured peripherals in the main.c file. The "Do not generate function call" option allows you to exclude these function calls from the generated code.
Using STM32H743AGIx and CubeMX 6.14.0
when the option is checked
The generated code is :
When the option is unchecked
==> CubeMX works correctly
THX
Ghofrane
2025-03-07 7:13 AM - edited 2025-03-07 7:26 AM
Hi,
As you can see, I have "Generate Code" disabled, but when generating the code, CubeMX overwrites the lwip.c file, adding the function void MX_LWIP_Init(void). This causes a compiler error because I already have this function declared (I need to use my own function).
My goal is to use my own function and call it normally.
CubeMX fails.
In fact, I now have the function declared three times! Every time I generate the code, CubeMX adds a new copy.