STM32F746G-DISCO music player example


While compiling the music player example, the compilation is aborted because the flash exceeds the size. I’m getting an error like “region `FLASH’ overflowed by 88764 bytes” STM32F746NG flash size is 1Mb. But it is not enough for music player example.

There is 128MBit Quad SPI Flash memory(N25Q128A13EF840E) on the card. How can I load the pictures in the example of the music player onto this flash memory?

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

I want to run the music player example on STM32F746G-DISCO development board.

This doesn’t make sense… I own that board and I am 99% sure I’ve run the music player demo without issues.

Is LV_COLOR_DEPTH set to 16-bit or 32-bit?

All but the music player is being compiled.
LV_COLOR_DEPTH is set to 16-bit.


Hmm. The only thing I can think of is that the compiler isn’t removing unused code; this will lead to a huge binary.

Check if -fdata-sections -ffunction-sections are in your compiler flags; if not, add them.

Do the same for the linker with --gc-sections.

After that, try cleaning and rebuilding.

I downloaded the software here. When I compile it gives an error because the flash is over size. It just gives an error in the example of music player.

You are correct. The reason it worked for me is because I tested it on a newer LVGL version than what the official STM32 project uses. I have just updated the official project; if you pull the changes, update the submodules, and try again, it should work this time.