Forums - Debugger does not stop on breakpoints

7 posts / 0 new
Last post
Debugger does not stop on breakpoints
mmad
Join Date: 7 Jul 16
Posts: 13
Posted: Mon, 2019-05-27 01:49

Debugger does not stop on any breakpoint beyond App_Start,

I tried with HelloWorld demo, I had configured the board and IDE according to documentation, changed the sleep parameter in xml file (for both RTOS). I put a breakpoint in various lines inside static void HelloWorld_Thread(void *Param), but it does not work.

The debugger stops twice during launch on the (predefined) breakpoints, then it is able to stop inside App_Start when compiled with ThreadX, for FreeRtos it does not stop even there.

  • Up0
  • Down0
manjulak Moderator
Join Date: 5 Dec 14
Posts: 33
Posted: Wed, 2019-06-05 14:04

Not sure why this is still an issue for you. Please double check for any loose jumper connections. Below are the steps I followed.

gcc>build.bat f 4020 cdb
Edit Helloworld_demo\src\export\DevCfg_master_devcfg_out_cdb.xml and disable sleep on line# 367 (set from 1 to 0)
Rebuild again gcc>build.bat f 4020 cdb
flash the board with the image you built
restart the board and now start debugging with JTAG gcc>debug_openocd.bat m4
.........
(gdb) b app_start
Breakpoint 4 at 0x10046348: file ..\..\src\pal\pal.c, line 217.
(gdb) c
Continuing.
Breakpoint 1, _main () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/build/ioe_ram_ipt/cortex-m4/ARNFRI/sbl//sbl.o.i:57 57 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/build/ioe_ram_ipt/cortex-m4/ARNFRI/sbl//sbl.o.i: No such file or directory.
(gdb) c
Continuing.
Breakpoint 2, sbl1_main_ctl (pbl_shared=0x10032f78) at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/sbl//sbl1_mc.c:344 344 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/sbl//sbl1_mc.c: No such file or directory.
(gdb) c
Continuing.
Breakpoint 4, app_start (ColdBoot=0x1) at ..\..\src\pal\pal.c:217 217 if(PAL_Context.Initialized)
(gdb) n
220 App_Start(ColdBoot);
(gdb) n
0x10046458 in __App_Start_veneer ()
(gdb) n
Single stepping until exit from function __App_Start_veneer,
which has no line number information.
App_Start (ColdBoot=0x1) at ..\..\src\hello_world.c:93
93 qurt_thread_attr_init(&Thread_Attribte);

  • Up0
  • Down0
mmad
Join Date: 7 Jul 16
Posts: 13
Posted: Thu, 2019-06-06 01:28

Yes, it is still relevant

please set a breakpoint inside HelloWorld_Thread routine, it will not stop there

(inside App_Start works also for me)

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2019-06-06 13:23

We are still trying to understand, why you are not able to hit the break points after app_start(), assuming you have the right setup and followed all instructions:

 

Breakpoint 2 at 0x100a0172: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/sbl//sbl1_mc.c, line 344.
Breakpoint 3 at 0x10fbc: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.1.0.r4-00013-QZFPGA-1_20170509_214818/b/ioesw_proc/core/v2/rom/drivers/debugtools/err/src/apps_proc/arm//err_jettison_core_m4.s, line 83.
(gdb) b app_start
Breakpoint 4 at 0x100463f0: file ..\..\src\pal\pal.c, line 217.
(gdb) c
Continuing.
 
Breakpoint 1, _main () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/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.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/build/ioe_ram_ipt/cortex-m4/ARNTRI/sbl//sbl.o.i: No such file or directory.
(gdb) c
Continuing.
 
Breakpoint 2, sbl1_main_ctl (pbl_shared=0x10032f78) at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/sbl//sbl1_mc.c:344
344     /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/sbl//sbl1_mc.c: No such file or directory.
(gdb) b HelloWorld_Thread
Breakpoint 5 at 0x105022c: file ..\..\src\hello_world.c, line 61.
(gdb) c
Continuing.
 
Breakpoint 4, app_start (ColdBoot=0x1) at ..\..\src\pal\pal.c:217
217        if(PAL_Context.Initialized)
(gdb) c
Continuing.
 
Breakpoint 5, HelloWorld_Thread (Param=0x0) at ..\..\src\hello_world.c:61
61      {
(gdb) n
65            PAL_CONSOLE_WRITE_STRING_LITERAL("Hello World\r\n");
(gdb)
66            PAL_CONSOLE_WRITE_STRING_LITERAL(PAL_OUTPUT_END_OF_LINE_STRING);
(gdb) n
65            PAL_CONSOLE_WRITE_STRING_LITERAL("Hello World\r\n");
(gdb) c
Continuing.
 
  • Up0
  • Down0
mmad
Join Date: 7 Jul 16
Posts: 13
Posted: Thu, 2019-06-06 22:39

it is very good question

and apparently I am not the only one with this problem, please see https://developer.qualcomm.com/forum/qdn-forums/hardware/qca4020-qca4024/65280

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2019-06-06 23:46
Kindly share us your "openocd -v" "arm-none-eabi-gdb -v" command output along with console output of the GDB debug session excluding the loading sequence.
  • Up0
  • Down0
mmad
Join Date: 7 Jul 16
Posts: 13
Posted: Fri, 2019-06-07 03:07

Here are the outputs

Open On-Chip Debugger 0.10.0 (2017-08-21) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html

GNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

the debugger does not stop inside Eclipse within HelloWorld_Thread,

it stops within gdb session (I was able to reproduce your steps), but it is not the effective way of work

  • 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.