Advanced Debug: How to solve for PICO_R1_3 make: *** No rule to make target 'gdb' Stop #5028
Replies: 1 comment
-
Posted at 2021-11-21 by Robin While I'm searching for a suitable gdb tutorial or suggested command line instruction set, I have made a bit of progress with attaching the gdb process, but I'm not sure this is going to get me to setting breakpoints within the .c source, similar to how one might debug a Visual Studio C#/C/CPP project. From the web page content, link post #1, my mental model is that the .c source seen within the VSCode app would be the launch point to start a main.c file there. Several failed attempts at tasks.json and launch.json L958 jshardware.c what is the process to get from Javascript instruction presumeably run from the Espruino Linux exectuable running inside the VSCode Terminal, through to the call
Still seeking the solution there, maybe sample tasks.json and launch.json are needed, but in the meantime:
> https://www.gnu.org/software/gdb/documentation/ Although I'm not entirely certain at how to interpret the above, it appears the .elf file is being decoded and it appears the instruction(s) is being stepped into, until I learn the gdb commands, am I on the right path to get at the source? The above seems more of a hardware register debug process. Posted at 2021-11-25 by Robin ping keep alive Posted at 2021-11-28 by Robin ping keep alive |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-11-21 by Robin
Sun 2021.11.21
Goal is to debug within the Espruino Linux executable.
Last code snippet on the AdvancedDebug page produces the above error.
Following the 'Advanced Debug' instructions at:
'we'd strongly suggest you try and debug a normal Linux executable of Espruino first'
Fixed Under 'Gothchas'
Removed the reference: ''bootloader' : 1' from the board file
Ran make using DEBUG=1
What does work: The Espruino Linux executable is built along with espruino_2v08.220_pico_1r3.bin and .lst
It is possible to execute Javascript statements within the Terminal window, with the console like emulation, thus debugging Javascript is possible, but the goal is to debug setting breakpoints within that .c source Linux executable.
From the last snippet window on the AdvancedDebug page:
DEBUG=1 PICO_1V3=1 make gdb
produces error: make: *** No rule to make target 'gdb'. Stop.
Reviewing the makefile file, around L700 is a single reference to gdb: export GDB=$(CCPREFIX)gdb Reviewing the make files within the folder \make doesn't reveal a gdb make target file.
I tried the second to last snippet:
DEBUG=1 PICO_1V3=1 make flash
make/sanitycheck.make:16: *** You now need to build with 'BOARD=PICO_R1_3 make'. Stop.
which produces an apparent modification that needs attention.
I did locate this sanity check, and attempted to follow the established pattern.
From sanitycheck.make, references indicate to use the 'BOARD=' prefix, so tried that:
DEBUG=1 BOARD=PICO_R1_3 make gdb
but without success. Is there a missing gdb make file that is needed here? Is there a gdb entry point that needs to be included, maybe in a separate make routine or file?
Back to trying this @fanoush arm-none-eabi-gdb suggestion:
Beta Was this translation helpful? Give feedback.
All reactions