16: Target error from status-poll 16: Target error from status-poll Wire ACK Wait in DAP access

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

16: Target error from status-poll 16: Target error from status-poll Wire ACK Wait in DAP access

Jump to solution
5,348 Views
zhongshen
Contributor III

I update my system from ubuntu 14.04 to 18.04. And re-download MCUXpresso IDE from NXP web. And I build  a sample program from SDK for RT1050-EVK, and debug it on the RT1050. The download axf to the target is fine, the debug window show to step to main, when I click one step, I got the error as following, and it can not back to the debug windows and untill I force to end the arm-none-eabi-gdb process!

16: Target error from status-poll
16: Target error from status-poll
Wire ACK Wait in DAP access
Debugging context: evkmimxrt1050_pit LinkServer Debug

And I reduced the wire speed to 1000000 HZ, according to the 16: Target error from status-poll: Ee(02). Not connected to emulator , but the problem still exist. Please advise me how to solve this problem.

Thanks.

Screenshot from 2018-07-04 09-52-41.png

Labels (1)
0 Kudos
1 Solution
4,307 Views
lpcxpresso_supp
NXP Employee
NXP Employee

If you are wanting to debug an image running from RAM rather than flash, then it might be worth doing a mass erase of the flash to ensure that no code that has been previously loaded into flash is executed before you execute code downloaded into RAM. You can do this using the IDE's GUI Flash Tool (described in chapter 13 of the MCUXpresso IDE v10.2 User Guide).

Aside. Please be aware that the current SDK version is 2.4 (rather than the 2.3.0 version you are using). It might be worth you downloading the new version and replacing your currently installed package.

Regards,

MCUXpresso IDE Support

View solution in original post

0 Kudos
10 Replies
4,308 Views
lpcxpresso_supp
NXP Employee
NXP Employee

If you are wanting to debug an image running from RAM rather than flash, then it might be worth doing a mass erase of the flash to ensure that no code that has been previously loaded into flash is executed before you execute code downloaded into RAM. You can do this using the IDE's GUI Flash Tool (described in chapter 13 of the MCUXpresso IDE v10.2 User Guide).

Aside. Please be aware that the current SDK version is 2.4 (rather than the 2.3.0 version you are using). It might be worth you downloading the new version and replacing your currently installed package.

Regards,

MCUXpresso IDE Support

0 Kudos
4,307 Views
zhongshen
Contributor III

I have updated SDK2.4.1 for EVKB-IMXRT1050. The debug problem fixed.

Thank you!

0 Kudos
4,307 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Can you please post the text from the "Debug messages",  "RedlinkServer" and "gdb traces" logs from the Console view from after you see this problem. See section 18.8, "The Console View", of the MCUXpresso IDE v10.2 User Guide for details of how to do this.

 

Can you also confirm the exact SDK package and version you are using (as shown in the "Installed SDKs" view), and whether you are debugging your application running from Flash or from RAM (in which case, which block)?

 

Regards,

MCUXpresso IDE Support

0 Kudos
4,307 Views
zhongshen
Contributor III

SDK version is 2.3.0. As it is sample from SDK and do not have any change in the project files, the application is debugged, which running in the RAM. And the content of evkmimxrt1050_pit_Debug_memory.ld is following:

/*
* GENERATED FILE - DO NOT EDIT
* (c) Code Red Technologies Ltd, 2008-2013
* (c) NXP Semiconductors 2013-2018
* Generated linker script file for MIMXRT1052xxxxx
* Created from memory.ldt by FMCreateLinkMemory
* Using Freemarker v2.3.23
* MCUXpresso IDE v10.2.0 [Build 759] [2018-05-15] on Jul 12, 2018 8:57:47 AM
*/

MEMORY
{
/* Define each memory region */
BOARD_FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 0x4000000 /* 64M bytes (alias Flash) */
SRAM_DTC (rwx) : ORIGIN = 0x20000000, LENGTH = 0x20000 /* 128K bytes (alias RAM) */
SRAM_ITC (rwx) : ORIGIN = 0x0, LENGTH = 0x20000 /* 128K bytes (alias RAM2) */
SRAM_OC (rwx) : ORIGIN = 0x20200000, LENGTH = 0x40000 /* 256K bytes (alias RAM3) */
BOARD_SDRAM (rwx) : ORIGIN = 0x80000000, LENGTH = 0x2000000 /* 32M bytes (alias RAM4) */
}

/* Define a symbol for the top of each memory region */
__base_BOARD_FLASH = 0x60000000 ; /* BOARD_FLASH */
__base_Flash = 0x60000000 ; /* Flash */
__top_BOARD_FLASH = 0x60000000 + 0x4000000 ; /* 64M bytes */
__top_Flash = 0x60000000 + 0x4000000 ; /* 64M bytes */
__base_SRAM_DTC = 0x20000000 ; /* SRAM_DTC */
__base_RAM = 0x20000000 ; /* RAM */
__top_SRAM_DTC = 0x20000000 + 0x20000 ; /* 128K bytes */
__top_RAM = 0x20000000 + 0x20000 ; /* 128K bytes */
__base_SRAM_ITC = 0x0 ; /* SRAM_ITC */
__base_RAM2 = 0x0 ; /* RAM2 */
__top_SRAM_ITC = 0x0 + 0x20000 ; /* 128K bytes */
__top_RAM2 = 0x0 + 0x20000 ; /* 128K bytes */
__base_SRAM_OC = 0x20200000 ; /* SRAM_OC */
__base_RAM3 = 0x20200000 ; /* RAM3 */
__top_SRAM_OC = 0x20200000 + 0x40000 ; /* 256K bytes */
__top_RAM3 = 0x20200000 + 0x40000 ; /* 256K bytes */
__base_BOARD_SDRAM = 0x80000000 ; /* BOARD_SDRAM */
__base_RAM4 = 0x80000000 ; /* RAM4 */
__top_BOARD_SDRAM = 0x80000000 + 0x2000000 ; /* 32M bytes */
__top_RAM4 = 0x80000000 + 0x2000000 ; /* 32M bytes */

