cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX V6.14.0 Scatter File Issue with STM32G474 Project

Penguins
Associate

Hello ST,

I'm encountering an issue when generating an STM32G474 project using STM32CubeMX V6.14.0. When using the default Scatter File (stm32g474xx_flash.sct) generated by CubeMX in Keil, the program gets stuck at HAL_Init(). However, if I check the "Use Memory Layout from Target Dialog" option in Keil to let it generate the sct file instead, the program compiles and runs normally.

This problem didn't occur in the previous version, V6.13.0. Could you please look into this and verify if there's an error in the Scatter File configuration generated by CubeMX V6.14.0 for STM32G474 projects?

To give you a better understanding of the issue, I've included some relevant code snippets below:

  • stm32g474xx_flash.sct (generated by CubeMX V6.14.0)
; *********************************************************************************
; *** Scatter-Loading Description File generated by STM32CubeMX/LinkerGenerator ***
; *********************************************************************************;

LR_IROM1 0x8000000 0x00080000  {  ; load_region size_region
  ER_IROM1 0x8000000 0x00080000  {  ; load address = excetion address
   .ANY (+XO)
   .ANY (+RO)
  }
  RW_IRAM1 0x20000000 0x00020000  {  ; load address = excetion address
   .ANY (+RW +ZI)
  }
;***region***;
;***endregion***;
}

/*-Start of  regions- Auto-generated By STM32CubeMX-*/
  • project.sct (generated by Keil automatically)
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x08000000 0x00080000  {    ; load region size_region
  ER_IROM1 0x08000000 0x00080000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
   .ANY (+XO)
  }
  RW_IRAM1 0x20000000 0x00020000  {  ; RW data
   .ANY (+RW +ZI)
  }
}

Best regards,
Penguins

2 REPLIES 2
Souhaib MAZHOUD
ST Employee

Hello @Penguins 

Thank you for bringing this issue to our attention.

This issue has been raised to the relevant team and tracked by Internal ticket 204077 (This is an internal tracking number and is not accessible or usable by customer)

BR,

Souhaib

kombi
Associate

I have my own scatter files selected in Keil in regards to different targets( i have 2 set up for release and debug). Previous Cube MX version left this alone, but now i get overwritten setting with default scatter file every time i regenerate project in Cube MX. I really hope this will be fixed.