Hi,
i wanted to test out freeRTOS support on a stm32f103c8 bluepill, but i encountered a strange problem. If i add the lib_deps = stm32duino/STM32duino FreeRTOS@^10.3.1 to my platfomIO.ini file my bluepill just does nothing after uploading. Meaning opening the serial monitor does not work, and no code seems to be executed (even a blink sketch doesn’t work) without the freeRTOS dependency in the platformIO.ini file everything works as expected
my simple test code:
#include <Arduino.h>
// the setup routine runs once when you press reset:
void setup() {
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
Serial.println("alive");
delay(500); // delay in between reads for stability
}
the same behaviour: absolutely no reaction from the bluepill, no blinking and no serial over USB.
When i use the arduino IDE to upload the same code, the blinking works, but only as long as no usb cable is plugged in. When the USB cable is plugged in the board also does nothing.
It does also blink when i remove the USB build flags from the platfomIO.ini file
I still get the same “USB not recognized” message in windows and i cant resume because it will forever stop in the empty loop.
When i add a non-existing function to debug_init_break the code does not stop and i dont get the not recognized message, however the bluepill does not blink. When i then pause execution, it always goes here and it seems stuck here:
i guess there must be some incompatibility between the stm32 usb stack and the freertos implementation. I i will probably have to also open an issue in the stm32duino github.
I don’t have any debugging tool unfortunately, however, my code works with 10.3.1 if I remove the USB related defines (-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC -D USBCON) from build flags in platformio.ini . Looks like the same exact problem.