Skip to content

can't debug when used in conjunction with ChRT - no thread support? #11

@davidbuzz

Description

@davidbuzz

#include "TeensyDebug.h"
#include "ChRt.h"
... etc ...

When trying to debug something as simple as one of the ChRt example scripts, just adding the above #include ... to it....
https://github.com/greiman/ChRt/blob/master/examples/chBlink/chBlink.ino

It seems that TeensyDebug doesn't provide enough functionality to work with 'threads'... its my guess that that its missing the ability to properly respond to one of the thread commands that VSCode / PIO uses [my debuggger gui of choice], eg , not 100% sure what the command is that PIO is trying to do, but perhaps its trying to switch thread with 'thread x' or 'info threads' or similar.

assorted VSCode error/s:

Could not continue: Invalid thread id: 1 (from exec-continue --thread 1)
Reply contains invalid hex digit 116 (from data-evaluate-expression chRegFirstThread)

exception at:

chRegFindThreadByWorkingArea (wa=<optimized out>) at .pio/libdeps/teensy40/ChRt/src/rt/src/chregistry.c:251

https://sourceware.org/gdb/onlinedocs/gdb/Threads.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions