2025-03-09 7:36 AM
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:
; *********************************************************************************
; *** 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-*/
; *************************************************************
; *** 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