32.8k views
in Platform Packages by
I'd like to be able to have some bitmaps stored in external QSPI and some in internal flash. The reason for this is to allow me to unmap the QSPI so I can update it, while still being able to access some bitmaps from the internal flash. Potentially the same would apply to fonts.

At the moment in ewconfig.h you only have the option to define a section name for all bitmaps.

1 Answer

0 votes
by

Hello,

in principle you can create separate Units and put the resources for external QSPI flash into one Unit and the resources for the internal flash into another Unit. Within your linker file you locate the constant data of one C file into external QSPI flash and the constant data of the other C file into internal flash.

However, according to your description, I assume you want to replace some images of the binary - which is always a dangerous approach.

Maybe you should consider to use the Extern Bitmap approach if you want to load images dynamically during runtime.

Best regards,

Manfred.

 

by
Thanks for the reply Manfred. I should have said, this is to enable OTA firmware update rather than replacing images dynamically (where I need to do that I've used ExternBitmap and it has worked very well!). I'm using STM32 so updating the firmware on the internal flash shouldn't be too difficult, to update the QSPI though it needs to be unmapped so I'd like to have some graphics available from internal flash for the UI during that part of the process.

If there's a different approach though that might be better I'd be keen to hear also.
by
In case of a firmware update you need to replace the binary of the internal flash with linked resources into the QSPI flash. As long as the linker puts the resources every build to the same location (same address) within the QSPI flash, this approach will work. As soon as you there are some changes, the entire QSPI flash has to be updated as well.
by
Thanks Manfred. I'm thinking of a case where both the firmware and the QSPI resources are updated. The new firmware will boot and then it can update the QSPI with the new resources but while it's doing this I'd like EW to be able to display some simple graphics showing progress. The resources for that would need to be in the internal flash though. Splitting the bitmaps into separate units sounds like a reasonable approach, but also wondering how people are handling OTA with EW in general as I would think it's a common requirement.
by
OTA firmware updating is always very specific... depending on available memory during update, rollback scenarios, ...
One idea could be to have a separate update binary (with a minimum UI) that is launched to receive the update and to update the flash memories.
by
Thanks Manfred. One last question: if I boot and then only show screens with bitmaps/font/strings that are in internal flash is there any possibility that resources that are in QSPI will be accessed - i.e. is there any pre-fetch or speculative loading of resources that aren't being displayed?
by
Hi,

if the entire GUI application is using only resources and constants that are located in the internal flash, there will be no access from Embedded Wizard Graphics Engine or Runtime Environment to the QSPI flash. There is no speculative loading or prefetching.

Please be aware that (depending on the MPU settings) the ARM core will do such things...

Best regards,

Manfred.

Embedded Wizard Website | Privacy Policy | Imprint

...