Skip to main content
SMisi
Associate II
November 14, 2024
Question

Dual Bank Linker script for STM32G474CB

  • November 14, 2024
  • 1 reply
  • 731 views

Hello

I have a project with STM32G474CB in CubeMX and it generates the linker script with following: 

 

MEMORY
{
 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
 FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
}

 

But, as I understand, this is only the case when the device is switched into single-bank mode (which is not the default from the manufacturer!). The default would be two 64K flash chunks with second being at offset 0x08040000, am I correct?

Thanks.

1 reply

Ghofrane GSOURI
Technical Moderator
November 14, 2024

Hello @SMisi 

On this, the RM0440 clearly states they're consecutive in single bank mode.

Your question is answered nicely by ST here:

https://community.st.com/s/question/0D50X0000BrDcCsSQK/flash-layout-of-stm32g4xx-cat-3-with-less-than-512-kbyte-missing-in-rm0440

The STM32CubeMX generated script is correct for single bank mode.

THX

Ghofrane

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.