I did some other testing before and found const
to work great for ensuring the data structure you are defining is in FLASH and not RAM. I can’t find my post with test code at the moment. Not sure if static
is needed, but might be a good idea to add it just to be explicit about things.
A follow up question would be, can you think of a way to automatically redefine it so that it works for the STM32… I haven’t been able to. That is, create a macro called PROGMEM that does something to give us static const
in the right place.