Important Notice for STM32CubeMX Users
Current Release: STM32CubeMX 6.12.1
Purpose: This release primarily addresses issues related to STM32MPUs.
Problem: Issues introduced with the generated code for Makefile and CMake projects.
Recommendation:
- For MCU Users: If you are using an MCU (not an MPU), it is recommended to stay on STM32CubeMX 6.12.0.
- For MPU Users generating code for MCUs: follow the instructions below.
Issue Description:
- Problem: When compiling a CMake or Makefile project, a build error occurs due to a syntax error related to the linker file.
![SemerCHERNI_15-1729258098740.png SemerCHERNI_15-1729258098740.png](https://community.st.com/t5/image/serverpage/image-id/90776iCD18BB8E70DB1B60/image-size/medium/is-moderation-mode/true?v=v2&px=400)
- Cause: The .data, .bss, and ._user_heap_stack sections are not attributed to the RAM memory region. Additionally, the RAM attribute is missing from the highest address in the user stack calculation formula.
![SemerCHERNI_16-1729258098742.png SemerCHERNI_16-1729258098742.png](https://community.st.com/t5/image/serverpage/image-id/90774i138D967ECCAE24C1/image-size/medium/is-moderation-mode/true?v=v2&px=400)
![SemerCHERNI_17-1729258098750.png SemerCHERNI_17-1729258098750.png](https://community.st.com/t5/image/serverpage/image-id/90775i8D848DCB4AB036A2/image-size/medium/is-moderation-mode/true?v=v2&px=400)
Solution:
- Attribute Memory Sections: Ensure that the .data, .bss, and ._user_heap_stack sections are attributed to the appropriate RAM memory region
.![SemerCHERNI_18-1729258098751.png SemerCHERNI_18-1729258098751.png](https://community.st.com/t5/image/serverpage/image-id/90777i94DF4B61B0E0C3D2/image-size/medium/is-moderation-mode/true?v=v2&px=400)
- Update Stack Calculation: Add the RAM attribute to the highest address in the user stack calculation formula.
![SemerCHERNI_19-1729258098760.png SemerCHERNI_19-1729258098760.png](https://community.st.com/t5/image/serverpage/image-id/90778iFD14F93716A2AB40/image-size/medium/is-moderation-mode/true?v=v2&px=400)
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.