cancel
Showing results for 
Search instead for 
Did you mean: 

Region `FLASH' overflowed for external flash

Hello, region `FLASH' overflowed by 424008 bytes but i didn't added much image. I am using 128 Mb N25Q128A13EF840E QSPI flash. I just wanted to confirm how much QSPI is assigned.

I can see below settings for QSPI.

0693W000001stCiQAI.jpg

I want to know that Where should I check in my firmware to know assigned external flash size. I can't find in linker file?

Also I want to see which all data is saved in QSPI 128Mbit .

Any help

26 REPLIES 26
Uwe Bonnes
Principal III

Probably either your linker file is wrong and does not expose QSPI or you do not explicit place your table in QSPI.

Yes but it all generated by CUBEMX. There is some section called `ExtFlashSection' but I am unable to see it in linker file.

Martin KJELDSEN
Chief III

Show us the linker script - CubeMX does not know anything about QSPI flash chips, only general configuration for the controller on the mcu.

Attaching my linker script.

 

@Martin KJELDSEN​  Did you get the chance to check ?

I dig a bit more and check using gcc objdump command. Here u can see external flash size is 0xCEB08 which I think In bytes. So this does not cross 128Mbit.

Note : In this case I removed most of images and as per compiler its almost filled.

0693W000001szU9QAI.jpg

I dig a bit more and check using gcc objdump command. Here u can see external flash size is 0xCEB08 which I think In bytes. So this does not cross 128Mbit.

Note : In this case I removed most of images and as per compiler its almost filled.

0693W000001szWAQAY.jpg

Yep.

/* Specify the memory areas */
MEMORY
{
    RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 320K
    FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 1024K
}

There's no mention of external flash here or where to put images.

Try adding:

/* Memories definition */
MEMORY
{
  RAM     (xrw)  : ORIGIN = 0x20000000,  LENGTH = 320K
  FLASH   (rx)   : ORIGIN = 0x8000000,   LENGTH = 1024K
  QUADSPI (r)    : ORIGIN = 0x90000000,  LENGTH = 16M
}
 
... 
 
  ExtFlashSection :
	{
		*(ExtFlashSection ExtFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI
 
  FontFlashSection :
	{
		*(FontFlashSection FontFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI
 
  TextFlashSection :
	{
		*(TextFlashSection TextFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI