BluePill CDC Serial only works w/ Arduino IDE #2063
-
I've been trying to get the USB CDC Serial working on a bluepill (stm32f103 128k), but I can only get it to work w/ the Arduino IDE. I've tried both PlatformIO and Cmake, but neither of these build systems will enable the CDC Serial Port. I flashed the DFU bootloader. The working Arduino config looks like this: The resulting verbose build, including flags, is here: https://gist.github.com/nathantsoi/10359f187b604c0c29f26face55c4abb I understand the build flags for PlatformIO should be:
However, this does not create the CDC Serial port. I also tried with the cmake build system, with this configuration:
Which also does not result in the activation of the CDC Serial port. I checked the outputs of all the builds and made sure the relevant flags exist in all cases, such as:
I'm happy to debug, but I'm not sure what I'm missing. Any direction is much appreciated. Also, note that am using the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @nathantsoi
In fact |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response, @fpistm. the I also realized when testing this that perhaps there is a fault before the program code is even executed (which would explain why no serial port is starting). Even the simplest blink sketch won't run. I checked the linker params and see that the flash offset is not set correctly, nor is the I tried manually setting these in the ninja linker config to no avail. Any suggestions on how I might debug any faults before entering the application code? Also, is Stm32 cubeIDE the suggested debugger? I've only used Eclipse. |
Beta Was this translation helpful? Give feedback.
-
Thanks again @fpistm. I tried again, this time on Windows, thinking it could be a problem w/the build chain on mac, but had no luck flashing the board at all, with either the DFU maple method or my st-link. How are you flashing the board, st-link? Are there build options I need to change depending on the method of flashing? |
Beta Was this translation helpful? Give feedback.
I've tested to create a project for AnalogReadSerial.ino and it works as expected. Here my CMakeFile.txt: