Program stops on resuming from breakpoint.

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

Program stops on resuming from breakpoint.

1,498 Views
dougabbott
Contributor I

I'm running a simple two task FreeRTOS program on a LPCXpresso LPC1769 under LPCXpresso 8.2. When I resume from a breakpoint, the program stops with this message:

Thread #1 1 (runnable) (Suspended : Signal : SIGSTOP:Stopped (signal))
0xffffffff

My guess would be I'm missing something in configuration.

0 Kudos
7 Replies

1,038 Views
lpcxpresso_supp
NXP Employee
NXP Employee

LPCXpresso IDE v8.2.2 which has just been released should resolve this issue without needing the workaround of changing the default stack fill byte.

Regards,

LPCXpresso Support

0 Kudos

1,038 Views
lpcxpresso_supp
NXP Employee
NXP Employee

GDB pulled the 0xA5A5A5A5 value from a register, and requested a read at that address. This has put the DAP into an unknown state. The debugger should recover the DAP, but it's not working correctly in this circumstance. We've identified the problem, and we'll provide a fix for this probably next week.

Thanks and regards,

LPCXpresso Support

0 Kudos

1,038 Views
dougabbott
Contributor I

Thanks for the elaboration. One final question if I may, and then you

can consider this one closed. What is the DAP? I can't find any

reference to it in the LPC17xx documentation.

Doug

0 Kudos

1,038 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Debug Access Port. Its part of the Coresight debug block within the Cortex-M3 CPU itself (that is inside the LPC MCU). Its basically the block of hardware that the debug probe connects over SWD.

Regards,

LPCXpresso Support

0 Kudos

1,038 Views
dougabbott
Contributor I

OK, changing the stack fill byte solves the problem. Now then, can you explain how such a subtle change did the trick?

For the record, I've all included the debug and gdb_trace probes from the original version.

Debug probe:

Stopped: Breakpoint #1
read A5A5A5A5[4] (4*1) failed - Em(12). System rejected access at location 0xFFFFFFFF - verify population of memory and peripherals
read 1000055C[4] (1*4) failed - Em(12). System rejected access at location 0xFFFFFFFF - verify population of memory and peripherals
read 1000055C[4] (1*4) failed - Em(12). System rejected access at location 0xFFFFFFFF - verify population of memory and peripherals
read 1000055C[4] (1*4) failed - Em(12). System rejected access at location 0xFFFFFFFF - verify population of memory and peripherals
Stopped: Locked-up, Sleeping, In-reset (Was Reset)  [Reset from Unknown]: VectorCatch:IRQ47 (PC unknown: stack=0xFFFFFFFF) (VectorCatch,Breakpoint,Watchpoint,EDBGRQ)

gdb_trace probe

366,052 39-exec-continue --thread 1
366,063 39^running
366,065 *running,thread-id="all"
366,079 (gdb)
366,172 @"Task 2 is running\n"
366,317 @"Task 1 is running\n"
366,473 =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000\
029a",func="vTask1",file="../main.c",fullname="C:\\Users\\owner\\Intellimetrix\\Clients\\GoGogh\\RT \
Programming\\workspace\\tasking_model-1\\main.c",line="87",thread-groups=["i1"],times="1",original-l\
ocation="C:\\Users\\owner\\Intellimetrix\\Clients\\GoGogh\\RT Programming\\workspace\\tasking_model-\
1\\main.c:87"}
366,591 ~"\nBreakpoint "
366,611 ~"1, vTask1 (pvParameters=<error reading variable: Cannot access memory at address 0x1000055\
c>) at ../main.c:87\n"
366,612 ~"87\t\t\tfor( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )\n"
366,613 *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0000029a",func="vTask\
1",args=[{name="pvParameters",value="<error reading variable: Cannot access memory at address 0x1000\
055c>"}],file="../main.c",fullname="C:\\Users\\owner\\Intellimetrix\\Clients\\GoGogh\\RT Programming\
\\workspace\\tasking_model-1\\main.c",line="87"},thread-id="1",stopped-threads="all"
366,613 (gdb)
366,622 40-stack-info-depth --thread 1 11
366,628 40^done,depth="2"
366,628 (gdb)
366,642 41-thread-info 1
366,669 41^done,threads=[{id="1",target-id="Thread 1.1",details="runnable",frame={level="0",addr="0x\
0000029a",func="vTask1",args=[{name="pvParameters",value="<error reading variable: Cannot access mem\
ory at address 0x1000055c>"}],file="../main.c",fullname="C:\\Users\\owner\\Intellimetrix\\Clients\\G\
oGogh\\RT Programming\\workspace\\tasking_model-1\\main.c",line="87"},state="stopped"}]
366,669 (gdb)
366,686 42-stack-list-frames --thread 1
366,690 42^done,stack=[frame={level="0",addr="0x0000029a",func="vTask1",file="../main.c",fullname="C\
:\\Users\\owner\\Intellimetrix\\Clients\\GoGogh\\RT Programming\\workspace\\tasking_model-1\\main.c"\
,line="87"},frame={level="1",addr="0x00000000",func="??"}]
366,690 (gdb)
376,324 43-exec-continue --thread 1
376,331 43^running
376,333 *running,thread-id="all"
376,333 (gdb)
376,585 ~"\nProgram received signal "
376,587 ~"SIGSTOP, Stopped (signal).\n"
376,591 ~"0xffffffff in ?? ()\n"
376,591 *stopped,reason="signal-received",signal-name="SIGSTOP",signal-meaning="Stopped (signal)",fr\
ame={addr="0xffffffff",func="??",args=[]},thread-id="1",stopped-threads="all"
376,592 (gdb)
376,612 44-stack-info-depth --thread 1 11
376,616 44^done,depth="1"
376,623 (gdb)
376,652 45-thread-info 1
376,660 45^done,threads=[{id="1",target-id="Thread 1.1",details="runnable",frame={level="0",addr="0x\
ffffffff",func="??",args=[]},state="stopped"}]
376,660 (gdb)

Thanks.

0 Kudos

1,038 Views
lpcxpresso_supp
NXP Employee
NXP Employee

In addition to confirming your board and probe details, as well any changes in behaviour from the stack mods - can you also provide the contents of your debug log and gdb trace log at the point you see this message, as per :

The Debug Log 

Regards,

LPCXpresso Support

0 Kudos

1,038 Views
lpcxpresso_supp
NXP Employee
NXP Employee

If you're using one of the LPCOpen FreeRTOS projects for the LPC1769, it's possible the DAP is in an unknown state due to an invalid access. In tasks.c, if the tskSTACK_FILL_BYTE is defined as 0xa5U (default), temporarily change this to 0x00U, and rebuild the project. You'll need to temporarily forego the stack high water mark check to resolve this source of the problem.

Edit: The above workaround applies to the original LPCXpresso LPC1769 (LPC-Link1 based) board, or, if you're using an LPC-Link1 as a debug probe. Can you tell us about your board? Is it possible you have insufficient stack for either task?

Thanks and regards,

LPCXpresso Support

0 Kudos