2023-03-20 01:09 AM
Hi Guys,
So with TouchGFX we can end up with lots of graphics data that resides in external flash.
ST-LINK_gdbserver I think uses the ST Programmer to flash the elf which flashes the normal flash and the external flash.
If there is a lot of data then this external flashing takes a long time and most of the time this data is not changing.
Is there a way of setting things up so that ST-LINK_gdbserver will only flash certain sections to avoid this repeated flashing of exactly the same data, its pretty annoying to change one line of code and then have to wait minutes for it to program the external flash.
Solved! Go to Solution.
2023-03-20 03:01 AM
Post process the .ELF file after linking to strip the section going to external memory or change the flagging of it to NOBITS
2023-03-20 01:58 AM
You can create two project configurations: one that contains the external flash data, and another that only refers to the data that has been already put there. Use the latter when the external data does not change.
2023-03-20 02:17 AM
Thanks for the answer, how would I do this for the TouchGFX generated code though?
2023-03-20 03:01 AM
Post process the .ELF file after linking to strip the section going to external memory or change the flagging of it to NOBITS
2023-03-20 03:10 AM
Hi @Community member
I tried using (NOLOAD) on the sections but that just then seems to want to but the data into normal flash!
Is there another way of flagging NOBITS?
Cheers
Andy
2023-03-20 03:24 AM
My expection is you'd need to use a tool capable of walking the object file structures. Or stripping sections.
2023-03-20 03:33 AM
Ah Ok thanks.
Using objcopy I now have a post build step that removes the sections and creates a new elf, I then have two debug setups using the non stripped and stripped elf. Works well.
Thanks very much for the help I was banging my head against the wall there.