Forums - breakpoint not hit

6 posts / 0 new
Last post
breakpoint not hit
andreas
Join Date: 21 Oct 19
Posts: 34
Posted: Tue, 2019-11-05 01:50

Hi,

I am referring to this post https://developer.qualcomm.com/forum/qdn-forums/hardware/qca4020-qca4024...

I have the same problem. I am running Eclipse on a Windows host, OpenOcd and GCC are exactly the versions that are required by the documentation for the dev board. All jumpers are set correctly and the sleep mode is OFF. I can build, download and run the hello world demo. I can start the debugging in Eclipse and hit the default breakpoint @app_start as set in the debug configuration. From there on I can single step, but when I set a breakpont somewhere else it does not get hit. For example in hello_world.c line 65 where the "hello world" string gets printed.

If I exchange the app_start breakpoint with the breakpoint mentioned above in the debug configuration, the breakpoint gets hit once during start-up. From this point on it will not get hit.

What I can observe in Eclipse is that the icon for the breakpoint is different from the breakpoints that are set using gdb.init. Currently I have no clue what these different icons stand for.

Doing the same with gdb and openOcd on a command line results in the same behavior. The breakpoint is not hit!

There must be a way to set breakpoints and debug an application in the usual way. I can not believe that no one is doing this.

Thanks and best regards for your help

Andreas

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Wed, 2019-11-06 15:12

Kindly refer to https://developer.qualcomm.com/project/hello-world-w-qca4020-dev-kit and set breakpoint at "app_init" instead of "app_start" and in case of error, provide us the console log after you hit the first breakpoint and not able to set the breakpoint issue.

  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 34
Posted: Wed, 2019-11-06 23:53

Hi Raja,

thanks for the reply. Actually app_start was a typo, the first breakpoint in the debug configuration is set to app_init. That is confirmed. Nevertheless the issue still exists. The first breakpoint is hit correctly all others that will be set during the debug session are not. Here is my console log, after hitting the first breakpoint. There is no additional console output, when I set an additional breakpoint.

Thanks Andreas

Console log

Open On-Chip Debugger 0.10.0 (2017-06-09) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
Info : clock speed 5000 kHz
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 11 -expected-id 0x300160e1"
Info : QM4.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000001c0 msp: 0x10000154
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* QM4.cpu            cortex_m   little QM4.cpu            halted
Started by GNU MCU Eclipse
Info : accepting 'gdb' connection on tcp/3333
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000001c0 msp: 0x10000154
semihosting is enabled
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000001c0 msp: 0x10000154, semihosting
Info : dropped 'gdb' connection (error -400)
Info : accepting 'gdb' connection on tcp/3333
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x00007106 msp: 0x10032ba0, semihosting
invalid command name "speed"
invalid command name "endian"
invalid command name "jtagconf"
===== arm v7m registers
(0) r0 (/32): 0x00000140
(1) r1 (/32): 0x00000000
(2) r2 (/32): 0xFFE5AEB2
(3) r3 (/32): 0xFFFFFFFF
(4) r4 (/32): 0xFFE5AFBB
(5) r5 (/32): 0x44001000
(6) r6 (/32): 0x00000000
(7) r7 (/32): 0x03000000
(8) r8 (/32): 0x10032D68
(9) r9 (/32): 0xE000E000
(10) r10 (/32): 0x000186A0
(11) r11 (/32): 0x00000000
(12) r12 (/32): 0xFFFFFFFF
(13) sp (/32): 0x10032BA0
(14) lr (/32): 0x00007105
(15) pc (/32): 0x00007106
(16) xPSR (/32): 0x81000000
(17) msp (/32): 0x10032BA0
(18) psp (/32): 0x00000000
(19) primask (/1): 0x01
(20) basepri (/8): 0x00
(21) faultmask (/1): 0x00
(22) control (/2): 0x00
(23) d0 (/64): 0x0000000000000000
(24) d1 (/64): 0x0000000000000000
(25) d2 (/64): 0x0000000000000000
(26) d3 (/64): 0x0000000000000000
(27) d4 (/64): 0x0000000000000000
(28) d5 (/64): 0x0000000000000000
(29) d6 (/64): 0x0000000000000000
(30) d7 (/64): 0x0000000000000000
(31) d8 (/64): 0x0000000000000000
(32) d9 (/64): 0x0000000000000000
(33) d10 (/64): 0x0000000000000000
(34) d11 (/64): 0x0000000000000000
(35) d12 (/64): 0x0000000000000000
(36) d13 (/64): 0x0000000000000000
(37) d14 (/64): 0x0000000000000000
(38) d15 (/64): 0x0000000000000000
(39) fpscr (/32): 0x00000000
===== Cortex-M DWT registers
(40) dwt_ctrl (/32)
(41) dwt_cyccnt (/32)
(42) dwt_0_comp (/32)
(43) dwt_0_mask (/4)
(44) dwt_0_function (/32)
(45) dwt_1_comp (/32)
(46) dwt_1_mask (/4)
(47) dwt_1_function (/32)
(48) dwt_2_comp (/32)
(49) dwt_2_mask (/4)
(50) dwt_2_function (/32)
(51) dwt_3_comp (/32)
(52) dwt_3_mask (/4)
(53) dwt_3_function (/32)
Error: address + size wrapped (0xfffffffe, 0x00000004)
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0xfffff000
Error: address + size wrapped (0xfffffffe, 0x00000004)
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0xfffff000

 

  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 34
