I built my own STM32F103C8T6 board and used Linux tools under Ubuntu 14.04 to flash the board
~/Arduino/hardware/Arduino_STM32/tools/linux/stlink$ ./st-flash write generic_boot20_pc13.bin 0x08000000
Seems to flash OK, I tried a few more binaries from here:
https://github.com/rogerclarkmelbourne/ … 1/binaries
But after flashing, the USB does not register as ttyACM0 when it is plugged in.
I know the USB works because I have some C software I built using ST’s AC6 compiler
and when I flash it with that, then it does register as ttyACM0, and I can see regular serial data coming
out of it in the Arduino IDE serial monitor.
(As an aside, I can also program Arduino blink project to the board using STLink upload method
and it works! Amazing! So many moving parts come together to make it happen!
)
So where can I start / what I can do to make STM32duino-bootloader work?
Is it possible I misunderstood something – i.e. that I need to do something to the board to activate
the USB loader software by setting boot pins?
When you load a sketch and the sketch starts, the sketch code will emulate a serial device.
usb is initialized and enumerated by the sketch itself
make sure that the define SERIAL_USB is there in platforms.txt specified as a compile flag
run lsusb
with a sketch in a normal boot you would see 1eaf:0004 – serial usb device
if you connect into the dfu or ‘perpetual boot loader mode’ you would see 1eaf:0003 dfu boot loader
in the dfu mode you can install a sketch using dfu-util
http://www.stm32duino.com/viewtopic.php?f=22&t=1958
http://www.stm32duino.com/viewtopic.php … 0&start=10
When you load a sketch and the sketch starts, the sketch code will emulate a serial device.
If you select STLink as upload method then the Serial device is the USART1, not the USB.
Try loading the bootloader to the board, then upload using bootloader method, otherwise try SerialUSB.begin, SerialUSB.print etc.
#elif defined TARGET_STBEE
https://github.com/rogerclarkmelbourne/ … 1/binaries
If you select STLink as upload method then the Serial device is the USART1, not the USB.
Try loading the bootloader to the board, then upload using bootloader method, otherwise try SerialUSB.begin, SerialUSB.print etc.
#elif defined TARGET_STBEE
https://github.com/rogerclarkmelbourne/ … 1/binaries

