PlatformIO Community

STM32F407VET6 & library USB (mbed)

Hi!
I’m using STM32F407VET6 black board

[env:seeedArchMax]
platform = ststm32
board = seeedArchMax
framework = mbed
upload_protocol = stlink
lib_deps = 2820

#include “mbed.h”

#include “USBSerial.h”

// Virtual USB Serial port
USBSerial pc;
DigitalOut led (PA_6);

int main()
{
while (true) {

    led=!led;
    wait(1);
    pc.printf ("Hello!");
}

}

the program does not compile.

i get the following error:

.piolibdeps\USBDevice_ID2820\targets\TARGET_RENESAS\TARGET_RZ_A1H\usb0\src\common\usb0_function_dataio.c:40:10: fatal error: usb0_function.h: No such file or
directory



#include “usb0_function.h”

compilation terminated.
.piolibdeps\USBDevice_ID2820\targets\TARGET_RENESAS\TARGET_RZ_A1H\usb0\src\common\usb0_function_dma.c:40:10: fatal error: usb0_function.h: No such file or directory



#include “usb0_function.h”

compilation terminated.
*** [.pioenvs\seeedArchMax\libf36\USBDevice_ID2820\targets\TARGET_RENESAS\TARGET_RZ_A1H\usb0\src\common\usb0_function_dataio.o] Error 1
*** [.pioenvs\seeedArchMax\libf36\USBDevice_ID2820\targets\TARGET_RENESAS\TARGET_RZ_A1H\usb0\src\common\usb0_function_dma.o] Error 1
.piolibdeps\USBDevice_ID2820\targets\TARGET_RENESAS\TARGET_RZ_A1H\usb0\src\common\usb0_function_intrn.c:40:10: fatal error: usb0_function.h: No such file or directory



#include “usb0_function.h”

compilation terminated.

[.pioenvs\seeedArchMax\libf36\USBDevice_ID2820\targets\TARGET_RENESAS\TARGET_RZ_A1H\usb0\src\common\usb0_function_intrn.o] Error 1

Dear Nikantovik, did you have success, to get SeedArchMax usbserial to work?

use this library in onlin compiller
https://os.mbed.com/users/mbed_official/code/USBDevice/
image

in platformio does not work

[env:disco_f407vg]
platform = ststm32@5.5.0
board = disco_f407vg
framework = mbed

#include <mbed.h>
#include <USBSerial.h>

USBSerial pc;

int main() {
while(1) {
pc.printf (“Hello world!\r\n”);
wait_ms(1000);
}
}

it works