Linux version of vs3emu

Using VSDSP legacy command line tools.
Post Reply
theophilus
Senior User
Posts: 21
Joined: Fri 2011-04-01 12:37

Linux version of vs3emu

Post by theophilus » Wed 2011-06-22 9:15

Greetings,

I am working on a Linux box with a USB to serial converter (ch341-uart) connected to the VS1000 Developer Board as /dev/ttyUSB0. I can use the win32 version of vs3emu.exe under Wine quite successfully with com1 linked to /dev/ttyUSB0, but the Linux version of vs3emu gives the following error when I try to use it:

$ vs3emu -chip vs1000 -s 115200 -l hello.bin
VSEMU 2.2 Nov 12 2010 16:45:47(c)1995-2010 VLSI Solution Oy
Clock 11999 kHz
Using serial port 1, Serial port input speed (4098) setting failed, errno: 5

It doesn't appear to be a rights issue because I am a member of a group that has rw access to /dev/ttyUSB0.

It's not a train smash if I can't use the Linux version, but I'm curious to know if there is a simple solution.

Thanks
Steven

theophilus
Senior User
Posts: 21
Joined: Fri 2011-04-01 12:37

Re: Linux version of vs3emu

Post by theophilus » Wed 2011-06-22 11:17

Found the answer:

The Linux version of vs3emu is trying to use ttyS0 as the first serial port. So, just:

rm /dev/ttyS0
ln -s /dev/ttyUSB0 /dev/ttyS0

But, you'll have to do this each time you reboot (e.g. in rc.local or something like that).

Steven

theophilus
Senior User
Posts: 21
Joined: Fri 2011-04-01 12:37

Re: Linux version of vs3emu

Post by theophilus » Thu 2011-06-23 8:13

Hello again,

I have another problem relating to the above. My rc.local file contains:
rm -f /dev/ttyS0
ln -s /dev/ttyUSB0 /dev/ttyS0

If I run vs3emu after a fresh reboot of the Linux host, then I get the following:

$ vs3emu -chip vs1000 -s 115200 -l hello.bin
VSEMU 2.2 Nov 12 2010 16:45:47(c)1995-2010 VLSI Solution Oy
Clock 11999 kHz
Using serial port 1,

... and it just gets stuck there forever.

If I first run the win32 version under wine (which works fine) and then run the Linux version, then the Linux version works fine:

$ wine vs3emu.exe -chip vs1000 -s 115200 -l hello.bin
VSEMU 2.1 Oct 1 2008 13:34:08(c)1995-2007 VLSI Solution Oy
Clock 12000 kHz
Using serial port 1, COM speed 115200
Waiting for a connection to the board...
Caused interrupt
Chip version "1000"
Stack pointer 0x19e0, bpTable 0x7d4d
User program entry address 0x4083
hello.bin: includes optional header, 4 sections, 435 symbols
Section 1: code page:0 start:80 size:3 relocs:1 fixed
Section 2: const_x page:1 start:8096 size:14 relocs:0
Section 3: main page:0 start:83 size:14 relocs:2
Section 4: VS_stdiolib page:0 start:97 size:50 relocs:13
> g 0x50
> e
Hello, World!

$ vs3emu -chip vs1000 -s 115200 -l hello.bin
VSEMU 2.2 Nov 12 2010 16:45:47(c)1995-2010 VLSI Solution Oy
Clock 11999 kHz
Using serial port 1, COM speed 115200
Waiting for a connection to the board...

Caused interrupt
Chip version "1000"
Stack pointer 0x19e0, bpTable 0x7d4d
User program entry address 0x7526
hello.bin: includes optional header, 4 sections, 435 symbols
Section 1: code page:0 start:80 size:3 relocs:1 fixed
Section 2: const_x page:1 start:8096 size:14 relocs:0
Section 3: main page:0 start:83 size:14 relocs:2
Section 4: VS_stdiolib page:0 start:97 size:50 relocs:13
> g 0x50
> e
Hello, World!

Can anyone explain this?

The host operating system is Fedora 15, with Linux kernel 2.6.38.7-30.fc15.i686.PAE.

Thanks
Steven

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2697
Joined: Tue 2010-06-22 13:43

Re: Linux version of vs3emu

Post by Panu » Thu 2011-06-23 14:36

:roll:
Oops, I didn't even know that we have given a Linux version of VSKIT to the general distribution.. :oops:

Sorry, I don't know about this but I'll ask around... :)

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply