Skip to main content
Graduate
November 4, 2025
Solved

STM32H7 dual flash bank

  • November 4, 2025
  • 3 replies
  • 282 views

Hi i am working on a project with STM32H7A3VGT6 chipset which has LTDC controller. my goal is to make a LVGL based UI with SquareLine Studio and interface a 24 bit parallel RGB display with it . so i have made a UI using SquareLine Studio and imported to my project but the issue is when i try to build it it says flash overflowed. i know that the UI takes so much space but the spec of STM32H7.. says it mas  1 MB RAM . later in the linker script i saw it uses dual bank flash not single , so can i use it like this to make it work ? and any one can explain why is the RAM is also divided?

MEMORY

{

ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K

FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K

/*FLASH2 (rx) : ORIGIN = 0x08100000, LENGTH = 512K*/

DTCMRAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 64K

DTCMRAM2 (xrw) : ORIGIN = 0x20010000, LENGTH = 64K

RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 1024K

RAM_CD (xrw) : ORIGIN = 0x30000000, LENGTH = 128K

RAM_SRD (xrw) : ORIGIN = 0x38000000, LENGTH = 32K

} 
b1aze_0-1762245597758.png

 

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    >>so the issue is my application is too big to fit into one bank 

    Ok, so you'll need to use both, use the Linker Script to describe the different regions, and then direct objects and functions into specific portions. Not entirely straight forward, but can likely direct libraries, and use attribute and #pragma to control distribution.

    You might be able to create a script to determine the size of the working set, say from a .MAP file, or other analysis, to generate a workable distribution in the Linker Script. You might have to peridically rebalance if you consume all your resources.

    3 replies

    b1azeAuthor
    Graduate
    November 4, 2025

    b1aze_0-1762245558018.png

    look at this diagram too

    Super User
    November 4, 2025

    The STM32H7A3VGT6 only has 1 MB of flash memory. You won't be able to use flash memory beyond that.

    b1azeAuthor
    Graduate
    November 4, 2025

    thats ok can i use both regions into one beacuse my application is too big to fit into one region so thats why i am asking.

    Technical Moderator
    November 4, 2025

    Hello @b1aze and welcome to the community.

    You can't do that with STM32H7A3VG:

    FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K

    STM32H7A3VG has two banks of 512KB and they are not contiguous:

    From AN5293 "Migration guide from STM32F7 Series to STMH74x/75x, STM32H72x/73x and
    STMH7A3/7Bx devices" / page 22: 

    mALLEm_0-1762264515973.png

    b1azeAuthor
    Graduate
    November 4, 2025

    so the issue is my application is too big to fit into one bank  . can i combine both and  make a single bank or single section of  flash so that my application can fit  inside . i need a solution 

    Technical Moderator
    November 4, 2025

    @b1aze wrote:

    so the issue is my application is too big to fit into one bank  . can i combine both and  make a single bank or single section of  flash so that my application can fit  inside . i need a solution 


    You can't concatenate both regions in one Flash bank. This was almost said in my previous post.

    You need to use another part number having contiguous Flash banks (2MB of Flash size), Ex STM32H7A3xIx:

    mALLEm_0-1762270413496.png