Page 1 of 1
HID Upload Error Arduino
Posted: Wed Jun 10, 2020 9:47 am
by Matt303
I'm getting the error described below which does not indicate much info, here is the video guide I followed. I have tried this on 5 different blue pills, some of which are 128k they are all different models from different batches/suppliers. I uploaded the stm32 binaries via st-link 32.
https://www.youtube.com/watch?v=Myon8H111PQ
Code: Select all
Sketch uses 27032 bytes (41%) of program storage space. Maximum is 65536 bytes.
Global variables use 3844 bytes (18%) of dynamic memory, leaving 16636 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 |
+-----------------------------------------------------------------------+
An error occurred while uploading the sketch
Usage: hid-flash <bin_firmware_file> <comport> <delay (optional)>
Re: HID Upload Error Arduino
Posted: Wed Jun 10, 2020 11:34 am
by fpiSTM
Which core you used ?
Anyway some issues have already been submitted on the HID Bootloader:
https://github.com/Serasidis/STM32_HID_ ... der/issues
Re: HID Upload Error Arduino
Posted: Wed Jun 10, 2020 10:57 pm
by Matt303
I'm using the official stm32 core v1.9.0 I have already been through all those but nothing there to help me with my problem. Am I best to comment there rather than on here? I'm using Arduino 1.8.12 with windows 10. After flashing the low-medium density binaries for pc-13 the blue pill will show up as HID compliant vendor-defined device in the device manager. I have tried a full chip erase as suggested elsewhere without any luck. I don't think it's an issue with the blue pills but the HID upload process which does not indicate what the error was. Do you think this is a bug issue and should be posted as an issue on GitHub?
Edit:
I have gone back and tried v1.8.0 core with the exact same results. Could this be a possible driver issue with windows? Is there a way to debug the HID-Flash tool? I did notice some warnings if they are related or not. Same warnings with v1.8.0 and v1.9.0
Code: Select all
In file included from C:\Users\Matthew\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SrcWrapper\src\HAL\stm32yyxx_hal_tim_ex.c:5:
C:\Users\Matthew\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c: In function 'HAL_TIMEx_RemapConfig':
C:\Users\Matthew\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1734:60: warning: unused parameter 'htim' [-Wunused-parameter]
1734 | HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap)
| ~~~~~~~~~~~~~~~~~~~^~~~
"C:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\xpack-arm-none-eabi-gcc\\9.2.1-1.1/bin/arm-none-eabi-gcc" -mcpu=cortex-m3 -mthumb "@C:\\Users\\Matthew\\AppData\\Local\\Temp\\arduino_build_538584/sketch/build_opt.h" -c -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD "-IE:\\Documents\\Arduino\\BP_pwm_out" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/avr" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/LL" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/usb" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/OpenAMP" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/usb/hid" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/usb/cdc" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/STM32F1xx_HAL_Driver/Inc" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/STM32F1xx_HAL_Driver/Src" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/STM32F1xx" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/ST/STM32_USB_Device_Library/Core/Src" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP/open-amp/lib/include" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP/libmetal/lib/include" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP/virtual_driver" -DSTM32F1xx -DARDUINO=10812 -DARDUINO_BLUEPILL_F103C8 -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"BLUEPILL_F103C8\"" -DSTM32F103xB -DUSBCON -DUSBD_VID=0 -DUSBD_PID=0 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DHAL_UART_MODULE_ENABLED -DBL_HID -DVECT_TAB_OFFSET=0x800 "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\CMSIS\\5.5.1/CMSIS/Core/Include/" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\CMSIS\\5.5.1/CMSIS/DSP/Include" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\variants\\PILL_F103XX" "-IC:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\libraries\\SrcWrapper\\src" "C:\\Users\\Matthew\\AppData\\Local\\Arduino15\\packages\\STM32\\hardware\\stm32\\1.9.0\\libraries\\SrcWrapper\\src\\HAL\\stm32yyxx_hal_wwdg.c" -o "C:\\Users\\Matthew\\AppData\\Local\\Temp\\arduino_build_538584\\libraries\\SrcWrapper\\HAL\\stm32yyxx_hal_wwdg.c.o"
C:\Users\Matthew\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1734:75: warning: unused parameter 'Remap' [-Wunused-parameter]
1734 | HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap)
| ~~~~~~~~~^~~~~
I gave up on the HID upload and just did the upload via the STM cube swd option using st link v2 and have serial enabled for future uploads via com port. Even this does not work and it shows up correctly in the device manager and I have the correct com port selected. This all used to work fine months ago when I programmed up 5+ blue pills for other projects. Now nothing works. I'm wondering if it's linked to Arduino massive shut down yesterday that stopped the IDE from working and everyone had to delete package-index.json files and cache and reinstall Arduino. Even the serial port is working and getting data back on serial monitor so something strange going on with the HID-Flash. Whether this is because I have bypassed the HID upload method first and did it via the cube swd and switched back to HID and this is not compatible?
Code: Select all
Sketch uses 27032 bytes (41%) of program storage space. Maximum is 65536 bytes.
Global variables use 3844 bytes (18%) of dynamic memory, leaving 16636 bytes for local variables. Maximum is 20480 bytes.
C:\Users\Matthew\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\1.4.0/tools/win/hid-flash.exe C:\Users\Matthew\AppData\Local\Temp\arduino_build_538584/BP_pwm_out.ino.bin COM5
+-----------------------------------------------------------------------+
| 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 [COM5]...
> Toggling DTR...
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM5] ...
> [COM5] is found !
> Finish
the selected serial port > Finish
does not exist or your board is not connected
Re: HID Upload Error Arduino
Posted: Fri Jan 06, 2023 3:58 am
by caution01
You need to select Tools-> CDC (generic ‘Serial’ supersede U(S)ART) in the Arduino IDE.
then you will get something like this
. 29696 Bytes
. 30720 Bytes
. 31744 Bytes
> Done!
> Sending <reboot mcu> command...
> Searching for [COM18] ...
> [COM18] is found !
> Finish
Re: HID Upload Error Arduino
Posted: Mon May 01, 2023 11:55 am
by manf1998
Hello, I allow myself to contact you because I have the same problem as you. I would like to know how did you solve this problem please.
knowing that the arduino recognized the port but during the upload the port disconnects on its own
Thanks in advance
Sketch uses 23576 bytes (35%) of program storage space. Maximum is 65536 bytes.
Global variables use 3856 bytes (18%) of dynamic memory, leaving 16624 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 [COM4]...
> Toggling DTR...
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found

> Searching for [COM4] ...
> Finish
Failed uploading: uploading error: exit status 1
Re: HID Upload Error Arduino
Posted: Mon May 01, 2023 1:38 pm
by GonzoG
" Error - [1209:BEBA] device is not found"
Means that your board does not have HID bootloader or it couldn't be booted into bootloader.
Port has to disconnect, as the board needs to reset to enter bootloader.