__RODATA array data missing (filled with zeros)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

__RODATA array data missing (filled with zeros)

913 Views
nagl
Contributor I

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.

0 Kudos
3 Replies

716 Views
lpcxpresso_supp
NXP Employee
NXP Employee

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

0 Kudos

716 Views
nagl
Contributor I

Thanks for your answer. However, the presets look reasonable for me. Nevertheless, the array reads zeros.

Bildschirmfoto 2018-10-26 um 00.06.33.pngBildschirmfoto 2018-10-26 um 00.09.45.png

0 Kudos

716 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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:

pastedImage_1.png

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos