cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G Binary size exceeds rodata’ will not fit in region `FLASH

RAJEESH RARANKURISSI
Associate II
Posted on March 08, 2018 at 06:06

I am using STM32F746G Discovery board . I am facing an issue with image size.

My binary size is more than 1MB and gets an error

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: STM32F746emWin.elf section `.rodata’ will not fit in region `FLASH’

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH’ overflowed by 106964 bytes

collect2.exe: error: ld returned 1 exit status

makefile:43: recipe for target ‘STM32F746emWin_ATMEGD10.elf’ failed

make: *** STM32F746emWin.elf Error 1

How can I keep my image in external flash and execute from there

Can I use internal and external flash together continuesly .

How can I do this ? Can any body help me to do it 

5 REPLIES 5
Uwe Bonnes
Principal II
Posted on March 08, 2018 at 10:38

You cannot  flash more than one 1 MiB in a chips that has only 1 MiB Flash. There are two things to consider:

- Why is the image that big?

- Ths STM32F746G has the same die as a STM32F746I. Either the flash above 1 MiB is switched of with some fuse, not tested or tested bad. Try to link for STM32F746I, flash  and compare the result. Perhaps you have luck.

Posted on March 08, 2018 at 10:49

Thank you.

Image became big that i am using more bmp images in code . 

So it increases to more than 1MB

So I am trying to put binary in External Flash of STM32F746Discovery board

Discovery board has 128-Mbit Quad-SPI Flash memory

128-Mbit SDRAM (64 Mbits accessible). 

But I don't have idea to work in external Flash 

Posted on March 08, 2018 at 11:32

So use the right section indicator in your code to put the BMP file into QSPI. Do not forget to initialize QSPI in your code.

Posted on March 08, 2018 at 11:44

Thanks You. 

I did n't get much clarity on your comment. '

right section indicator in your code

 '  . I didn't get this meaning.  

Actually I am using ST em Win Library for GUI development . So my BMP file convert to c code using utility (BmpCvtST)

and integrate with application using ST em win library.Then my whole binary size get increased and crossed more than 1 MB. 

So I planned to keep the Binary in external flash (NOR flash) and start Run from there. 

But I dont have much idea on it . 

Do you have any supporting / Reference link or document to do this.

Posted on March 08, 2018 at 13:07

What about asking google about 'gcc section' ?