STM32F103C8T6 sketch upload using usb

Post here first, or if you can't find a relevant section!
Post Reply
Abhishek1352000
Posts: 7
Joined: Fri Apr 17, 2020 4:14 am

STM32F103C8T6 sketch upload using usb

Post 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)>
AndrewBCN
Posts: 105
Joined: Sun Apr 25, 2021 3:50 pm
Answers: 1
Location: Strasbourg, France

Re: STM32F103C8T6 sketch upload using usb

Post by AndrewBCN »

You first have to flash the HID bootloader using some other method.
See here: https://www.youtube.com/watch?v=Myon8H111PQ
Abhishek1352000
Posts: 7
Joined: Fri Apr 17, 2020 4:14 am

Re: STM32F103C8T6 sketch upload using usb

Post 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?
AndrewBCN
Posts: 105
Joined: Sun Apr 25, 2021 3:50 pm
Answers: 1
Location: Strasbourg, France

Re: STM32F103C8T6 sketch upload using usb

Post 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...
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32F103C8T6 sketch upload using usb

Post 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
Post Reply

Return to “General discussion”