Running and debugging program in SDRAM

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

Running and debugging program in SDRAM

1,368 Views
abs_setian
Contributor II

Hi everyone

I'm using RT1050 mcu, MCUXpresso 11.5, sdk 2.11.1 and FreeRTOS

I'm trying to use this device in various cases, I've successfully compiled and debugged a project running in flash.

Now I'm trying to do the same thing in external SDRAM, but with no success.

 

 

I've modified the project settings:

abs_setian_6-1709710719867.png

 

abs_setian_1-1709710388080.pngabs_setian_2-1709710413550.png

abs_setian_3-1709710501110.pngabs_setian_4-1709710514691.png

 

 

From the console debug messages it seems that the program can't access memory.

abs_setian_5-1709710669174.png

MCUXpresso IDE RedlinkMulti Driver v11.5 (Dec 16 2021 12:38:31 - crt_emu_cm_redlink build 2)
Found chip XML file in D:/PROJECT/NRT430/src/kmapp_debug/Debug\MIMXRT1052xxxxB.xml
Reconnected to existing LinkServer process.
============= SCRIPT: RT1050_SDRAM_Init.scp =============
RT1050 SDRAM Initialisation
Clock Init Done
SDRAM Init Done
============= END SCRIPT ================================
Probe Firmware: MCU-LINK (r0FF) CMSIS-DAP V2.250 (NXP Semiconductors)
Serial Number: N1MRPGLLIAIJT
VID:PID: 1FC9:0143
USB Path: \\?\hid#vid_1fc9&pid_0143&mi_00#8&253ee304&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
debug interface type = CoreSight DP (DAP DP ID 0BD11477) over SWD TAP 0
processor type = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
number of h/w breakpoints = 8
number of flash patches = 0
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 0BD11477. CpuID: 00000C27. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
ROM 1 E0040000: CID B105900D PID 04000BB9A9 CSt type 0x11 Trace Sink - TPIU
ROM 1 E0043000: CID B105F00D PID 04001BB101 Sys (type 0x0)
NXP: MIMXRT1052xxxxB
DAP stride is 1024 bytes (256 words)
Connected: was_reset=false. was_stopped=false
Awaiting telnet connection to port 3330 ...
GDB nonstop mode enabled
FreeRTOS stack backtrace is disabled in Non-stop mode (use All-stop)
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Write Memory: Em(17). Debug port inaccessible after access at location 0x80181400
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Read Memory: Em(17). Debug port inaccessible after access at location 0x812B3940
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Read Memory: Em(17). Debug port inaccessible after access at location 0x812B397C
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Read Memory: Em(17). Debug port inaccessible after access at location 0x812B3940
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Read Memory: Em(17). Debug port inaccessible after access at location 0x812B397C
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Read Memory: Em(17). Debug port inaccessible after access at location 0x812B3940
request to clear DAP error failed - status 5
After error Nn(05). Wire ACK Fault in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Fault in DAP access
Target error from Read Memory: Em(17). Debug port inaccessible after access at location 0x812B3974
GDB stub (C:\nxp\MCUXpressoIDE_11.5.0_7232\ide\plugins\com.nxp.mcuxpresso.tools.bin.win32_11.5.0.202112161150\binaries\crt_emu_cm_redlink) terminating - GDB protocol problem: Pipe has been closed by GDB.
request to clear DAP error failed - status 5
request to clear DAP error failed - status 5
error closing down debug session - Nn(05). Wire ACK Fault in DAP access

abs_setian_7-1709710830761.png

What am I missing to debug a program in SDRAM?

 

Many thanks

Setian

 

 

Labels (1)
Tags (3)
0 Kudos
Reply
3 Replies

1,346 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @abs_setian,

Please follow the following knowledge base article to execute a mass erase and recover debug connection with the core: RT board recovery for debugger connect issues - NXP Community

Then, you can follow this other post to generate an image executable by RAM: Generating a Bootable Image for the RT1050 - NXP Community

Let me know if it helps!

BR,
Edwin.

0 Kudos
Reply

1,294 Views
abs_setian
Contributor II

Hello Sir,

First of all . Thanks for reply.

But what I need is that the way to Debugging on ram, not Write application to Ram.

And I almost give up..

Thanks for your care.

Have a good day sir.

 

 

0 Kudos
Reply

1,283 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @abs_setian,

Thanks for the clarification. In that case, you can follow these other two community posts. This first one is for the RT1170, but it describes the steps necesary to achieve RAM debugging:

Solved: RT1170 debugging when application is built for SDRAM - NXP Community

Next, attached to this post is a sample project for the RT1064, which can be useful for your RT1050 as well:

Solved: Can't debug code link to RAM with Jlink - NXP Community

BR,
Edwin.