We are testing a modified emwin_touch_and_draw example.
There we would like to offload bitmap data to the SPIFI flash. The bitmap was converted using "Bitmap converter". Then we modified the array definition like this:
static __RODATA(Flash2) const unsigned char _aclogo[] = {
/* RLE: 004 Pixels @ 000,000 */ 4, 0xE3, 0x18,
...
}
Compiling and uploading works. However, the variable _aclogo is filled with zeros rather then pixel data in the debugger and instead of the image, there is a black box appearing on the display.
What could be the reason for this problem? The memory in the project properties configuration looks reasonable.
I suspect that your project hasn't actually enabled the SPIFI flash correctly. The following thread and its attached example code should help
How to use __RODATA macro from <cr_section_macros.h>?
Regards,
MCUXpresso IDE Support
Thanks for your answer. However, the presets look reasonable for me. Nevertheless, the array reads zeros.
Hi Matthias Nagl,
Check your flash2 definition, do you choose the correct SPIFI address ?
After you select the correct address, you also need to select the correct SPIFI flash driver:
After you select it, build the project, check the memory map, whether the address is in the SPIFI adress, then enter debug mode, and check the address memory.
If you still have problem, give me the memory address window about your _aclogo.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------