F303ZE VCP not work

Hi all,

I try to build a project from the example of API USBSerial on NUCELO_F303ZE. I also use the latest mbed library on online compile. But it just return error like below:

++ MbedOS Error Info ++
Error Status: 0x80FF0100 Code: 256 Module: 255
Error Message: Fatal Run-time error
Location: 0x800289F
Error Value: 0x0
Current Thread: main Id: 0x20001A50 Entry: 0x8007237 StackSize: 0x1000 StackMem: 0x200004C0 SP: 0x200013FC
For more info, visit: https://mbed.com/s/error?error=0x80FF0100&tgt=NUCLEO_F303ZE
-- MbedOS Error Info --
This board does not have a hardware USB driver

I just compile official code without any modification.

 /*
 * Copyright (c) 2006-2020 Arm Limited and affiliates.
 * SPDX-License-Identifier: Apache-2.0
 */
#include "mbed.h"
#include "USBSerial.h"

//Virtual serial port over USB
USBSerial serial;

int main(void)
{
    while (1) {
        serial.printf("I am a virtual serial port\r\n");
        ThisThread::sleep_for(1000);
    }
}

Does anyone know what the issue is on this condition?

Ty.

Hello,

you probably need to enable this functionality via mbed_app.json file, if it is supported on this target under Mbed.

{
    "target_overrides": {
        "*": {
            "target.device_has_add": ["USBDEVICE"]
        }
    }
}

BR, Jan