Ok, just so I’m clear on this… using the STLink, you can both program the STM32, and access it’s serial console via the STLink? But if you try to directly connect the STM32 via USB, even though it has a DFU bootloader, it doesn’t let you program it, or appear as a serial port?
Are you using one of these STM32F103C8s? Note there is a fault on them (mentioned further down that page) which needs a resistor to be changed before the USB works properly for some machines. I’ve got both them and the Maple Mini clones. I’ll try over the next day or two to see if I can get them up and running again on linux.
I just tried out two of the former F103C8s, and luckily enough it was one I’d programmed the DFU bootloader onto + a blinky sketch, so it did more than just enumerate as a device, but also loaded the serial port… without that, you won’t get the bottom 7 lines if you’re running dmesg -w
while connecting the device, but only the earlier ones.
[ 4041.388336] usb 4-1.6.2: new full-speed USB device number 18 using ehci-pci
[ 4041.586678] usb 4-1.6.2: New USB device found, idVendor=1eaf, idProduct=0003, bcdDevice= 2.01
[ 4041.586684] usb 4-1.6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4041.586687] usb 4-1.6.2: Product: Maple 003
[ 4041.586690] usb 4-1.6.2: Manufacturer: LeafLabs
[ 4041.586692] usb 4-1.6.2: SerialNumber: LLM 003
[ 4043.900270] usb 4-1.6.2: USB disconnect, device number 18
[ 4044.204989] usb 4-1.6.2: new full-speed USB device number 19 using ehci-pci
[ 4044.404781] usb 4-1.6.2: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 2.00
[ 4044.404786] usb 4-1.6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4044.404789] usb 4-1.6.2: Product: Maple
[ 4044.404792] usb 4-1.6.2: Manufacturer: LeafLabs
[ 4044.405337] cdc_acm 4-1.6.2:1.0: ttyACM0: USB ACM device
I haven’t changed the R10 resistor on this one, as I seemed to be able to get away with not doing that yet, but when I tried to program it, I had to retry it several times, and reset the board between attempts as it just sat in a state with PC13 ‘throbbing’… but it did finally take…