cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK_gdbserver, ability to only program internal flash?

ACapo.1
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions

Post process​ the .ELF file after linking to strip the section going to external memory or change the flagging of it to NOBITS

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

View solution in original post

6 REPLIES 6
Pavel A.
Evangelist III

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.

ACapo.1
Senior

Thanks for the answer, how would I do this for the TouchGFX generated code though?

Post process​ the .ELF file after linking to strip the section going to external memory or change the flagging of it to NOBITS

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

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

My expection is you'd need to use a tool capable of walking the object file structures. Or stripping sections.​

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

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.