Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post Reply
Frederik
Posts: 7
Joined: Thu Feb 08, 2018 3:44 pm

Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by Frederik » Thu Feb 08, 2018 5:30 pm

Hi,

I'm trying to upload a basic blink sketch on my STM32F103C8T6 via the ST-LINK V2 clone (both from Aliexpress)

I've connected the USB programmer with the blue pill (3.3V, GND, SWDIO and SWCLK) and set the BOOT0 to 1 and BOOT1 to 0

I am running mac OS High Sierra and in the Arduino IDE I have the following settings:
- Board: Generic STM32F103C series,
- Variant: STM32F103C8 (20k RAM. 64k FLash)
- CPU speed: 72MHz
- Upload method: STLink
- Port: not selected (not necessary with ST-LINK)
- Programmer: USBasp

I now try to blink the internal LED (PC13). The upload succeeds but nothing happens on the board.
The USB ST-LINK is recognized by my mac so no driver issues I think.

What else can I try?
Thanks!

User avatar
mrburnette
Posts: 2230
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by mrburnette » Thu Feb 08, 2018 8:27 pm

The blue pill is shown in the WiKi here: http://wiki.stm32duino.com/index.php?title=Blue_Pill

Upload via STlink is detailed here: http://wiki.stm32duino.com/index.php?ti ... ia_ST_Link

I do not use ST Link, so will not be any more help beyond just pointing out the resources available. It may be that you need to return the jumper to default and manually reset the board. From the WiKi link:
If you get the message:

No target connected
Unable to connect to ST-LINK!

This means that the ST-Link V2 adapter cannot communicate with the board. In this case check the hardware wires. Or, as alternative, you can also supply the 3.3V to the board only over the adapter, removing the USB cable, if any. Finally, if none of these helps, you should manually reset the board within 3 second after the upload process begins (red text printed in the output window).
We have lots of ST Link users, so maybe one will drop in and recognize your issue and have something to add in the way of true help.

Ray

fpiSTM
Posts: 319
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by fpiSTM » Fri Feb 09, 2018 7:46 am

Have you tried your STLink clone with an other board ? Is it functional ?

Are you sure that LED is on PC13?

Frederik
Posts: 7
Joined: Thu Feb 08, 2018 3:44 pm

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by Frederik » Fri Feb 09, 2018 12:20 pm

update:

I switched to a windows 10 laptop. Downloaded and installed the ST-LINK Driver (windows 8 version worked, not available for windows 10).
It still didn't upload the sketch.
Next I also installed ST-LINK utility. I think this contains necessary files that the ST-link needs.
Hereafter it worked. I was able to upload the blink sketch for Arduino.

The ST-LINK utility program doesn't have a mac version so I think the ST-LINK just doesn't really work on mac. At least not on mine.
I will just have to upload my sketches from windows.

fpiSTM
Posts: 319
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by fpiSTM » Fri Feb 09, 2018 2:29 pm

For MacOS, the tools provided with stm32 core's use the texane stlink which provide st-flash command for MacOS.
See: https://github.com/texane/stlink

https://github.com/rogerclarkmelbourne/ ... osx/stlink

You told:
The upload succeeds but nothing happens on the board.
Maybe it's only the reset which is not working.

User avatar
RogerClark
Posts: 7691
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OSthimg

Post by RogerClark » Fri Feb 09, 2018 8:55 pm

For the core, I originally just supported Windows, and used STM’s own CLI STLink tool ( exe j

However the same tool was not available for OSX or Linux.

So I changed everything,including Windows , to use Texane. However we found Texane does not work with all versions of STLink, it seems to only work with older versions.

So for Windows, I changed it back to use STM’s CLI tool.

I don’t think Texane is supported by any developers, so it’s unlikely it will ever support newer versions of STLink.

So there is nothing I can do, unless there is now a OSX and Linux CLI tool, which STM allow binary distribution.

(note. When I downloaded the Windows CLI, the license did not seem to preclude redistribution of the binaries)

fpiSTM
Posts: 319
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by fpiSTM » Sat Feb 10, 2018 9:17 am

Texane github is active.
I've already update the version to fix some issues.
So, I think you should take the last version and test it.

User avatar
RogerClark
Posts: 7691
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Problem with uploading on Blue Pill via ST-LINK V2 on mac OS

Post by RogerClark » Sat Feb 10, 2018 9:34 am

fpiSTM wrote:
Sat Feb 10, 2018 9:17 am
Texane github is active.
I've already update the version to fix some issues.
So, I think you should take the last version and test it.
OK.

If @Frederik can test it, I will update if it help

Post Reply