I am sorry, I did not know there was another page started.
dmesg:
[ 562.369009] usb 1-2: new full-speed USB device number 9 using xhci_hcd
[ 562.522910] usb 1-2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[ 562.522930] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 562.522938] usb 1-2: Product: FT232R USB UART
[ 562.522944] usb 1-2: Manufacturer: FTDI
[ 562.522950] usb 1-2: SerialNumber: A10JPDOO
[ 562.526815] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
[ 562.526885] usb 1-2: Detected FT232R
[ 562.527670] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
libmaple makefiles
Re: libmaple makefiles
apparently that is your FTDI dongle, that isn't the default Serial in stm32duino.
for the default Serial, simply connect the (micro) usb cable to the bluepill stm32f103c8, no dongle is needed
for the UART serial, try Serial1 (pa9 tx, pa10 rx) instead
for the default Serial, simply connect the (micro) usb cable to the bluepill stm32f103c8, no dongle is needed
for the UART serial, try Serial1 (pa9 tx, pa10 rx) instead
Re: libmaple makefiles
Success! It comes up as; /dev/ttyACM0
Re: libmaple makefiles
For informational purposes, I flash the broad using the dongle on pins(pa9 tx, pa10 rx). Can you flash the broad using the micro usb?
Re: libmaple makefiles
you need a bootloader, e.g.
https://github.com/rogerclarkmelbourne/ ... bootloader
get the generic_boot20_pc13.bin or generic_boot20_pc13_fastboot.bin
https://github.com/rogerclarkmelbourne/ ... r/binaries
that
-DVECT_TAB_ADDR=0x8002000 to -DVECT_TAB_ADDR=0x8000000
has to go back to -DVECT_TAB_ADDR=0x8002000
your ldscript in the makefile should be
(there are different ld scripts with different start address as like that VECT_TAB_ADDR,
https://github.com/rogerclarkmelbourne/ ... 32f103c/ld
choose the appropriate ld script e.g. bootloader_20.ld is for the bootloader)
rebuild your sketch
you need to install the bootloader 1st using your FTDI dongle, as like how you install your sketch. (normally only once would do)
then you need dfu-util
https://dfu-util.sourceforge.net/
(it is also there in tools if you downloaded the stm32duino repository)
normally after pressing reset, run (that is lower case -L)
it should show you a list of possible selections
get the command ready
connect usb, press reset, the led start blinking, you have about 3 seconds when the led blinks to *press enter*, it should flash away
https://github.com/rogerclarkmelbourne/ ... bootloader
get the generic_boot20_pc13.bin or generic_boot20_pc13_fastboot.bin
https://github.com/rogerclarkmelbourne/ ... r/binaries
that
-DVECT_TAB_ADDR=0x8002000 to -DVECT_TAB_ADDR=0x8000000
has to go back to -DVECT_TAB_ADDR=0x8002000
your ldscript in the makefile should be
Code: Select all
ldscript := bootloader_20.ld
https://github.com/rogerclarkmelbourne/ ... 32f103c/ld
choose the appropriate ld script e.g. bootloader_20.ld is for the bootloader)
rebuild your sketch
you need to install the bootloader 1st using your FTDI dongle, as like how you install your sketch. (normally only once would do)
then you need dfu-util
https://dfu-util.sourceforge.net/
(it is also there in tools if you downloaded the stm32duino repository)
normally after pressing reset, run (that is lower case -L)
Code: Select all
dfu-util -l
get the command ready
Code: Select all
dfu-util -a 2 -RD mysketch.bin
Last edited by ag123 on Mon May 29, 2023 10:16 am, edited 2 times in total.
Re: libmaple makefiles
I followed your instructions and now I am able to flash through the micro usb.
The only command that did not work was dfu-util -l (did not show a list), but everything else worked.
Thanks
The only command that did not work was dfu-util -l (did not show a list), but everything else worked.
Thanks
Re: libmaple makefiles
These days this is probably the 'preferred' way to use the 'old' Libmaple core, e.g. you can use that makefile with eclipse. requires eclipse-CDT (c developers toolkit)
it is much more usable with reference jumps for symbols and even debug (requires st-link dongle)
the alternative is the 'old' Arduino IDE that is java based.
it is much more usable with reference jumps for symbols and even debug (requires st-link dongle)
the alternative is the 'old' Arduino IDE that is java based.
Re: libmaple makefiles
I will give it a try in the future, but the Makefile works great. I will be recommending these posts.