Sample USBserial project that compiles OK on Web Compiler, but breaks for GCC ARM
This code compiles on the online MBED compiler.
When Exported to GCC ARM it fails.
//when compiled with GCC_ARM we get the following issues which result in unresolved symbols /* - The type 'USBSerial' must implement the inherited pure virtual method 'mbed::FileHandle::write' - The type 'USBSerial' must implement the inherited pure virtual method 'mbed::FileHandle::lseek' - The type 'USBSerial' must implement the inherited pure virtual method 'mbed::FileHandle::read' */
main.cpp
- Committer:
- sbts
- Date:
- 2014-10-05
- Revision:
- 0:6cdfc5265dfe
File content as of revision 0:6cdfc5265dfe:
#include "mbed.h" #include "USBSerial.h" DigitalOut myled(LED1); //Virtual serial port over USB USBSerial serial; int i=0; int main() { while(1) { serial.printf("I am a virtual serial port %u \r", i++); serial.write("asdf"); FileHandle::write("asdf") myled = 1; wait(0.2); myled = 0; wait(0.2); } } //when compiled with GCC_ARM we get the following issues which result in unresolved symbols /* - The type 'USBSerial' must implement the inherited pure virtual method 'mbed::FileHandle::write' - The type 'USBSerial' must implement the inherited pure virtual method 'mbed::FileHandle::lseek' - The type 'USBSerial' must implement the inherited pure virtual method 'mbed::FileHandle::read' */