cancel
Showing results for 
Search instead for 
Did you mean: 

Error Occurs When IMG Data is Moved to NOR Flash in Linker

jr_engr_mbed
Senior

I encountered an issue where an error occurs when only the image data is moved to NOR Flash in the linker. I have already verified that the NOR Flash works correctly in a separate project by toggling the LEDs.

In my current TouchGFX project, I enabled the NOR Flash in the IDE, and I am able to read the data in the memory browser, confirming that the same data is present.

However, when I choose my custom loader in the debug configuration and try to debug, 

 

If I remove the ext_flash section from the linker, I am able to debug and see the data in the memory browser.but its just txbuffer data(0xD20F- increases) My question is, if this error is resolved, will I be able to see the image data in the memory browser? This would help me confirm that the NOR Flash is indeed storing the image data correctly.

 

Any insights on why this might be happening or suggestions for resolving this issue?I get the following error:

Screenshot (1383).png

 

 

 

 

 ExtFlashSection :
  {
    . = ALIGN(4);
    *(.ExtFlashSection)     
    *(.ext_flash*)          
    KEEP(*(.image*))        
    KEEP(*(.img*))          
    KEEP(*(.assets*))       
    . = ALIGN(4);
  } >EXT_FLASH

 

 

 

 

 

4 REPLIES 4
SofLit
ST Employee

@jr_engr_mbed wrote:

will I be able to see the image data in the memory browser? This would help me confirm that the NOR Flash is indeed storing the image data correctly.

 


You said that the content of the Flash is OK. How are you sure? are you using CubeProgrammer? if yes, did you check the content when reading the Flash NOR, then compare it to what was shown in the CubeIDE debugger?

Also, did you add your loader in the CubeIDE in Debugger menu?

Example:

SofLit_0-1725547347887.pngSofLit_1-1725547443529.png

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

"Yes, I am using the loader with CubeProgrammer and CubeIDE. As you asked me to check if the same data occurs, I will show you what I receive in both cases.

This is working in a separate NOR flash program without TouchGFX, as I can see the correct output."

Screenshot (1401).png

Screenshot (1405).png

 

“With TouchGFX, I can see the same output in both runs. However, when I debug multiple times, I occasionally get some 0xFFFF data in between. Could this indicate that my loader is not working correctly, assuming the NOR flash was the only memory enabled in the first program run?”

if img present in norflash which manually puts 

LOCATION_PRAGMA("ExtFlashSection")

KEEP extern const unsigned char image_alternate_theme_images_widgets_imageprogress_styled_batteries_battery_large[] LOCATION_ATTRIBUTE("ExtFlashSection") = { // 110x40 RGB565 pixels.

0x00, 0x00, 0x00, 0x00, 0x92.....)... i gets error?

  

  as this is shows, with just touchgfx enabled..

Screenshot (1413).png

Screenshot (1411).png

yes, added loader .
if loader added, i can see same output in cubeprogrammer..but, values not same in tx&rx buffer

 

 

  

Screenshot (1415).png

 

 

"So, is the issue that my loader might not be suitable? I imported the  external loader in ewarm-project into IAR, made changes to dev_inf.c, and generated the loader. I followed this approach because the provided loader is specifically for the H743I-EVAL, and the two Micron flash devices differs in size and page read buffer. Should I follow each step exactly as outlined, including removing headers, source files, and HAL driver include files as mentioned? Would this be necessary to avoid getting 0xFFFFFF values when reading memory?"