STM32F103C8T6 installation for arduino ide via ST LINK

Good day sirs, ive recently bought stm32f1 cheap blue pills and st link v2. And i want to code the stm32 via arduino ide to create hid joystick devices.

I tried to connect the stm32 with stlink

I followed the new and old yt tutorials butwhenever i upload from the ide, it says err reconnect or no port etc even when i change the board type or replug, reset, bootload0 to 1 or bootload1 to 1 still the same error

Can anyone help me on how to configure this?

What should i do to make the stm32 blue pill be programmable via arduino ide?

In my opinion Serial upload with a USB adapter is simpler than ST-Link

1 Like

already followed the steps but it keeps giving me this output

Failed uploading: uploading error: exit status 127 :frowning:

Did you separately install the STM32Cube programmer?

yes but its in the default program files folder

Turn on verbose output for upload in preferences and show your detailed upload logging

This is what a upload should look like.

      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.9.0                  
      -------------------------------------------------------------------

ST-LINK SN  : 2B2B080132124353354B4E00
ST-LINK FW  : V2J37S7
Board       : --
Voltage     : 3.20V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 128 KBytes
Device type : MCU
Device CPU  : Cortex-M3
BL Version  : --



Memory Programming ...
Opening and parsing file: STM32_blink.ino.bin
  File          : STM32_blink.ino.bin
  Size          : 11252 Bytes
  Address       : 0x08000000 


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 10]
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:00.329

RUNNING Program ... 
  Address:      : 0x8000000
Application is running, Please Hold on...
Start operation achieved successfully

Also update your st link v2 driver with STM32cube

this is what it says

22:53:36 : UR connection mode is defined with the HWrst reset mode
22:53:36 : ST-LINK SN : B55B5A1A000000002158F001
22:53:36 : ST-LINK FW : V2J28S7
22:53:36 : Board : --
22:53:36 : Voltage : 4.00V
22:53:36 : SWD freq : 4000 KHz
22:53:36 : Connect mode: Normal
22:53:36 : Reset mode : Software reset
22:53:36 : Device ID : 0x410
22:53:36 : Revision ID : --
22:53:36 : Debug in Low Power mode is not supported for this device.
22:53:36 : UPLOADING OPTION BYTES DATA ...
22:53:36 : Bank : 0x00
22:53:36 : Address : 0x4002201c
22:53:36 : Size : 8 Bytes
22:53:36 : Bank : 0x01
22:53:36 : Address : 0x1ffff800
22:53:36 : Size : 16 Bytes
22:53:36 : UPLOADING ...
22:53:36 : Size : 1024 Bytes
22:53:36 : Address : 0x8000000
22:53:36 : Read progress:
22:53:36 : Data read successfully
22:53:36 : Time elapsed during the read operation is: 00:00:00.008

i already updated it :slight_smile: what should i do next?

What Arduino IDE is that V2.x ?
Can't help with V2 as I never use it.

Its the very recent one since i just installed it a few days ago

I got that output from cube programmer since i cant upload from arduino ide....

Do you installed a STM32 Arduino package? And if so - what the package you installed?

Too much guess work here...
Describe your Stm32 package, exact board, board settings, upload method you tried and what error lines unsuccessful upload printed.

http://dan.drown.org/stm32duino/package_STM32duino_index.json
https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

i installed the stm32 packages from these

i restarted after i installed the boards and drivers, and reuploaded
it works. then when i uploaded a blink sketch to blink PC13, nothing happens.
i tried to reset the board by pressing the reset button. now it wont work... even the ST link is not connecting.... it gives me this output:

ARDUINO IDE:
ST-LINK error (DEV_USB_COMM_ERR)
Failed uploading: uploading error: exit status 1

Cube programmer:
14:30:45 : UR connection mode is defined with the HWrst reset mode
14:30:50 : ST-LINK error (DEV_USB_COMM_ERR)
14:30:50 : Error: Problem occured while trying to connect

STLink utility:
14:32:53 : STLink USB communication error

Are those real stm32, what's written on the chip?

also that voltage 4.00V looks weird to me

This core is no longer supported. It was originally written by Roger Clark.

I found this guide quite helpful but it is a long time since I've used the Blue Pill. Program "blue pill" with STM32 Cores in Arduino IDE ยท One Transistor

1 Like

acknowledged, i removed it and its boards but still the same issues remain.
and yes they are real STM32s blue pill [STM32F103C8T6] i believe the 4V is rounded from the 3.3 volts

Mine is showing 3.24V

If you are getting errors in CubeProgrammer, doesn't make much sense to play with arduino ide.