SVG with TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-29 12:49 PM
Is there any way to store SVG images in external flash, similiar to how PNGs can be stored there?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-03 1:26 AM
Hello @ikendal ,
If you want to put PNGs in external flash, you can do specify it from TouchGFX designer here :
How much your SVGDatabase takes in memory? (You can check that from the map file)
Do you have a lot of SVGs in your project?
The trick to put SVGs in external flash is to write this in the linker script :
ExtFlashSection :
{
*/SVGDatabase.o(.rodata.*)
} >EXT_FLASH
you have to put these lines before the .rodata section (which goes to flash by default)
/* Constant data into "FLASH" Rom type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH
Hope it helps :)
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-02 4:25 AM
Hello @ikendal ,
I think it's doable, but SVG images are supposed to take very little memory so that's why we keep them in internal flash normally. Is there any specific reason you want to have them in external flash?
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-02 9:46 AM
We have a TouchGFX project that has blown way past our internal flash limits and, while looking for places to save, we noticed that one large user of internal flash is the SVGDatabase.
We're considering switching over to exclusively use PNGs to get better use of the external flash and to remove the need for the vector rendering code, but if we can get the SVGs in there, it would save our designer some conversion work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-03 1:26 AM
Hello @ikendal ,
If you want to put PNGs in external flash, you can do specify it from TouchGFX designer here :
How much your SVGDatabase takes in memory? (You can check that from the map file)
Do you have a lot of SVGs in your project?
The trick to put SVGs in external flash is to write this in the linker script :
ExtFlashSection :
{
*/SVGDatabase.o(.rodata.*)
} >EXT_FLASH
you have to put these lines before the .rodata section (which goes to flash by default)
/* Constant data into "FLASH" Rom type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH
Hope it helps :)
ST Software Developer | TouchGFX
