2021-06-07 01:53 PM
Hi,
We are currently developing a UI on an STM32H7. We are using a QSPI Flash and have successfully split the MCU code in the internal flash from the Assets that are now stored on memory-mapped External Flash. One thing we are looking to do is updating strings and maybe images, without having to flash the full firmware of the device.
We looked into the generated files from TouchGFX, we understand that strings are used as an array (in LanguageGb.cpp) which points to the first character of that string in the texts_all_languages[] (in Texts.cpp). Both of these are stored in the External Flash. So theoretically we thought it would be doable to simply update the flash with the modified assets and it would have worked. But this does not seem the case.
In short, we are looking to know if it is possible to do the following flow:
1 - Upload Firmware to the device and UI using Flash Loader
2 - Modify a string in TouchGFX, as an example this could simply be a typo fix
3 - Upload only the new UI using Flash Loader
Thanks!
2021-06-07 02:28 PM
I think they use the compiler and linker to achieve this rather than using a "resource" file system like Microsoft/Windows, which allowed the resource stub to be modified, or switched for a different language or translation.
I would be interesting to understand the TouchGFX approach/implementation, and if there is symbol linkage between the internal/external portions beyond a table at the front. I suspect there are multiple structures, and fonts or other things that are directly referenced. If there are table(s) handling indirection these should all be on the External flash side.
I might suggest looking at the .MAP, or listing files, to see if there are any cross references between the internal and external portions.
2021-06-07 02:33 PM
The flow seems rather simple depending on if Remap Texts is ticked in the config of TouchGFX. Which is why we do not understand how this is not working since everything is in the flash image.
At the moment, we have just removed the Remap Texts options which makes it so that every language has all of the strings statically. We noticed it works if the modified string is longer than the original one. But making it shorter brings us into the issue of getting a hard-fault because of the GetTextWidth(). We think it might because the modification offsets the strings and a getTextWidth receives a 0x00 as a first character and does not like this?