Hi everyone,
I am testing Virtual COM over USB using a custom board for LPC1768. I am using MBED Studio 1.3.1 in windows 10 with the target set to “mbed LPC1768”, build profile in “Debug” and the code what I am implementing is the next:
#include “mbed.h”
#include “USBSerial.h”
#define BLINKING_RATE 500ms
//Virtual serial port over USB
USBSerial serial;
DigitalOut led(LED1);
int main(void) {
while(1)
{
led = !led;
serial.printf(“I am a virtual serial port\n”);
ThisThread::sleep_for(BLINKING_RATE);
}
}
when I compile the this code i get only this warning: “[Warning] @0,0: L3912W: Option ‘legacyalign’ is deprecated.”. Then i take the .bin and convert it to .hex with “arm-none-eabi-objcopy” and then upload it to my custom board using FlashMargic. I am new whit this plataform, when i tested to blink a led it works very well, but the code that I attached above din’t work for me, after uploading the code y get a virtual com port in windows 10 but i receive nothing in a serial console. I read that in windows 10 there is no need for a driver. Also when i tested to blink a led and only adding this line “USBSerial serial;” the blink don’t works but it creates a virtual com.
Do you have any ideas why I can’t receive data in my serial console and why when I added “USBSerial serial;” the basic blink code stop working?
Many thanks for your help
Best Regards