2022-02-06 02:15 AM
We require on one file all images used in gui and address map file for locate images.
Is this possible with simulator TouchGFX project?
2022-02-08 12:04 AM
Hello MM,
Here is what I have been answered by a colleague :grinning_face_with_sweat::
"You can modify the Makefile used by the simulator to produce a binary file with all the images.
It is already done in some of the gcc Makefiles used by the TBS.
Here is a cut from a STM32F746 Makefile:
echo "Producing additional output formats..."
echo " target.hex - Combined internal+external hex"
$(objcopy) -O ihex $@ $(@D)/target.hex
echo " intflash.elf - Internal flash, elf debug"
$(objcopy) --remove-section=ExtFlashSection $@ $(@D)/intflash.elf 2>/dev/null
echo " intflash.hex - Internal flash, hex"
$(objcopy) -O ihex --remove-section=ExtFlashSection $@ $(@D)/intflash.hex
# re-enable if extflash binaries are required in your workflow
echo " extflash.bin - External flash, binary"
$(objcopy) -O binary --only-section=*FlashSection $@ $(@D)/extflash.bin
The last line creates a bin files with all data from the *FlashSections. Here they probably want just the ExtFlashSection.
All images looks like this:
LOCATION_PRAGMA("ExtFlashSection")
KEEP extern const unsigned char image_img1[] LOCATION_ATTRIBUTE("ExtFlashSection") = { // 10x4 RGB888 pixels.
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
This puts the image data in ExtFlashSection. "
Hope this helps,
/Romain
2022-02-09 05:44 AM
Hello Romain,
Maybe im noob in edit makefile, but when I place in simulator makefile ...
all: $(filter assets,$(MAKECMDGOALS))
echo " extflash.bin - External flash, binary"
$(objcopy) -O ihex --only-section=*FlashSection $@ $(@D)/extflash.hex
all assets: $(filter clean,$(MAKECMDGOALS))
I get error
Run Simulator
Generate
Done
Generate Assets
make -f simulator/gcc/Makefile assets -j8
simulator/gcc/Makefile:31: *** missing separator. Stop.
Failed
Failed
EDIT1:
I test in command line and too generated makefile and it dont get error, but hex file is empty. Seems simulator exe dont handle sections and in simulator build i dont see file for objcopy.