Skip to main content
RAJEESH RARANKURISSI
Associate
March 8, 2018
Question

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

  • March 8, 2018
  • 1 reply
  • 1499 views
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 

    This topic has been closed for replies.

    1 reply

    Uwe Bonnes
    Chief
    March 8, 2018
    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.

    RAJEESH RARANKURISSI
    Associate
    March 8, 2018
    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 

    Uwe Bonnes
    Chief
    March 8, 2018
    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.