Posted: Thu, 2019-11-21 06:10

Well, I provided the requested data, but I do not get any response on that?

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2019-11-21 16:48
I tried to make sure, I setup eclipse fresh on my PC and was able to set breakpoints:
Note: Try to limit the breakpoints to maximum of 4-5, make sure you delete the older breakpoints to verify if the workaround helps:
 
Kindly ignore the  console log JTAG sticky error and make sure you are able to run from "debugger console":
*****************************
(51) dwt_3_comp (/32)
(52) dwt_3_mask (/4)
(53) dwt_3_function (/32)
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0x010520da
Error: address + size wrapped (0xfffffffe, 0x00000004)
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0xfffff000
Error: address + size wrapped (0xfffffffe, 0x00000004)
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0xfffff000
 
I have tried to delete old breakpoints while adding new breakpoint such that maximum of 3 breakpoints are in my list.
Below is my "debugger Console" output : (Window -- show view -- Debugger Console)
*********************
 
Breakpoint 1, _main () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/boot/build/ioe_ram_ipt/cortex-m4/ARNTRI/sbl//sbl.o.i:57
57 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/boot/build/ioe_ram_ipt/cortex-m4/ARNTRI/sbl//sbl.o.i: No such file or directory.
b app_start
Breakpoint 4 at 0x10046070: file ..\..\src\pal\pal.c, line 217.
c
c
Continuing.
Breakpoint 2, sbl1_main_ctl (pbl_shared=0x10032f78) at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/boot/sbl//sbl1_mc.c:345
345 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/boot/sbl//sbl1_mc.c: No such file or directory.
d 1
c
c
Continuing.
Breakpoint 4, app_start (ColdBoot=0x1) at ..\..\src\pal\pal.c:217
217    if(PAL_Context.Initialized)
d 2
b hello_world.c:61
Breakpoint 5 at 0x10520a8: file ..\..\src\hello_world.c, line 61.
d 4
c
c
Continuing.
Breakpoint 5, HelloWorld_Thread (Param=0x0) at ..\..\src\hello_world.c:61
61 {
c
c
Continuing.
 
d 5
b hello_world.c:65
Breakpoint 6 at 0x10520aa: file ..\..\src\hello_world.c, line 65.
c
c
Continuing.
d 6
b _tx_thread_sleep_info_get 
Breakpoint 7 at 0x1002c628: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/rtos/threadx/src/apps_proc/tx_thread_sleep_info_get.c, line 99.
c
c
Continuing.
Breakpoint 7, _tx_thread_sleep_info_get (thread_ptr=0x10084418, active=0x1008467c, remaining_ticks=0x10084680, reschedule_ticks=0x0) at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/rtos/threadx/src/apps_proc/tx_thread_sleep_info_get.c:99
99 in /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.1.r2-00004-QZHW-2_20190923_201556/b/ioesw_proc/core/rtos/threadx/src/apps_proc/tx_thread_sleep_info_get.c
c
c
Continuing.

Let me know if you still face any issue while setting breakpoint in eclipse.
  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 34
Posted: Mon, 2019-11-25 05:36

Hi Raja,

thanks for the reply. Actually my status is the following: If I change my Eclipse debug configuration to not start the gdb server but only the openOCD ( <debug_configuration>/ tab:Debugger: uncheck "Start GDB session" = unchecked) and I start the GDB server externally via a command console, the behavior is the same as you described above. I can delete and set breakpoints, the brekpoints are hit.

The drawback is of course there is no link to the source code shown in Eclipse. Debugging works only command line based with GDB, no Eclipse support, which is not what I want.
It seems that the breakpoint set commands generated in Eclpse (double click) will not be forwarded to GDB.

Do you have  a working setup for a debug configuration for Eclipse, that allow for source code based debugging support as expected for Eclipse CDT?

Thanks and best regards

Andreas

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.