Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use gdb to effectively debug multi-core applications? #100

Open
areicheltv opened this issue Feb 29, 2024 · 0 comments
Open

How can I use gdb to effectively debug multi-core applications? #100

areicheltv opened this issue Feb 29, 2024 · 0 comments

Comments

@areicheltv
Copy link

areicheltv commented Feb 29, 2024

Description

I've successfully connected my Coral Micro board via JTAG and can use the flashtool.py script to start and connect to the debugger. For example, to debug one of the examples, which was built using the supplied build.sh script:

> python scripts/flashtool.py -e multi_core_blink_led --debug
Finding all necessary files
STATE_CHECK_FOR_ANY
STATE_CHECK_FOR_ELFLOADER
STATE_RESET_ELFLOADER
OpenHidDevice vid=18d1 pid=9307 ...
OpenHidDevice vid=18d1 pid=9307 opened
STATE_CHECK_FOR_SDP
STATE_LOAD_FLASHLOADER
STATE_CHECK_FOR_FLASHLOADER
STATE_LOAD_ELFLOADER
STATE_PROGRAM_ELFLOADER
OpenHidDevice vid=18d1 pid=9307 ...
OpenHidDevice vid=18d1 pid=9307 opened
/tmp/tmpf0561u3x/multi_core_blink_led.stripped |################################| 328768/328768
STATE_START_GDB
GNU gdb (GNU Arm Embedded Toolchain 9-2020-q2-update) 8.3.1.20191211-git
Copyright (C) 2019 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=x86_64-linux-gnu --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".
0x00010a12 in prvIdleTask (pvParameters=<optimized out>) at /third_party/freertos_kernel/tasks.c:3447
3447	                if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )

I can then add breakpoints in the M7 part of the example:

(gdb) b main_app_m7.cc:30
Breakpoint 1 at 0x1444: file /examples/multi_core_blink_led/main_app_m7.cc, line 30.

But I cannot do the same for the M4 part:

(gdb) b blink_led_m4.cc:28
No source file named blink_led_m4.cc.
Make breakpoint pending on future shared library load? (y or [n])

It seems gdb is unaware of the M4 executable's symbol table. How would I go about inspecting the M4 part of the executable then? I'd appreciate any kind of help a lot...

Click to expand!

Issue Type

Support

Operating System

Linux

Coral Device

Dev Board Micro

Other Devices

No response

Programming Language

C++

Relevant Log Output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant