Page 1 of 1

STM32F103C8T6 sketch upload using usb

Posted: Sat May 29, 2021 12:06 pm
by Abhishek1352000
Hi i am new to the stm arduino world
I really would appreciate if someone can help me out with this
I am using stm32 blue pill bord , saw some video online to transfer data via usb using hid bootloader but when i upload the code it doesn't work.
shows error
Arduino: 1.8.15 (Windows 7), Board: "Generic STM32F1 series, BluePill F103C8, HID Bootloader 2.2, Enabled (generic 'Serial'), CDC (generic 'Serial' supersede U(S)ART), Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"
An error occurred while uploading the sketch

+-----------------------------------------------------------------------+

| HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool |

| (c) 2018 - Bruno Freitas http://www.brunofreitas.com |

| (c) 2018-2019 - Vassilis Serasidis https://www.serasidis.gr |

| Customized for STM32duino ecosystem https://www.stm32duino.com |

+-----------------------------------------------------------------------+



Usage: hid-flash <bin_firmware_file> <comport> <delay (optional)>

Re: STM32F103C8T6 sketch upload using usb

Posted: Sat May 29, 2021 3:17 pm
by AndrewBCN
You first have to flash the HID bootloader using some other method.
See here: https://www.youtube.com/watch?v=Myon8H111PQ

Re: STM32F103C8T6 sketch upload using usb

Posted: Sun May 30, 2021 8:58 am
by Abhishek1352000
AndrewBCN wrote: Sat May 29, 2021 3:17 pm You first have to flash the HID bootloader using some other method.
See here: https://www.youtube.com/watch?v=Myon8H111PQ
i programmed the stm by this video only.
my computer doesn't show the device when i connect it can it be the real problem?

Re: STM32F103C8T6 sketch upload using usb

Posted: Sun May 30, 2021 2:42 pm
by AndrewBCN
Abhishek1352000 wrote: Sun May 30, 2021 8:58 am ...
i programmed the stm by this video only.
my computer doesn't show the device when i connect it can it be the real problem?
What operating system are you using on your computer? If Windows, you have to install specific drivers for your computer to recognize the STM32F103C8T6 board. Linux doesn't have this problem...

Re: STM32F103C8T6 sketch upload using usb

Posted: Sun May 30, 2021 3:06 pm
by ag123
have you read these 1st?
viewtopic.php?f=2&t=3
viewtopic.php?f=2&t=301

either way for the 'official' STM core, these are the places to start
https://github.com/stm32duino/wiki/wiki
https://github.com/stm32duino/wiki/wiki/Getting-Started

either way a most robust way is to get a st-link v2 (you can program it and later use it to debug your sketch/firmware as well)
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html
https://octopart.com/search?q=st-link+v ... SD&specs=0

you can worry about 'boot loaders' another time, st-link v2 does 'everything' for beginners to pros
and by the way, you won't get anything done with a blue pill if you don't have either a st-link v2 or a usb-uart dongle.
for something more straight forward get a nucleo board listed on the core web site
https://github.com/stm32duino/Arduino_Core_STM32
and if you are starting out, get one with more resources such as the Nucleo STM32F401RE
https://github.com/stm32duino/Arduino_C ... -64-boards
the 'pros' can survive with 20k sram 64k flash in the stm32f103c8, some beginners hit the roof in no time trying to squeeze in there