vdudouyt / stm8flash

program your stm8 devices with SWIM/stlinkv(1,2)
GNU General Public License v2.0
403 stars 183 forks source link

stm8flash fails to connect with the ST-Link/V2 #136

Closed johnfwhitmore closed 3 years ago

johnfwhitmore commented 3 years ago

I'm sure this is not an actual problem with stm8flash, but there's something missing from documentation, or install instructions. I have an ST-Link/V2, an official one from ST Micro and when connected to my Ubuntu machine it's recognised as that:

$ lsusb Bus 001 Device 007: ID 0483:3748 STMicroelectronics ST-LINK/V2

But when I try to program an STM8 microcontroller I simply get:

Determine FLASH area Could not open USB device.

I installed the ST LINK GUI package on Ubuntu and it can't connect to the device either, so there's something missing on the system. I thought it might be udev rules but assumed that the GUI Ubuntu package would install whatever udev rules were required. Been searching online but as yet haven't got anything helpful.

Thought I might ask here as this is the package I ultimately want to use and what I want to program the device with.

Sorry to bother ye, but struggling to find solution.

johnfwhitmore commented 3 years ago

Got it was using the wrong options :( 'stm8flash -c stlinkv2' rather then 'stm8flash -c stlink'