And "Debug messages" is following:

MCUXpresso IDE RedlinkMulti Driver v10.2 (May 10 2018 18:13:29 - crt_emu_cm_redlink build 510)
Found chip XML file in /home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/Debug/MIMXRT1052xxxxx.xml
( 5) Remote configuration complete
Reconnected to existing link server
Connecting to probe 1 core 0:0 (using server started externally) gave 'OK'
Probe Firmware: DAPLink CMSIS-DAP (ARM)
Serial Number: 0227000041114e450057300cc40300465ab1000097969900
VID:PID: 0D28:0204
USB Path: /dev/hidraw0
Using memory from core 0:0 after searching for a good core
debug interface type = Cortex-M7 (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 dev (type 0x1)
ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM dev (type 0x1)
ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM dev (type 0x1)
ROM 3 E000E000: CID B105E00D PID 04000BB00C ChipIP dev SCS (type 0x0)
ROM 3 E0001000: CID B105E00D PID 04000BB002 ChipIP dev DWT (type 0x0)
ROM 3 E0002000: CID B105E00D PID 04000BB00E ChipIP dev (type 0x0)
ROM 3 E0000000: CID B105E00D PID 04000BB001 ChipIP dev ITM (type 0x0)
ROM 2 E0041000: CID B105900D PID 04001BB975 ARCH 23B:4A13r0 CoreSight dev type 0x13 Trace Source - core
ROM 2 E0042000: CID B105900D PID 04004BB906 CoreSight dev type 0x14 Debug Control - Trigger, e.g. ECT
ROM 1 E0040000: CID B105900D PID 04000BB9A9 CoreSight dev type 0x11 Trace Sink - TPIU
ROM 1 E0043000: CID B105F00D PID 04001BB101 System dev (type 0x0)
CM7 Rev. 7.0 DTCM: 512KB ITCM: 512KB
LoUU: Level 2: LoC: Level 2
Level 1 Cache Type: Instruction+Data
ICache 32K: WT: Y WB: Y RA: Y WA: Y NumSets: 512 Assoc: 2 LineSize: 8
DCache 32K: WT: Y WB: Y RA: Y WA: Y NumSets: 256 Assoc: 4 LineSize: 8
Inspected v.2 External Flash Device on SPI MIMXRT1050-EVK_S26KS512S.cfx
Image 'MIMXRT1050-EVK_S26KS512SOct 19 2017 16:37:47'
Opening flash driver MIMXRT1050-EVK_S26KS512S.cfx
Sending VECTRESET to run flash driver
flash variant 'S26KS512S' detected (64MB = 256*256K at 0x60000000)
Closing flash driver MIMXRT1050-EVK_S26KS512S.cfx
Non-standard DAP stride detected - 1024 bytes
NXP: MIMXRT1052xxxxx
( 65) Chip Setup Complete
Connected: was_reset=true. was_stopped=false
Awaiting telnet connection to port 3330 ...
GDB nonstop mode enabled
Starting execution using soft reset with PC 0x20000341 SP 0x20020000 from load at 0x20000000
Stopped: Breakpoint #1
Stopped: Step
Stopped: Step
Stopped: Step
Stopped: Step
Stopped: Breakpoint #1
Stopped: Step
Stopped: Step
Stopped: Step
Stopped: Step
Stopped: Step
Stopped: Step
Stopped: Step
Target error from status-poll: Nn(05). Wire ACK Wait in DAP access
Unknown/broken state: Nn(05). Wire ACK Wait in DAP access: <cannot read registers>Unknown
Target error from Register access: Nn(05). Wire ACK Wait in DAP access
nonstop - GDB killing (vKill) non-existent PID 0xA410 (killing anyway)
GDB stub (crt_emu_cm_redlink) terminating - GDB protocol problem: Pipe has been closed by GDB.

And "RedlinkServer":

[Started server]
[Connected on port 3025]
redlink>ProbeList
Index = 1
Manufacturer = ARM
Description = DAPLink CMSIS-DAP
Serial Number = 0227000041114e450057300cc40300465ab1000097969900
VID:PID = 0D28:0204
Path = /dev/hidraw0
redlink>ProbeStatus
Index = 1
Manufacturer = ARM
Description = DAPLink CMSIS-DAP
Serial Number = 0227000041114e450057300cc40300465ab1000097969900
VID:PID = 0D28:0204
Path = /dev/hidraw0
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 64
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink>ProbeIsOpen 1
FALSE
redlink>ProbeOpenByIndex 1
Probe Handle 1 Open
redlink>WireIsConnected 1
FALSE
redlink>WireSwdConnect 1
DpID = 0BD11477
redlink>CoresConfigured 1
FALSE
redlink>CoreConfig 1
Number of CORES/TAPs = 1, Fully recognized: True
redlink>ProbeStatus
Index = 1
Manufacturer = ARM
Description = DAPLink CMSIS-DAP
Serial Number = 0227000041114e450057300cc40300465ab1000097969900
VID:PID = 0D28:0204
Path = /dev/hidraw0
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 64
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink>quit
[Closed]
[Connected on port 3025]
Error reading from server (redlinkserv):
Read timed out

The "gdb traces" is following:

069,114 2-list-thread-groups
069,115 2^done,groups=[{id="i1",type="process"}]
069,118 (gdb)
072,825 3-gdb-version
072,826 ~"GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git\n"
072,826 ~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
072,826 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
072,827 ~"This GDB was configured as \"--host=x86_64-linux-gnu --target=arm-none-eabi\".\nType \"sho\
w configuration\" for configuration details."
072,827 ~"\nFor bug reporting instructions, please see:\n"
072,827 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
072,827 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/soft\
ware/gdb/documentation/>.\n"
072,827 ~"For help, type \"help\".\n"
072,827 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
072,827 3^done
072,827 (gdb)
072,835 4-environment-cd /home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit
072,835 4^done
072,835 (gdb)
072,836 5-gdb-set breakpoint pending on
072,836 5^done
072,836 (gdb)
072,837 6-enable-pretty-printing
072,837 6^done
072,837 (gdb)
072,838 7-gdb-set python print-stack none
072,838 7^done
072,838 (gdb)
072,839 8-gdb-set print object on
072,839 8^done
072,839 (gdb)
072,839 9-gdb-set print sevenbit-strings on
072,839 9^done
072,839 (gdb)
072,840 10-gdb-set charset ISO-8859-1
072,840 10^done
072,840 (gdb)
072,841 11-gdb-set auto-solib-add on
072,841 11^done
072,841 (gdb)
072,854 12-file-exec-and-symbols --thread-group i1 /home/robert/Documents/MCUXpresso_10.2.0_759/work\
space/evkmimxrt1050_pit/Debug/evkmimxrt1050_pit.axf
072,859 12^done
072,859 (gdb)
072,864 13-interpreter-exec console "set non-stop on"
072,865 =cmd-param-changed,param="non-stop",value="on"
072,865 13^done
072,865 (gdb)
072,866 14-interpreter-exec console "set pagination off"
072,866 =cmd-param-changed,param="pagination",value="off"
072,866 14^done
072,866 (gdb)
072,867 15-interpreter-exec console "set mi-async"
072,867 =cmd-param-changed,param="mi-async",value="on"
072,867 15^done
072,867 (gdb)
072,868 16-interpreter-exec console "set non-stop on"
072,868 16^done
072,868 (gdb)
072,869 17-interpreter-exec console "set pagination off"
072,869 17^done
072,869 (gdb)
072,870 18-interpreter-exec console "set mi-async"
072,870 18^done
072,870 (gdb)
072,871 19-interpreter-exec console "set remotetimeout 60000"
072,871 =cmd-param-changed,param="remotetimeout",value="60000"
072,872 19^done
072,872 (gdb)
073,703 20-target-select extended-remote | crt_emu_cm_redlink -msg-port=42255 -g -mi -2 -pMIMXRT1052\
xxxxx -vendor=NXP --no-packed --cachelib libm7_cache.so -reset= -ProbeHandle=1 -CoreIndex=0 -cache=d\
isable -x /home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/Debug --flash-dir\
/home/robert/mcuxpresso/01/.mcuxpressoide_packages_support/MIMXRT1052xxxxx_support/Flash --telnet 3\
330
074,641 =thread-group-started,id="i1",pid="42000"
074,641 =thread-created,id="1",group-id="i1"
074,641 *running,thread-id="1"
074,673 ~"\nProgram"
074,673 ~" stopped.\n"
074,718 ~"0x60004206 in ?? ()\n"
074,718 *stopped,reason="signal-received",signal-name="0",signal-meaning="Signal 0",frame={addr="0x6\
0004206",func="??",args=[]},thread-id="1",stopped-threads=["1"]
074,718 20^connected
074,718 (gdb)
074,723 21-interpreter-exec console "set mem inaccessible-by-default off"
074,723 =cmd-param-changed,param="mem inaccessible-by-default",value="off"
074,724 21^done
074,724 (gdb)
074,724 22-interpreter-exec console "mon ondisconnect cont"
074,725 22^done
074,725 (gdb)
074,725 23-interpreter-exec console "set arm force-mode thumb"
074,725 =cmd-param-changed,param="arm force-mode",value="thumb"
074,725 23^done
074,725 (gdb)
074,728 24-interpreter-exec console "mon capabilities"
074,728 24^done
074,729 (gdb)
074,730 25-interpreter-exec console "set remote hardware-breakpoint-limit 6"
074,730 =cmd-param-changed,param="remote hardware-breakpoint-limit",value="6"
074,730 25^done
074,730 (gdb)
074,736 26-interpreter-exec console "mon semihost enable"
074,736 26^done
074,737 (gdb)
074,738 27-data-list-register-names
074,738 27^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12",\
"sp","lr","pc","","","","","","","","","","xpsr","","","","","","","","","","","","","","","","","",\
"","","","","","","","","","","","","","","","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","d10"\
,"d11","d12","d13","d14","d15","","","","","","","","","","","","","","","","","fpscr","cycles","fpc\
cr","fpcar","fpdscr","mvfr0","mvfr1","s0","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","\
s12","s13","s14","s15","s16","s17","s18","s19","s20","s21","s22","s23","s24","s25","s26","s27","s28"\
,"s29","s30","s31"]
074,738 (gdb)
074,740 28-target-download
074,951 29-list-thread-groups
075,379 28+download,{section=".text",section-size="19032",total-size="134510"}
075,379 28+download,{section=".text",section-sent="16144",section-size="19032",total-sent="16144",to\
tal-size="134510"}
075,500 28+download,{section=".data",section-size="4",total-size="134510"}
075,606 28^done,address="0x20000340",load-size="19036",transfer-rate="200640",write-rate="6345"
075,606 (gdb)
075,607 29^done,groups=[{id="i1",type="process",pid="42000",executable="/home/robert/Documents/MCUXp\
resso_10.2.0_759/workspace/evkmimxrt1050_pit/Debug/evkmimxrt1050_pit.axf"}]
075,607 (gdb)
075,617 30-gdb-show --thread-group i1 language
075,618 30^done,value="auto"
075,618 (gdb)
075,620 31-gdb-set --thread-group i1 language c
075,620 31^done
075,620 (gdb)
075,623 32-interpreter-exec --thread-group i1 console "p/x (char)-1"
075,624 ~"$1 = 0xff\n"
075,624 32^done
075,624 (gdb)
075,627 33-data-evaluate-expression --thread-group i1 "sizeof (void*)"
075,627 33^done,value="4"
075,628 34-list-thread-groups i1
075,628 (gdb)
075,629 35-gdb-set --thread-group i1 language auto
075,632 34^done,threads=[{id="1",target-id="Thread 1",details="Runnable",name="",frame={level="0",ad\
dr="0x20000340",func="ResetISR",args=[],file="../startup/startup_mimxrt1052.c",fullname="/home/rober\
t/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/startup/startup_mimxrt1052.c",line="67\
7"},state="stopped"}]
075,633 (gdb)
075,633 35^done
075,633 (gdb)
075,635 36-interpreter-exec --thread-group i1 console "show endian"
075,635 ~"The target endianness is set automatically (currently little endian)\n"
075,635 36^done
075,635 (gdb)
075,641 37-stack-info-depth --thread 1 11
075,642 37^done,depth="1"
075,642 (gdb)
075,647 38-break-insert -f /home/robert/Documents/MCUXpresso_10.1.1_606/workspace/evkmimxrt1050_driv\
er_examples_gpio_igpio_input_interrupt/source/gpio_input_interrupt.c:111
075,648 &"No source file named /home/robert/Documents/MCUXpresso_10.1.1_606/workspace/evkmimxrt1050_\
driver_examples_gpio_igpio_input_interrupt/source/gpio_input_interrupt.c.\n"
075,648 38^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending=\
"/home/robert/Documents/MCUXpresso_10.1.1_606/workspace/evkmimxrt1050_driver_examples_gpio_igpio_inp\
ut_interrupt/source/gpio_input_interrupt.c:111",times="0",original-location="/home/robert/Documents/\
MCUXpresso_10.1.1_606/workspace/evkmimxrt1050_driver_examples_gpio_igpio_input_interrupt/source/gpio\
_input_interrupt.c:111"}
075,649 (gdb)
075,656 39-break-insert -t -h -f main
075,667 39^done,bkpt={number="2",type="hw breakpoint",disp="del",enabled="y",addr="0x20000d4a",func=\
"main",file="../source/pit.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmi\
mxrt1050_pit/source/pit.c",line="80",thread-groups=["i1"],times="0",original-location="main"}
075,667 (gdb)
075,670 40-exec-continue --thread-group i1
075,671 40^running
075,671 *running,thread-id="1"
075,828 41-thread-info 1
075,933 42-thread-select 1
075,936 43-thread-select 1
075,974 (gdb)
076,244 41^done,threads=[{id="1",target-id="Thread 1",details=" ",name="",state="running"}]
076,245 (gdb)
076,274 =breakpoint-modified,bkpt={number="2",type="hw breakpoint",disp="del",enabled="y",addr="0x20\
000d4a",func="main",file="../source/pit.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/wo\
rkspace/evkmimxrt1050_pit/source/pit.c",line="80",thread-groups=["i1"],times="1",original-location="\
main"}
076,286 ~"\n"
076,286 ~"Temporary breakpoint 2, main () at ../source/pit.c:80\n"
076,286 ~"80\t LED_INIT();\n"
076,286 *stopped,reason="breakpoint-hit",disp="del",bkptno="2",frame={addr="0x20000d4a",func="main",\
args=[],file="../source/pit.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkm\
imxrt1050_pit/source/pit.c",line="80"},thread-id="1",stopped-threads=["1"]
076,286 =breakpoint-deleted,id="2"
076,286 42^done,new-thread-id="1",frame={level="0",addr="0x20000d4a",func="main",args=[],file="../so\
urce/pit.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/sourc\
e/pit.c",line="80"}
076,286 (gdb)
076,286 43^done,new-thread-id="1",frame={level="0",addr="0x20000d4a",func="main",args=[],file="../so\
urce/pit.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/sourc\
e/pit.c",line="80"}
076,286 (gdb)
076,291 44-stack-info-depth --thread 1 11
076,291 44^done,depth="1"
076,291 (gdb)
076,295 45-stack-select-frame --thread 1 0
076,295 45^done
076,295 (gdb)
076,303 46-thread-info 1
076,303 46^done,threads=[{id="1",target-id="Thread 1",details=" ",name="",frame={level="0",addr="0x2\
0000d4a",func="main",args=[],file="../source/pit.c",fullname="/home/robert/Documents/MCUXpresso_10.2\
.0_759/workspace/evkmimxrt1050_pit/source/pit.c",line="80"},state="stopped"}]
076,303 (gdb)
231,246 47-exec-step --thread 1 1
231,247 47^running
231,247 *running,thread-id="1"
231,524 (gdb)
231,767 48-thread-select 1
231,808 48^done,new-thread-id="1"
231,808 (gdb)
234,258 *stopped,reason="end-stepping-range",frame={addr="0x2000180e",func="GPIO_PinWrite",args=[{na\
me="base",value="0x401b8000"},{name="pin",value="9"},{name="output",value="1 '\\001'"}],file="../dri\
vers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/\
drivers/fsl_gpio.c",line="110"},thread-id="1",stopped-threads=["1"]
234,266 49-stack-info-depth --thread 1 11
234,266 49^done,depth="2"
234,266 (gdb)
234,268 50-stack-select-frame --thread 1 0
234,268 50^done
234,268 (gdb)
234,278 51-thread-info 1
234,285 51^done,threads=[{id="1",target-id="Thread 1",details=" ",name="",frame={level="0",addr="0x2\
000180e",func="GPIO_PinWrite",args=[{name="base",value="0x401b8000"},{name="pin",value="9"},{name="o\
utput",value="1 '\\001'"}],file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_\
10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line="110"},state="stopped"}]
234,285 (gdb)
234,303 52-data-disassemble --thread 1 -s 536877070 -e 536877210 -- 3
234,308 53-stack-list-frames --thread 1
234,317 52^done,asm_insns=[src_and_asm_line={line="110",file="../drivers/fsl_gpio.c",fullname="/home\
/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_ins\
n=[{address="0x2000180e",func-name="GPIO_PinWrite",offset="14",opcodes="bb 68",inst="ldr\tr3, [r7, #\
8]"},{address="0x20001810",func-name="GPIO_PinWrite",offset="16",opcodes="1f 2b",inst="cmp\tr3, #31"\
},{address="0x20001812",func-name="GPIO_PinWrite",offset="18",opcodes="02 d9",inst="bls.n\t0x2000181\
a <GPIO_PinWrite+26>"},{address="0x20001814",func-name="GPIO_PinWrite",offset="20",opcodes="0e 48",i\
nst="ldr\tr0, [pc, #56]\t; (0x20001850 <GPIO_PinWrite+80>)"},{address="0x20001816",func-name="GPIO_P\
inWrite",offset="22",opcodes="01 f0 03 f9",inst="bl\t0x20002a20 <__assertion_failed>"}]},src_and_asm\
_line={line="111",file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_75\
9/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_insn=[{address="0x2000181a",func-name="GP\
IO_PinWrite",offset="26",opcodes="fb 79",inst="ldrb\tr3, [r7, #7]"},{address="0x2000181c",func-name=\
"GPIO_PinWrite",offset="28",opcodes="00 2b",inst="cmp\tr3, #0"},{address="0x2000181e",func-name="GPI\
O_PinWrite",offset="30",opcodes="0a d1",inst="bne.n\t0x20001836 <GPIO_PinWrite+54>"}]},src_and_asm_l\
ine={line="112",file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/\
workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_insn=[]},src_and_asm_line={line="113",file=\
"../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt10\
50_pit/drivers/fsl_gpio.c",line_asm_insn=[{address="0x20001820",func-name="GPIO_PinWrite",offset="32\
",opcodes="fb 68",inst="ldr\tr3, [r7, #12]"},{address="0x20001822",func-name="GPIO_PinWrite",offset=\
"34",opcodes="1a 68",inst="ldr\tr2, [r3, #0]"},{address="0x20001824",func-name="GPIO_PinWrite",offse\
t="36",opcodes="01 21",inst="movs\tr1, #1"},{address="0x20001826",func-name="GPIO_PinWrite",offset="\
38",opcodes="bb 68",inst="ldr\tr3, [r7, #8]"},{address="0x20001828",func-name="GPIO_PinWrite",offset\
="40",opcodes="01 fa 03 f3",inst="lsl.w\tr3, r1, r3"},{address="0x2000182c",func-name="GPIO_PinWrite\
",offset="44",opcodes="db 43",inst="mvns\tr3, r3"},{address="0x2000182e",func-name="GPIO_PinWrite",o\
ffset="46",opcodes="1a 40",inst="ands\tr2, r3"},{address="0x20001830",func-name="GPIO_PinWrite",offs\
et="48",opcodes="fb 68",inst="ldr\tr3, [r7, #12]"},{address="0x20001832",func-name="GPIO_PinWrite",o\
ffset="50",opcodes="1a 60",inst="str\tr2, [r3, #0]"}]},src_and_asm_line={line="114",file="../drivers\
/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/driv\
ers/fsl_gpio.c",line_asm_insn=[]},src_and_asm_line={line="115",file="../drivers/fsl_gpio.c",fullname\
="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_\
asm_insn=[]},src_and_asm_line={line="116",file="../drivers/fsl_gpio.c",fullname="/home/robert/Docume\
nts/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_insn=[]},src_and_\
asm_line={line="117",file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0\
_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_insn=[{address="0x20001836",func-name=\
"GPIO_PinWrite",offset="54",opcodes="fb 68",inst="ldr\tr3, [r7, #12]"},{address="0x20001838",func-na\
me="GPIO_PinWrite",offset="56",opcodes="1a 68",inst="ldr\tr2, [r3, #0]"},{address="0x2000183a",func-\
name="GPIO_PinWrite",offset="58",opcodes="01 21",inst="movs\tr1, #1"},{address="0x2000183c",func-nam\
e="GPIO_PinWrite",offset="60",opcodes="bb 68",inst="ldr\tr3, [r7, #8]"},{address="0x2000183e",func-n\
ame="GPIO_PinWrite",offset="62",opcodes="01 fa 03 f3",inst="lsl.w\tr3, r1, r3"},{address="0x20001842\
",func-name="GPIO_PinWrite",offset="66",opcodes="1a 43",inst="orrs\tr2, r3"},{address="0x20001844",f\
unc-name="GPIO_PinWrite",offset="68",opcodes="fb 68",inst="ldr\tr3, [r7, #12]"},{address="0x20001846\
",func-name="GPIO_PinWrite",offset="70",opcodes="1a 60",inst="str\tr2, [r3, #0]"}]},src_and_asm_line\
={line="118",file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/wor\
kspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_insn=[]},src_and_asm_line={line="119",file="..\
/drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_\
pit/drivers/fsl_gpio.c",line_asm_insn=[{address="0x20001834",func-name="GPIO_PinWrite",offset="52",o\
pcodes="08 e0",inst="b.n\t0x20001848 <GPIO_PinWrite+72>"},{address="0x20001848",func-name="GPIO_PinW\
rite",offset="72",opcodes="00 bf",inst="nop"},{address="0x2000184a",func-name="GPIO_PinWrite",offset\
="74",opcodes="10 37",inst="adds\tr7, #16"},{address="0x2000184c",func-name="GPIO_PinWrite",offset="\
76",opcodes="bd 46",inst="mov\tsp, r7"},{address="0x2000184e",func-name="GPIO_PinWrite",offset="78",\
opcodes="80 bd",inst="pop\t{r7, pc}"},{address="0x20001850",func-name="GPIO_PinWrite",offset="80",op\
codes="88 42",inst="cmp\tr0, r1"},{address="0x20001852",func-name="GPIO_PinWrite",offset="82",opcode\
s="00 20",inst="movs\tr0, #0"},{address="0x20001854",func-name="CLOCK_ControlGate",offset="0",opcode\
s="80 b5",inst="push\t{r7, lr}"},{address="0x20001856",func-name="CLOCK_ControlGate",offset="2",opco\
des="86 b0",inst="sub\tsp, #24"},{address="0x20001858",func-name="CLOCK_ControlGate",offset="4",opco\
des="00 af",inst="add\tr7, sp, #0"},{address="0x2000185a",func-name="CLOCK_ControlGate",offset="6",o\
pcodes="03 46",inst="mov\tr3, r0"},{address="0x2000185c",func-name="CLOCK_ControlGate",offset="8",op\
codes="0a 46",inst="mov\tr2, r1"},{address="0x2000185e",func-name="CLOCK_ControlGate",offset="10",op\
codes="fb 80",inst="strh\tr3, [r7, #6]"},{address="0x20001860",func-name="CLOCK_ControlGate",offset=\
"12",opcodes="13 46",inst="mov\tr3, r2"},{address="0x20001862",func-name="CLOCK_ControlGate",offset=\
"14",opcodes="7b 71",inst="strb\tr3, [r7, #5]"}]}]
234,327 (gdb)
234,328 53^done,stack=[frame={level="0",addr="0x2000180e",func="GPIO_PinWrite",file="../drivers/fsl_\
gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/f\
sl_gpio.c",line="110"},frame={level="1",addr="0x20000d54",func="main",file="../source/pit.c",fullnam\
e="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/source/pit.c",line="80"}\
]
234,328 (gdb)
259,949 54-exec-next --thread 1 1
259,950 54^running
259,950 *running,thread-id="1"
260,224 (gdb)
260,468 55-thread-select 1
260,502 55^done,new-thread-id="1"
260,502 (gdb)
261,742 *stopped,reason="end-stepping-range",frame={addr="0x2000181a",func="GPIO_PinWrite",args=[{na\
me="base",value="0x401b8000"},{name="pin",value="9"},{name="output",value="1 '\\001'"}],file="../dri\
vers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/\
drivers/fsl_gpio.c",line="111"},thread-id="1",stopped-threads=["1"]
261,764 56-stack-info-depth --thread 1 11
261,764 56^done,depth="2"
261,764 (gdb)
261,767 57-stack-select-frame --thread 1 0
261,767 57^done
261,767 (gdb)
261,771 58-thread-info 1
261,777 58^done,threads=[{id="1",target-id="Thread 1",details=" ",name="",frame={level="0",addr="0x2\
000181a",func="GPIO_PinWrite",args=[{name="base",value="0x401b8000"},{name="pin",value="9"},{name="o\
utput",value="1 '\\001'"}],file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_\
10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line="111"},state="stopped"}]
261,778 (gdb)
261,784 59-stack-list-frames --thread 1
261,784 59^done,stack=[frame={level="0",addr="0x2000181a",func="GPIO_PinWrite",file="../drivers/fsl_\
gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/f\
sl_gpio.c",line="111"},frame={level="1",addr="0x20000d54",func="main",file="../source/pit.c",fullnam\
e="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/source/pit.c",line="80"}\
]
261,784 (gdb)
262,465 60-exec-next --thread 1 1
262,466 60^running
262,466 *running,thread-id="1"
262,752 (gdb)
262,984 61-thread-select 1
263,030 61^done,new-thread-id="1"
263,030 (gdb)
264,258 *stopped,reason="end-stepping-range",frame={addr="0x20001836",func="GPIO_PinWrite",args=[{na\
me="base",value="0x401b8000"},{name="pin",value="9"},{name="output",value="1 '\\001'"}],file="../dri\
vers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/\
drivers/fsl_gpio.c",line="117"},thread-id="1",stopped-threads=["1"]
264,278 62-stack-info-depth --thread 1 11
264,279 62^done,depth="2"
264,279 (gdb)
264,281 63-stack-select-frame --thread 1 0
264,281 63^done
264,281 (gdb)
264,285 64-thread-info 1
264,289 65-data-disassemble --thread 1 -s 536877128 -e 536877208 -- 3
264,292 64^done,threads=[{id="1",target-id="Thread 1",details=" ",name="",frame={level="0",addr="0x2\
0001836",func="GPIO_PinWrite",args=[{name="base",value="0x401b8000"},{name="pin",value="9"},{name="o\
utput",value="1 '\\001'"}],file="../drivers/fsl_gpio.c",fullname="/home/robert/Documents/MCUXpresso_\
10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line="117"},state="stopped"}]
264,292 (gdb)
264,298 66-stack-list-frames --thread 1
264,298 65^done,asm_insns=[src_and_asm_line={line="119",file="../drivers/fsl_gpio.c",fullname="/home\
/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/fsl_gpio.c",line_asm_ins\
n=[{address="0x20001848",func-name="GPIO_PinWrite",offset="72",opcodes="00 bf",inst="nop"},{address=\
"0x2000184a",func-name="GPIO_PinWrite",offset="74",opcodes="10 37",inst="adds\tr7, #16"},{address="0\
x2000184c",func-name="GPIO_PinWrite",offset="76",opcodes="bd 46",inst="mov\tsp, r7"},{address="0x200\
0184e",func-name="GPIO_PinWrite",offset="78",opcodes="80 bd",inst="pop\t{r7, pc}"},{address="0x20001\
850",func-name="GPIO_PinWrite",offset="80",opcodes="88 42",inst="cmp\tr0, r1"},{address="0x20001852"\
,func-name="GPIO_PinWrite",offset="82",opcodes="00 20",inst="movs\tr0, #0"},{address="0x20001854",fu\
nc-name="CLOCK_ControlGate",offset="0",opcodes="80 b5",inst="push\t{r7, lr}"},{address="0x20001856",\
func-name="CLOCK_ControlGate",offset="2",opcodes="86 b0",inst="sub\tsp, #24"},{address="0x20001858",\
func-name="CLOCK_ControlGate",offset="4",opcodes="00 af",inst="add\tr7, sp, #0"},{address="0x2000185\
a",func-name="CLOCK_ControlGate",offset="6",opcodes="03 46",inst="mov\tr3, r0"},{address="0x2000185c\
",func-name="CLOCK_ControlGate",offset="8",opcodes="0a 46",inst="mov\tr2, r1"},{address="0x2000185e"\
,func-name="CLOCK_ControlGate",offset="10",opcodes="fb 80",inst="strh\tr3, [r7, #6]"},{address="0x20\
001860",func-name="CLOCK_ControlGate",offset="12",opcodes="13 46",inst="mov\tr3, r2"},{address="0x20\
001862",func-name="CLOCK_ControlGate",offset="14",opcodes="7b 71",inst="strb\tr3, [r7, #5]"}]}]
264,299 (gdb)
264,299 66^done,stack=[frame={level="0",addr="0x20001836",func="GPIO_PinWrite",file="../drivers/fsl_\
gpio.c",fullname="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/drivers/f\
sl_gpio.c",line="117"},frame={level="1",addr="0x20000d54",func="main",file="../source/pit.c",fullnam\
e="/home/robert/Documents/MCUXpresso_10.2.0_759/workspace/evkmimxrt1050_pit/source/pit.c",line="80"}\
]
264,299 (gdb)
466,182 67-exec-next --thread 1 1
466,182 67^running
466,182 *running,thread-id="1"
466,462 (gdb)
466,704 68-thread-select 1
466,740 68^done,new-thread-id="1"
466,740 (gdb)
467,084 &"Remote failure reply: E22\n"
476,195 =thread-exited,id="1",group-id="i1"
476,196 =thread-group-exited,id="i1"
476,201 69-list-thread-groups
476,209 70-list-thread-groups i1
476,701 71-target-disconnect
476,701 72-gdb-exit

0 Kudos
4,307 Views
zhongshen
Contributor III

And when I changed the project properties to unchecked the Link application to RAM, which means to run application in Flash, the debug works well. Is it the problem to run in the RAM? 

0 Kudos
4,307 Views
zhongshen
Contributor III

Thank you for the reply.

Infact, before upgrade system this board works well with MCUXpresso IDE and SDK sample code. The ide version is the same, only difference is Ubuntu version: 14.04 vs 18.04.

And I confirmed that the there is not any other debug session running in it. Any way I used “Clean up debug” button, then debug the program again, the problem still exist.

0 Kudos
4,307 Views
lpcxpresso_supp
NXP Employee
NXP Employee

We've tried replicating your environment here using Ubuntu 18.04 and some example projects (both led_blinky and pit (which I think you are using)) from the RT1050 SDK with a rev 3 MIMXRT1050-EVK development board.

Initially we did find a similar problem, but it was due to out of date firmware in our board.  Once this was corrected we had no problem running either example.

The symptom your example shows normally occurs when the development board is so upset that it takes away access to the main debug access port (for a debugger - a catastrophic event).  The RT1050 and the above development board do present the user with quite a large number of subtle variables that can change to give symptoms like this.  It's certainly well worth while going through the document described above:

If you still have problems, the next step would be to go through : Overview of using the MIMXRT1050-EVK with MCUXpresso IDE 

very carefully.

Your example is interesting insofar as quite a lot of complex debug behaviour has been successfully negotiated in order to get you to the breakpoint on main() (which you do seem to have reached).  Basically, quite a lot is working!  You've run the project and the problem is then signalled asynchronously as the debugger is polling the debug interface to spot when it enters debug state.  Such problems are usually either temporary (the debug port is still usable) or permanent (almost nothing except reset will restore the debug port).

It's difficult to think of anything active at this stage which has not operated correctly already and which is also operating system specific.  (That is, it will be difficult to find a change between Ubuntu 14.04 and 18.04 that could be to blame.)

Although some might regard it as poor MCU design (and some not) the RT1050 is prone to escalating some basic errors (such as accessing bad addresses) to this level (e.g. by hanging the debug bus).  It is likely that the processor has encountered some problem like this.

Occasionally we see the effects of the last run of code (stored in, then booted from flash) leave a harmful legacy that (e.g. watchdog timers) is inherited.  There are a number of ways around this, but you might like to erase your flash before booting: If you then find that the first run is OK but subsequent ones are not, this is a sign that you have this class of problem.

Sincerely

MCUXpresso IDE Support

0 Kudos
4,306 Views
zhongshen
Contributor III

Hi

Thank you for the reply. 

Do you mean that my board firmware is out of date?

My RT1050-EVK firmware information is following:

# DAPLink Firmware - see https://mbed.com/daplink
Unique ID: 0227000041114e450057300cc40300465ab1000097969900
HIC ID: 97969900
Auto Reset: 0
Automation allowed: 0
Overflow detection: 0
Daplink Mode: Interface
Interface Version: 0244
Bootloader Version: 0242
Git SHA: 853df431d81359e822f49363891f877f17d31efb
Local Mods: 0
USB Interfaces: MSD, CDC, HID
Bootloader CRC: 0x73707d49
Interface CRC: 0x565000e7
Remount count: 0

Do I need to update firmware from the link OpenSDA Serial and Debug Adapter|NXP ? But I see the latest firmware version is 0244 that is same as my board.

0 Kudos
4,307 Views
zhongshen
Contributor III

Any way I update firmware on RT1050_EVK, the problem is still existed.

And I have used my old PC with Ubuntu 14.04, the same MCUXpresso IDE with this RT1050_EVK, there is not any problem to debug the same sample project.

 And with new PC with Ubuntu 18.04 for more detial, I found that the problem was token place after writing the IO register as following code:

LED_INIT();   // -->  USER_LED_INIT(LOGIC_LED_OFF) ---> GPIO_PinWrite(BOARD_USER_LED_GPIO, BOARD_USER_LED_GPIO_PIN, output);

void GPIO_PinWrite(GPIO_Type* base, uint32_t pin, uint8_t output)
{
   assert(pin < 32);
   if (output == 0U)
{
   base->DR &= ~(1U << pin); /* Set pin output to low level.*/
}
else
{
   base->DR |= (1U << pin); /* Set pin output to high level.*/
}
}

When executed base->DR |= (1U << pin); /* Set pin output to high level.*/, the debug is stop on "16: Target error from status-poll".

Before executing base->DR |= (1U << pin); /* Set pin output to high level.*/, I try to read register there is still a problem as following to stop the debug:

Screenshot from 2018-07-10 10-43-42.png

Is my pc too faster so that it can not read back from the board?

And I only use my slow pc for the development on MCUXpresso IDE :smileysad:

0 Kudos
4,307 Views
lpcxpresso_supp
NXP Employee
NXP Employee

First of all before you try debugging again, ensure that there are no debug executables still running (that may have hung). The easiest way to do this in MCUXpresso IDE v10.2.0 is to use the "Clean up Debug" button on the toolbar.  "Clean up debug" will kill all debug processes associated with LinkServer, P&E and SEGGER debug connections. This button can be used in the event of a debugging crash to remove any failed processes that remain. Note: a warning will be issued with the option to cancel before any action is performed since this action will kill all connected debug sessions. 

Then ensure that you have powered your board off and back on again.

Then delete any launch configurations inside your project.

[ Note that the notes regarding wirespeed in the old LPCXpresso IDE FAQ you refer to is not applicable to connections made in MCUXpresso IDE via LinkServer debug connections.]

Now try starting your debug connection again.

If you still have problems, the next step would be to go through : Overview of using the MIMXRT1050-EVK with MCUXpresso IDE 

If you need further assistance, please can you also confirm if you have ever successfully debugged this board?

Regards,

MCUXpresso IDE Support

0 Kudos