So,
I'm just getting started with the BlackPill (F401CC) uploading with the DFU through VSCode/PlatformIO with ST STM32 14.2.0 (and before I had 12.something, updated it to see if that was the issues). It's a knock off WeAct v2.0, and came with the original pulsing blink.
I can upload to it with the DFU with the Arduino IDE (1.8.13) and the stm32duino 1.9.0 (which looking at it is deprecated, but it works so I don't think this is my issue).
I upload a blink sketch with a Serial.begin(11520) and a Serial.println("Hello World!") and everything works fine... it uploads, I starts blinking, there's a serial port which outputs "Hello World!" every few seconds. All good.
If I copy the same code over to PlatformIO (having set the .ini up for the board) I then upload it from here, and all works fine, DFU uploads ok, the blink works (I know its this file as I changed the delays so it's a different blink) BUT, no serial port or communication.
I've checked it in Arduino and there's no port being set up there either.
Anyone got any ideas? I imagine its simple, but I've tried updating/restarting everything to no avail.
I imagine it's something I'm missing in PlatformIO as I'm not really a power user yet.
Cheers,
Nick
No serial with BlackPill and PlatformIO
No serial with BlackPill and PlatformIO
Don't mind me being an idiot...
I hadn't added the build_flags to enable the USB serial in PlatformIO
All I needed was the build_flags in the above code and it's all working now!
Leaving incase anyone else has the same issue
Go to full postI hadn't added the build_flags to enable the USB serial in PlatformIO
Code: Select all
[env:blackpill_f401cc]
platform = ststm32
board = blackpill_f401cc
framework = arduino
upload_protocol = dfu
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
Leaving incase anyone else has the same issue
Re: No serial with BlackPill and PlatformIO
Don't mind me being an idiot...
I hadn't added the build_flags to enable the USB serial in PlatformIO
All I needed was the build_flags in the above code and it's all working now!
Leaving incase anyone else has the same issue
I hadn't added the build_flags to enable the USB serial in PlatformIO
Code: Select all
[env:blackpill_f401cc]
platform = ststm32
board = blackpill_f401cc
framework = arduino
upload_protocol = dfu
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
Leaving incase anyone else has the same issue
Re: No serial with BlackPill and PlatformIO
Hello,
I am having same problem eg no usb connect from WeAct F411CE to Win10 64 Device Manager does not show the board COM port.
I have a STLINK and upload the following sketch and the LED blinks OK, but no serial output.
I used the STM32 CubeProgrammer to upload stm32f411_APP_test 0x8004000.hex
But not sure if i did it to correct address or the hex file is a good one?
Many thanks imk (Stuck at first hurdle)
#define LED_PIN PC13
void setup()
{
Serial.begin(9600);
delay(1000);
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
Serial.println("Initialize Sensor OK");
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
}
I am having same problem eg no usb connect from WeAct F411CE to Win10 64 Device Manager does not show the board COM port.
I have a STLINK and upload the following sketch and the LED blinks OK, but no serial output.
I used the STM32 CubeProgrammer to upload stm32f411_APP_test 0x8004000.hex
But not sure if i did it to correct address or the hex file is a good one?
Many thanks imk (Stuck at first hurdle)
#define LED_PIN PC13
void setup()
{
Serial.begin(9600);
delay(1000);
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
Serial.println("Initialize Sensor OK");
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
}
1201 Alarm
Re: No serial with BlackPill and PlatformIO
Hi,
Unfortunately, I’m on Mac, so no idea how the windows side works. Might be best to start your own thread!
Hope it works out!
Cheers,
Nick
Unfortunately, I’m on Mac, so no idea how the windows side works. Might be best to start your own thread!
Hope it works out!
Cheers,
Nick
imk wrote: ↑Sat Oct 30, 2021 2:49 pm Hello,
I am having same problem eg no usb connect from WeAct F411CE to Win10 64 Device Manager does not show the board COM port.
I have a STLINK and upload the following sketch and the LED blinks OK, but no serial output.
I used the STM32 CubeProgrammer to upload stm32f411_APP_test 0x8004000.hex
But not sure if i did it to correct address or the hex file is a good one?
Many thanks imk (Stuck at first hurdle)
#define LED_PIN PC13
void setup()
{
Serial.begin(9600);
delay(1000);
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
Serial.println("Initialize Sensor OK");
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
}
Re: No serial with BlackPill and PlatformIO
neo,
many thanks for the reply.
I am thinking of giving up with these WeAct boards, the web is full of google hits with respect to people having issues with them.
They need to setup there own site where people can download driver/boot loader from, rather than do the github hair loss searching.
I only bought them because they have more i/o pins than the ST Nucleo 32 boards.
But are so much pain not worth the effort trying to get them to work, think i'll pop them on ebay and take the profit![Smile :-)](./images/smilies/icon_e_smile.gif)
Thanks for help imk.
many thanks for the reply.
I am thinking of giving up with these WeAct boards, the web is full of google hits with respect to people having issues with them.
They need to setup there own site where people can download driver/boot loader from, rather than do the github hair loss searching.
I only bought them because they have more i/o pins than the ST Nucleo 32 boards.
But are so much pain not worth the effort trying to get them to work, think i'll pop them on ebay and take the profit
![Smile :-)](./images/smilies/icon_e_smile.gif)
Thanks for help imk.
1201 Alarm