2010-02-08 03:19 PM
STM8S-Discovery for Linux
#linux-usb-stm8s2011-05-17 06:07 AM
Hello
Yes, the OS is windows, you can try to use raisonance There is free 16KB version available. I heard the Raisonance would extend their free version to larger memeory size in the coming weeks. Cosmic is usually pretty stable. What is the version OF the OS, Have you posted a request on cosmic support?2011-05-17 06:07 AM
James,
the STM8S discovery uses the standard ST toolchain. STVD and STVP. I guess in your approach you would need a linux version of STVP. Have to check whether this exists ... Ciao Alex2011-05-17 06:07 AM
Hi Alex,
can you please give me a short info too, if you find something suitable for linux. I'm working with Ubuntu. Thanks Horst2011-05-17 06:07 AM
Hi Alex,
Have you found out anything, yet? I'm searching for a way to debug the STM8S-Discovery on Ubuntu, too, and I'm glad to have no Win-Boxes around me. I've tried to use the STVD debugger via Wine, but (somewhat expectedly) I only get ''Connection error (usb://usb): swim error [30200]: st-link connection error'' So I'd love to test a native Linux version, too, if there is any available. A.-H.2011-05-17 06:07 AM
Hi, I am interested in linux design flow as well. I tried to plug the STM8-Discovery board into my Ubuntu. The mass storage device is somehow detected. But each state change of the LED (on->off, off->on) caused to generate some USB error in the /var/log/messages file.
I will have a look on it later. But that might be the problem why programming end with ''Connect error''.2011-05-17 06:07 AM
Hi guys,
The solution I have found is not completely satisfactory - but it works well. I've installed a Windows XP virtual machine using VirtualBox. The STVD package and its USB interface works properly with the STM8S-Discovery module and I can compile and debug flawlessly. A proper Linux IDE would be nicer but this does work!2011-05-17 06:07 AM
Hi, the /var/log/messages is below. I don't know if it helps anybody to decide what is wrong. But it seems to me that there is some discrepancy between USB implementation in linux kernel and in STM32 debugger. I still don't have usbmon installed on my Ubuntu Jaunty, but somebody else here might have.
Jul 28 07:53:04 supermuf kernel: [50410.844048] usb 5-1: new full speed USB device using uhci_hcd and address 2 Jul 28 07:53:04 supermuf kernel: [50411.013329] usb 5-1: configuration #1 chosen from 1 choice Jul 28 07:53:04 supermuf kernel: [50411.234429] Initializing USB Mass Storage driver... Jul 28 07:53:04 supermuf kernel: [50411.236944] scsi2 : SCSI emulation for USB Mass Storage devices Jul 28 07:53:04 supermuf kernel: [50411.237309] usbcore: registered new interface driver usb-storage Jul 28 07:53:04 supermuf kernel: [50411.237316] USB Mass Storage support registered. Jul 28 07:53:09 supermuf kernel: [50416.240871] scsi 2:0:0:0: Direct-Access STM32 PQ: 0 ANSI: 0 Jul 28 07:53:09 supermuf kernel: [50416.292869] sd 2:0:0:0: [sdb] 64000 512-byte hardware sectors: (32.7 MB/31.2 MiB) Jul 28 07:53:09 supermuf kernel: [50416.295868] sd 2:0:0:0: [sdb] Write Protect is on Jul 28 07:53:09 supermuf kernel: [50416.416061] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:10 supermuf kernel: [50416.680056] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:10 supermuf kernel: [50416.944041] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:10 supermuf kernel: [50417.208047] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:10 supermuf kernel: [50417.472047] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:11 supermuf kernel: [50417.756047] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:11 supermuf kernel: [50417.907476] sd 2:0:0:0: [sdb] 64000 512-byte hardware sectors: (32.7 MB/31.2 MiB) Jul 28 07:53:11 supermuf kernel: [50417.910463] sd 2:0:0:0: [sdb] Write Protect is on Jul 28 07:53:11 supermuf kernel: [50417.910480] sdb: Jul 28 07:53:11 supermuf kernel: [50418.036063] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:11 supermuf kernel: [50418.300058] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:11 supermuf kernel: [50418.564306] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:12 supermuf kernel: [50418.832051] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:12 supermuf kernel: [50419.096051] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:12 supermuf kernel: [50419.360043] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:12 supermuf kernel: [50419.508121] sd 2:0:0:0: [sdb] Attached SCSI removable disk Jul 28 07:53:12 supermuf kernel: [50419.508248] sd 2:0:0:0: Attached scsi generic sg2 type 0 Jul 28 07:53:13 supermuf kernel: [50419.812053] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:13 supermuf kernel: [50420.080049] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:13 supermuf kernel: [50420.344048] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:13 supermuf kernel: [50420.608064] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:14 supermuf kernel: [50420.872044] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:14 supermuf kernel: [50421.136043] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:14 supermuf kernel: [50421.428041] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:15 supermuf kernel: [50421.692055] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:15 supermuf kernel: [50421.956048] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:15 supermuf kernel: [50422.220133] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:15 supermuf kernel: [50422.484047] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:16 supermuf kernel: [50422.764044] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:16 supermuf kernel: [50422.910349] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK Jul 28 07:53:16 supermuf kernel: [50423.028048] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:16 supermuf kernel: [50423.292059] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:16 supermuf kernel: [50423.556039] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:17 supermuf kernel: [50423.824056] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:17 supermuf kernel: [50424.088060] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:17 supermuf kernel: [50424.356051] usb 5-1: reset full speed USB device using uhci_hcd and address 2 Jul 28 07:53:18 supermuf kernel: [50424.932110] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK Jul 28 07:53:18 supermuf kernel: [50424.932280] usb 5-1: USB disconnect, address 2 Jul 28 07:53:18 supermuf kernel: [50424.934701] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK Jul 28 07:53:18 supermuf kernel: [50424.934829] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK Jul 28 07:53:18 supermuf kernel: [50424.935645] scsi 2:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK Jul 28 07:53:18 supermuf kernel: [50424.935667] scsi 2:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK2011-05-17 06:07 AM
2011-05-17 06:07 AM
I have added in Versaloon support to STM8_SWIM.
The command line program of Versaloon is compiled using GCC(with autotool). The GUI program is compiled using Lazarus, which is multi-platform compiler. The firmware can be compiled using CodesourceryG++, but IAR EWARM KickStart is recommended. Check below: There is also information about using Versaloon in STM8S-Discovery(in japanese): But note that, you will destory original st-link in STM8S-Discovery.