QSPI XiP J-Link programming in MCUXpresso of K82 fails

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

QSPI XiP J-Link programming in MCUXpresso of K82 fails

Jump to solution
1,545 Views
deniscollis
Contributor V

Scenario:

  • Kinetis K82
  • Micron  MT25TL01GHBB8E12 (Dual QSPI, 2x64MByte)
  • MCUXpresso v11.5.0
  • Segger J-Link Debug Probe
  • Single-Wire (SW) Debug/Programming
  • Linker Script /startup/k8x.ld (Unmanaged by MCUXpresso), excerpts below
MEMORY
{
  /* Define each memory region, ensuring each is 4K sector aligned */
  PROGRAM_FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x040000 /* 256K bytes (alias Flash)     */
  EXT_PGM_FLASH (rx) : ORIGIN = 0x04000000, LENGTH = 0x060000 /* 384K bytes (alias Flash2)    */
  /*  Note: 0x04000000-0x0405FFFF is XiP alias for 0x68000000-0x6805FFFF  */
  SRAM_LOWER   (rwx) : ORIGIN = 0x1fff0000, LENGTH = 0x010000 /*  64K bytes (alias RAM2)      */
  SRAM_UPPER   (rwx) : ORIGIN = 0x20000000, LENGTH = 0x030000 /* 192K bytes (alias RAM)       */
  /*  Note: 0x68000000-0x6805FFFF reserved for XiP 0x04000000-0x0405FFFF (AKA EXT_PGM_FLASH)    */
}

//------------  CUT -----------------------

    .text_Flash2 : ALIGN(4)
    {
       FILL(0xff)
        *(.text_Flash2*)
        *(.text_EXT_PGM_FLASH*)
        *(.text.$Flash2*)
        *(.text.$EXT_PGM_FLASH*)
        *(.rodata.$Flash2*)
        *(.rodata.$EXT_PGM_FLASH*)
    } > EXT_PGM_FLASH

 

Code:

const TsBigBitMap __attribute__((used, section (".text_Flash2"))) ipsLogo_bmp =
{
  3,     // BitMapType
  512,   // width_pixels
  384,   // height_pixels
  192,   // width_bytes
  73728, // byte_count
  {
    0xFF, 0x4F, 0x92, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24, 0xC9,
--------------- CUT -------------  (many lines)
    0x37, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0xA4, 0xFF,
  }
};

Build:

Memory region         Used Size  Region Size  %age Used
   PROGRAM_FLASH:      112200 B       256 KB     42.80%
   EXT_PGM_FLASH:      150552 B       384 KB     38.29%
      SRAM_LOWER:          0 GB        64 KB      0.00%
      SRAM_UPPER:       79408 B       192 KB     40.39%
   TERM_SETTINGS:          0 GB        96 KB      0.00%
   MODULE_CONFIG:          0 GB        32 KB      0.00%
      OTA_UPDATE:          0 GB         1 MB      0.00%
Finished building target: DisplayMk7.axf

 

Debug:

Board programs without error, but I do not notice the 2nd progress bar for flash bank 1 (external SQPI).  When I F8 (Resume) the board runs.  It reads the data from the external flash, but this is all 0xFF (just a white image is displayed)

Help needed:

Any ideas?

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
1,393 Views
deniscollis
Contributor V
0 Kudos
Reply
2 Replies
1,394 Views
deniscollis
Contributor V

Solution is related to solution posted here: How to place const data in K8x External QSPI flash

0 Kudos
Reply
1,522 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

Hi @deniscollis , is there any way that you share or give us more details of how and what are you doing? in such a way that we replay your issue and see what are happen.

Are you using a custom board?

best regards

0 Kudos
Reply