cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX bug report

lgacnik97
Associate III

Dear ST support team,

In STM32CubeMX under the "Project Manager - Advanced Settings" path in the "Generated Function Calls" window user can select to make the generated functions' scope static or external. However, the SystemClock_Config() is always static within the main.c where this function is also generated. This is a bit annoying for all of us who do not use the main() function in the main.c and want to call all the required HAL initializations externally. This issue seems MCU family independent.

Another one is the fact that for some MCUs there are issues with linker file generation. The CubeMX-generated linker file is leaving out some linker code. While I'm not seeing this issue on the STM32U535, this remains an issue for the STM32F756. The explanation of the problem and the solution is shown below (answer provided by @grzegorz in the thread https://community.st.com/t5/stm32cubemx-mcus/flash-ld-syntax-error-when-upgrading-to-cubemx-v6-12-1/td-p/722343/page/2)

 

CubeMX forgets about references to RAM

We have:

_estack = ORIGIN() + LENGTH();    /* end of RAM */
Should be

_estack = ORIGIN(RAM) + LENGTH(RAM);    /* end of RAM */
And at the end of .data section definition:

  } > AT> FLASH
Should be:

  } >RAM AT> FLASH
Also for .bss

  } >
Should be:

  } >RAM
And for ._user_heap_stack we have:

  } >
Should be:

  } >RAM

 



Please address these issues in the following STM32CubeMX updates.

Thanks!

0 REPLIES 0