cancel
Showing results for 
Search instead for 
Did you mean: 

Example supplied creates 2GB extflash.bin file

franck23
Senior

Hi,

I am trying out the following tutorial: https://support.touchgfx.com/docs/tutorials/tutorial-01, which is very basic.

In the "Running an Example on an STM32 Evaluation Kit" section, when pressing run target, everything compiles, the MCU is loaded, but the external memory is not programmed.

(I still get the Done message...)

Looking at the extflash.bin size, it is over 2GB!

I did not modify the example in any way.

Looking at the Images and Texts, there is nothing extra and it shouldn't use much more than a few MB.

Did anybody successfully run this example?

Setup:

TouchGFX Designer 4.15.0

STM32F746G-Disco

Thanks,

Franck.

1 ACCEPTED SOLUTION
7 REPLIES 7

You'd need to look at the .MAP and .LD and try and understand why EXTFLASH spans multiple memory regions.

ie 0x08000000 and 0x90000000

I'd probably look at the .ELF sections, and why objcopy, or whatever isn't pulling the singular QSPI region.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
franck23
Senior

Thanks to both of you.

The .MAP and .LD file seems good, with the QUADSPI starting at 0x90000000

I thought the extflash.bin would only contain data for the external flash and the programmer would automatically add the 0x90000000 offset.

I could not find how to properly disable the binary file generation (it is not enabled in the CubeIDE project "MCU Post build outputs").

Anyway, it looks like my issue is a CubeProgrammer bug, and the target.elf file from "thisProject\TouchGFX\build\bin" must be used to "manually" program the target.

My CubeProgrammer version is V2.6.0.

https://community.st.com/s/question/0D53W00000SbbZnSAJ/adding-qspi-flash-memory-stm32f746gdisco-no-space-left-on-device

But seriously TouchGFX team, 2GB file!!??

Thanks,

Franck.

MM..1
Chief II

Simply in post build settings turn off generate bin

franck23
Senior

Is there a post-build setting in TouchGFX Designer somewhere? I could not find it.

If you mean the one from the CubeIDE project, it is already off (Project Properties->C/C++ Build->Settings->MCUPost build outputs).

I have updated my environment to TouchGFX Designer 4.16.0, CubeMX 6.1.1and configured CubeMX to use TouchGFX Generator 4.16.0.

The external flash loading now works directly from TouchGFX Designer, nice!

But it still generates the 2GB binary file which takes space and time to compile/write.

Even more, since it looks like the binary file is generated twice during the compilation. I can see that the file size increases to 2GB then goes down to a few KB and then increase again to 2GB...

I dont use run target or run simuloator , then build and 2G dont create. I import .project file and build in CubeIDE, then when is bin disabled no file created.

For extract you then can use some script with every sections and join it

arm-none-eabi-objcopy.exe -O binary --only-section=ExtFlashSection STM32F746G_DISCO.elf qspi1.bin

makefile in gcc root dir used by TouchGFX

arm-none-eabi-objcopy.exe -O binary --only-section=*FlashSection STM32F746G_DISCO.elf extflash.bin

and seems this wildcard dont work and generate 2G files

SOLUTION is change makefile and generate ihex file for extflash, and wildcard works.

I recheck CubeIDE hex and in this is all sections in one file , then makefile for TouchGFX have split applied ok, but extflash is better change to ihex format too.

Cube project dont handle extflash and intflash properly.