2025-05-01 10:59 AM
Hi I've been trying to display an image on the GUI using an image (hex array) stored in the QSPI flash (memory mapped). I've taken a look at some of the documentation such as Loading Images at Runtime & Dynamic Bitmaps.
void LandingView::loadImageFromQSPI(Image& imageWidget)
{
BitmapId bmpId = Bitmap::dynamicBitmapCreateExternal(
185,
43,
(const void*)0x90FC0000,
Bitmap::RGB565
);
if (bmpId != BITMAP_INVALID)
{
imageWidget.setBitmap(Bitmap(bmpId));
imageWidget.invalidate(); // To trigger redraw
}
}
FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap)
: FrontendApplicationBase(m, heap)
{
Bitmap::setCache(touchgfxCache, sizeof(touchgfxCache));
}
When debugging, I keep getting BITMAP_INVALID? I've made sure I'm in memory mapped mode.
2025-05-01 11:07 AM
Dump the memory content at 0x90FC0000 visible to the MCU, perhaps the first 64 or 128 bytes to a serial terminal, so someone can make an assessment as to whether this is consistent with the described bitmap, or NOT