GDBStub.h - 'gdbstub_init' was not declared in this scope
Posted: Sun Oct 30, 2016 2:11 pm
First, I'm not sure in which forum this post is best suited as it has to do with compiling, but I am using the Arduino IDE.
My problem is I can't get even the simplest program to compile with the GDBStub. Digging deeper I can't see how it is supposed to work. All of the instructions I have found say that one of the initial steps is to #include <GDBStub.h>, but this header does nothing. It's contents are as follows:
Attempts to compile this test program...
... result in this error: 'gdbstub_init' was not declared in this scope. Makes sense because nothing is defined in <GDBStub.h>.
In a child directory (internal) within the library is a header file named "gdbstub.h" in which gdbstub_init() is defined.
When I copy the library's files to a directory named lib in my project directory and change <GDBStub.h> to "lib/gdbstub.h" I receive a different error when I try to compile: undefined reference to `gdbstub_init'.
Please set me straight.
My problem is I can't get even the simplest program to compile with the GDBStub. Digging deeper I can't see how it is supposed to work. All of the instructions I have found say that one of the initial steps is to #include <GDBStub.h>, but this header does nothing. It's contents are as follows:
Code: Select all
#ifndef GDBSTUB_H
#define GDBSTUB_H
// this header is intentionally left blank
#endif //GDBSTUB_H
Attempts to compile this test program...
Code: Select all
#include <GDBStub.h>
void setup() {
gdbstub_init();
}
void loop() {
}
... result in this error: 'gdbstub_init' was not declared in this scope. Makes sense because nothing is defined in <GDBStub.h>.
In a child directory (internal) within the library is a header file named "gdbstub.h" in which gdbstub_init() is defined.
Code: Select all
#ifndef GDBSTUB_H
#define GDBSTUB_H
#ifdef __cplusplus
extern "C" {
#endif
void gdbstub_init();
#ifdef __cplusplus
}
#endif
#endif
When I copy the library's files to a directory named lib in my project directory and change <GDBStub.h> to "lib/gdbstub.h" I receive a different error when I try to compile: undefined reference to `gdbstub_init'.
Please set me straight.