Blue Pill, HID Bootloader 2.2.2, segmentation fault

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
Post Reply
Llama
Posts: 12
Joined: Sun Oct 22, 2023 4:35 pm

Blue Pill, HID Bootloader 2.2.2, segmentation fault

Post by Llama »

Hi,

I tried to upload Blinky via HID Bootloader, according to this video: Blue Pill Bootloader. The only difference: I used ST-Link v2 for uploading the bootloader.

My steps:

1. Unzip stm32_binaries.zip from release 2.2.2

2. Upload file stm32_binaries/F103/low_and_medium_density/hid_generic_pc13.bin via STM32CubeProgrammer, option ST-LINK, address 0x8000000, success.

3. Set project tools, Arduino IDE 2.2.1:

Board: "Generic STM32F1 series"
Port: "/dev/tty/ACM0" (grayed out)
Debug symbols and core logs: "None"
Optimize: "Smallest (-Os default)"
Board part number: "BluePill F103C8"
C Runtime Library: "Newlib Nano (default)"
Upload method: "HID Bootloader 2.2"
USB support (if available): "CDC (generic 'Serial' supersede U(S)ART)"
U(S)ART support: "Enabled (generic 'Serial')"
USB speed (if available): "Low/Full Speed"

4. Disconnect ST-Link, connect USB, (the Blue Pill LED starts blinking real fast), push Arduino IDE's Upload button to upload Blinky with some Serial output. My console output:

Sketch uses 27644 bytes (42%) of program storage space. Maximum is 65536 bytes.
Global variables use 4532 bytes (22%) of dynamic memory, leaving 15948 bytes for local variables. Maximum is 20480 bytes.

+-----------------------------------------------------------------------+
| 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 |
+-----------------------------------------------------------------------+

> Trying to open the [ttyACM0]...
error, counldn't open [/dev/ttyACM0]
> Unable to open the [ttyACM0]
> Searching for [1209:BEBA] device...
#
> [1209:BEBA] device is found !
> Sending <reset pages> command...
Failed uploading: uploading error: signal: segmentation fault (core dumped)

As I understand, "error, counldn't open [/dev/ttyACM0]" is no error at all, because the port is to be emulated after the successful upload. But the segmentation fault is...

What could be wrong?

NB The bootloader output says "v2.2.1" but it's been downloaded from 2.2.2 section, checked.
by fpiSTM » Mon Oct 23, 2023 7:54 am Go to full post
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Blue Pill, HID Bootloader 2.2.2, segmentation fault

Post by fpiSTM »

Llama
Posts: 12
Joined: Sun Oct 22, 2023 4:35 pm

Re: Blue Pill, HID Bootloader 2.2.2, segmentation fault

Post by Llama »

Thank you very much! udev rule it is.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Blue Pill, HID Bootloader 2.2.2, segmentation fault

Post by fpiSTM »

Welcome
Post Reply

Return to “STM32 HID bootloader”