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

    https://www.espruino.com/AdvancedDebug

    '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:

    post #3 last pp. Conceptual comments needed on simple firmware debug

About

Avatar for Robin @Robin started