From de02967ce1ea4f8577cafbc13a79d3ec9eb8c139 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sat, 30 Nov 2019 19:31:14 -0800 Subject: [PATCH 1/2] Remove user_interface.h from gdbstub includes Avoid a warning by not including the unneeded "user_interface.h" from gdbstub.c. Leftover from original stub code from the SDK, this include is unnecessary in the Arduino core. --- libraries/GDBStub/src/internal/gdbstub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/GDBStub/src/internal/gdbstub.c b/libraries/GDBStub/src/internal/gdbstub.c index 860345e20c..97b0b13861 100644 --- a/libraries/GDBStub/src/internal/gdbstub.c +++ b/libraries/GDBStub/src/internal/gdbstub.c @@ -67,7 +67,6 @@ OS-less SDK defines. Defines some headers for things that aren't in the include the xthal stack frame struct. */ #include "osapi.h" -#include "user_interface.h" void _xtos_set_exception_handler(int cause, void (exhandler)(struct XTensa_exception_frame_s *frame)); From 149325bfa00f9974d6877710f3aacaca42e49e8e Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sat, 30 Nov 2019 19:53:19 -0800 Subject: [PATCH 2/2] Add example to ensure gdbstub compiles in CI Ensure the same user_interface warning doesn't occur in the future by adding the example shown in the GDB docs to the CI build process. --- libraries/GDBStub/examples/gdbstub_example.ino | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 libraries/GDBStub/examples/gdbstub_example.ino diff --git a/libraries/GDBStub/examples/gdbstub_example.ino b/libraries/GDBStub/examples/gdbstub_example.ino new file mode 100644 index 0000000000..7b9dec3297 --- /dev/null +++ b/libraries/GDBStub/examples/gdbstub_example.ino @@ -0,0 +1,13 @@ +#include + +void setup() { + Serial.begin(115200); + gdbstub_init(); + Serial.printf("Starting...\n"); +} + +void loop() { + static uint32_t cnt = 0; + Serial.printf("%d\n", cnt++); + delay(100); +}