GDB Server cannot read data anymore after stopping at a breakpoint

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello everybody,

I'm using the segger J-Link Plus for debugging. I set up everything according to the how-to guides. I managed to get a connection to the BCM and it also stops at a set breakpoint. But if I try to step on or pres on run I get a bunch of error messages within the Segger GDB Server (see attachment)

do I do something wrong here?

Everything else seems to work though...

Thanx in advance for any help on this issue

0 Likes
1 Solution
Anonymous
Not applicable

Hello Daniel,

Please take a look at the pwm_tones App as an example where you can setup the HW Debugging:

* To debug, add DEBUG=1 to this application's make target in the IDE.

* Then hook up J-Link to J10 on the tag board. You will need J-Link

* GDB server, J-Link Commander and J-Link (Base version is sufficient).

* Once you download the application from the IDE, start J-Link GBD server

* and then from the debug menu, choose WICED Smart debug configuration.

* This will start GDB client which will connect to the GDB server and

* start a debug session. Make sure that when starting J-Link GDB server,

* you have have the following configurations:

* Target device = Cortex-M3, Little endian

* Target interface = SWD

* Speed = 1000 kHz

* Init regs on start = unchecked

*

* KNOWN ISSUE: Eclipse will not be able to halt the CPU sometimes. Open

* J-Link commander and wait for it to connect. Once it establishes a

* connection with the debug HW block, type 'halt', without the quites

* in the commander window and Eclipse will regain control of the CPU.

pastedImage_0.png

Hope this helps,

Thanks

JT

View solution in original post

0 Likes
10 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Which part are you using?

0 Likes
Anonymous
Not applicable

I'm using the BCM920737 dev kit.

I'm not using the whole resistor stuff attached to the cable. I assumed that this is rather an internal J-Link adapter circuit. .... or could it have something to do with that?

0 Likes
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Are you using the instructions provided in the WICED Smart - Debugging Support Using a J-Link Probe Application Note, or within the blog here, which outlines the exact Segger debugger we used to test this functionality: WICED Smart - Debugging Support Using a J-Link Probe Application Note

Also note that with this tool, single step debug with access to register values is not provided, so there are some limitations.

I believe simple breakpoints should still work though.

0 Likes
Anonymous
Not applicable

ok...., but on page 16 of the "Wiced Smart - Debugging Support Using a J-Link Probe" it says that "10. Step into, over, and out of instructions using the IDE buttons" is possible.

It seems so that stepping within the J-Link debugger terminal is also working (but just giving the assambler code as output)...

Is there a list of limitations somewhere?

0 Likes
Anonymous
Not applicable

When stopping within APPLICATION_INIT() at BUSY_WAIT_TILL_MANUAL_CONTINUE_IF_DEBUG_ENABLED() I can access all the variables within my "expression"-window. But as soon as it stop at some further breakpoint it just always tells me that it could not read from some address. Something is really going wrong here and debugging makes definitely no fun like this.

If I don't add any breakpoints the program works as expected. So I don't have any other fundamental problem preventing the actual code from working....

0 Likes
Anonymous
Not applicable

update to the topic:

I realized that the SWD and the HCI_Uart are multiplexed an so I added BLE_TRACE_DISABLE and I call ble_traceDisable() within the APPLICATION_INIT.

But still if I halt the device or I stop at a break point I'm not able to read any variable...

Does anybody else have this problem or does it work anywhere else?

When I stop the debugger I get the following out put:

debuggerProblems.png

0 Likes
Anonymous
Not applicable

Hello Daniel,

Your CPU voltage is 1.7V is too low.

JLINK needs 3.3V.

Thanks

JT

0 Likes
Anonymous
Not applicable

Hey j.t.

I was confused about the 1.77 V anyway. But it seems that the USB is just delivering 1.7 and not more. Even with the battery I will not reach more than 3V at best. Is there a different way to power the board?

18.11.15 7:53:

ok, I tried it with an external power supply of 3.3V (soldered to the battery pins)... but it is still not working at all. The only thing I can do is stop at break points. But reading/write of variables nor stepping nor continue to run works. This way the debugging really makes no sense.

Is this just the way it is or does it work for somebody else?

Cheers

Daniel

0 Likes
Anonymous
Not applicable

Hello Daniel,

Please take a look at the pwm_tones App as an example where you can setup the HW Debugging:

* To debug, add DEBUG=1 to this application's make target in the IDE.

* Then hook up J-Link to J10 on the tag board. You will need J-Link

* GDB server, J-Link Commander and J-Link (Base version is sufficient).

* Once you download the application from the IDE, start J-Link GBD server

* and then from the debug menu, choose WICED Smart debug configuration.

* This will start GDB client which will connect to the GDB server and

* start a debug session. Make sure that when starting J-Link GDB server,

* you have have the following configurations:

* Target device = Cortex-M3, Little endian

* Target interface = SWD

* Speed = 1000 kHz

* Init regs on start = unchecked

*

* KNOWN ISSUE: Eclipse will not be able to halt the CPU sometimes. Open

* J-Link commander and wait for it to connect. Once it establishes a

* connection with the debug HW block, type 'halt', without the quites

* in the commander window and Eclipse will regain control of the CPU.

pastedImage_0.png

Hope this helps,

Thanks

JT

0 Likes
Anonymous
Not applicable

I can't believe it, it works now. The second SETUP_APP_FOR_DEBUG_IF_DEBUG_ENABLED() call within the create function was missing.

Thank you so much.