cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Linker Script in STM32CubeMX 6.12.1

Semer CHERNI
ST Employee

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
  • 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.pngSemerCHERNI_17-1729258098750.png

Solution:

  1. 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
  2. Update Stack Calculation: Add the RAM attribute to the highest address in the user stack calculation formula.
    SemerCHERNI_19-1729258098760.png

 

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.

1 REPLY 1
RichardS1
Associate II

I don't understand how such a large company have this poor tool quality