Skip to main content
Graduate II
September 5, 2024
Solved

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

  • September 5, 2024
  • 2 replies
  • 1365 views

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

 

 

 

 

 

    This topic has been closed for replies.
    Best answer by jr_engr_mbed

    here, is update --> i got able to enable norflash and load imgs., what i did is replaces actual flash which is 128mbits which is come along with eval-brd.. so, there is no data mismatch error occur.. so, this error is solved.. thank you.

    2 replies

    Technical Moderator
    September 5, 2024

    @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

     

     

    Graduate II
    September 5, 2024

    "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?

    Graduate II
    September 5, 2024

    as this is shows, with just touchgfx enabled..

    Screenshot (1413).png

    Screenshot (1411).png

    jr_engr_mbedAuthorAnswer
    Graduate II
    October 21, 2024

    here, is update --> i got able to enable norflash and load imgs., what i did is replaces actual flash which is 128mbits which is come along with eval-brd.. so, there is no data mismatch error occur.. so, this error is solved.. thank you.