Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 1 month ago.
Exporting project, resolving serial class/Eclipse is failing
I have a project that I cannot debug since Eclipse cannot find the definition of Serial class. I believe the problem is related to the DEVICE_SERIAL definition as it will be defined in the Makefile only. Eclipse cannot find it. I might be wrong. Do any one know how to solve this problem? I cannot debug my project using OpenOCD. All pathes are defined for Eclipse and -std=gnu11 is defined also for the compiler. thanks in advance
1 Answer
7 years, 1 month ago.
Hello,
In the source mbed library (mbed-dev or mbed-os) try to open the device.h file associated with the selected target board and add
#define DEVICE_SERIAL 1
For example as follows:
device.h
#ifndef MBED_DEVICE_H #define MBED_DEVICE_H //======================================= #define DEVICE_ID_LENGTH 24 #define DEVICE_SERIAL 1 #include "objects.h" #endif