Page 1 of 5


Posted: Wed 2015-05-20 13:26
by Panu
  • Note: The UART shell extensions have been included in base VSOS installation since kernel version 3.25 and there is no need to download them separately any more.
Dear developers,

This is an alpha release of UART driver and shell utilites for developers, to facilitate development of UART controllable player software running on VSOS.

We've had some requests for easier controlling of VSOS/VS1005 over UART. And while VSOS has always been designed to allow control using various input methods such as UART, and there have been some examples and VSIDE templates to facilitate this, it has never been explored thoroughly. To make things easier for you and for us who are further developing UART and microcontroller control for VSOS systems and players, here's a package of utility programs and VSOS extensions to run a VSOS shell over UART.
voshell.png (24.37 KiB) Viewed 7424 times

This release contains:
- CONFIG.TXT example file to load the UART STDIN driver and the shell
- SHELL.AP3 toplevel shell, may be renamed to INIT.AP3 for systems with only UART control. It implements the "current directory" paradigm and intercepts calls to fopen() so that they look for files from the current directory also (the kernel fopen only accepts file names with absolute paths). It runs GETCMD to get a command line from STDIN (uart) and runs that command. Then it again runs GETCMD to get the next command.
+ Utility programs and libraries in the SYS folder:
- CD, to change current disk and directory.
- DIR, to list files and folders.
- GETCMD, the interactive command line editor called by SHELL.AP3.
- TYPE, to print contents of (ASCII) files.
- PLAYFILE and PLAYFILES to play music files of many formats.
- ID3PRINT to show ID3 tags (this is work in progress).
- UARTIN, the UART interrupt-controlled stdio driver. Handles FIFO buffer and Ctrl-C.

All source code is included in the solutions folder.

In addition, many of the existing utilities such as LIBLIST and LIBLIST2 work readily under the shell, please feel free to experiment.

Some highlights of the properties of the UART shell:
- interactive command line editing
- previous command can be retrieved with up arrow (vt100 terminal)
- concept of current directory
- buffered, interrupt handled UART stdio driver
- Ctrl-C to notify programs that they should close
- Ctrl-CCC to hard reset VS1005 (press Ctrl-C three times)

In the libvs1005g_vsos3 folder, please find the new header file consolestate.h, place it in your vside\libvs1005g_vsos3 folder.

We're looking forward to hearing about your experiences, problems and ideas for this technology. It's rather fun, really. The idea is that it looks and feels like a normal computer shell, but the output of various programs is formatted so that it would be easy to write microcontroller software that can use the system instead of a human. You can experiment (with HyperTerminal etc) what you can do with the system and then transfer that know-how to your microcontroller programs; to add music playing using different storage mediums such as SD cards or USB memory sticks very easily.

Have fun!

Re: VSOS UART Shell Extensions 1.0

Posted: Fri 2015-05-22 8:47
by Panu

Here's a couple of updates...

- a new version of getcmd with file name autocompletion with the TAB key. 8-)
- a new version of cd, fixed a bug with cd .. to a subdirectory .


VSOS UART Shell Extensions 1.10

Posted: Fri 2015-05-29 14:56
by Henrik

Here is an update to the VSOS UART Shell Extensions package.

While most of the shell programs have been slightly enhanced, the biggest changes are:
- There is now a PDF file that shows how to install and use the shell environment
- There is a new UART-controlled audio player program PlayDir which can play audio files in file name order

The UART-controlled player makes it now easy to use VS1005 as an independent slave processor, without needing to know any VS1005 C programming skills.

The shell environment is very much a work in progress, so we'd love to hear your feedback!

Kind regards,
- Henrik

Re: VSOS UART Shell Extensions 1.10

Posted: Fri 2015-05-29 18:51
by Panu

Thank you for your update to the VSOS UART Shell. Your modifications have made it better.

Here's screenshots of my PuTTY configuration which works well with the shell.


Re: VSOS UART Shell Extensions 1.1

Posted: Mon 2015-06-01 14:41
by Panu
Here's my TeraTerm setup for using the shell.


Re: VSOS UART Shell Extensions 1.11 + UART Player

Posted: Mon 2015-06-01 15:42
by Henrik
Hello again!

Here is yet another update to the VSOS UART Shell package.

New features are:
- PlayDir can take new commands, and it has a shuffle mode
- Documentation has been enhanced; among other things Panu's screen shots have been included

When you get around to testing it, we'd love to hear some feedback from you!

- Henrik

Re: VSOS UART Shell Extensions 1.0

Posted: Thu 2015-06-04 5:40
by Mark

I just received the VS1005 development board and breakout board, and just registered on this site. YOU READ MY MIND! This post is exactly how I am looking to control the VS1005 via another (primary) system controller. Thank you for this post and please continue to enhance this UART control capability.


Re: VSOS UART Shell Extensions 1.0

Posted: Thu 2015-06-04 11:31
by Panu
Hi, Mark, and welcome to the Forum!

Great that you find this approach useful! We're looking forward to hearing about your experiences and ideas!


-PS. The last update contained a version of PlayFiles which was not meant to be released.. until the next release, just use the one from the original 1.0 package.

UART control package for Breakout Board

Posted: Thu 2015-06-04 14:25
by Panu

I just did a first test of using the VS1005G Breakout Board with the UART shell. Since there's no SD card connector in the breakout board but there is a USB host (A) connector, it made sense to use an USB memory stick to play files from. There's some rough edges and some version clashes, but basically it's working, as you can see from the picture below:
bob_uart.png (53.48 KiB) Viewed 7295 times
Here's what I did:

I took a breakout board which had already been prepared for shipping - these are pre-programmed with VSOS 3.10 at the moment. I connected the VSIDE USB Uart Cable to the RX, TX, VHIGH and GND pins. I connected the USB MODE jumper between P1.7 and P1.9 (IOVDD and GPIO0.0). Then I plugged the UART cable and USB mini cable to the PC. At the PC I started some UART terminal software (PuTTY) to see what's going on in the breakout board.

As the board was preprogrammed with VSOS, the internal flash came up to Windows 7 Explorer. Then I dragged and dropped files from the UART Shell package version 1.10 and USBHOST driver and audio decoders from VSOS 3.22 root image. I edited the CONFIG.TXT to load USBHOST driver instead of the SD card driver. Then I removed the jumper and USB cable, and connected a USB memory stick instead. (Please remember that you must NOT connect both the PC cable and any USB memory stick at the same time because the VS1005 only has ONE USB port.) Then I resetted the breakout board (brutally by short circuiting CVDD with GND, not sure if that's really recommended :oops: ).

The board rebooted and the shell came up to the PuTTY terminal as you can see in the screenshot. I changed to the USB flash with D: and used DIR to see that indeed it was reading files from the USB memory stick. And I could use PLAYFILE and PLAYFILES to play MP3 music from the USB flash. Success.
bob_usb.jpg (64.06 KiB) Viewed 7295 times
Ok. Basically it's working but it's not perfect yet. The 3.10 kernel is quite old, actually almost too old to even attempt this. But for this simple test it seemed to be good enough to function. So the kernel at least should be updated. It displays some unnecessary messages which mess up the screen sometimes. And the USBHOST driver is also a bit old.

Here's the resulting root image for the breakout board so that you can repeat my test.

Good luck!


Re: VSOS UART Shell Extensions 1.0

Posted: Fri 2015-06-05 14:30
by Mark

I have started working with the project. I am having some issues operating this project on the development board, most likely due to my inexperience with the system. I cannot get the system to recognize the inserted SD card (that has the WAV files). I have tried to change the drive letter to D, which is how it was recognized with the as shipped demo. I have included the UART output below. Any guidance would be greatly appreciated.

Thank you - Mark

VSOS 3.22 build Mar 26 2015 13:50:25
VLSI Solution Oy 2012-2015 -
Starting the kernel.. Starting Devices...
External SPI Flash
Installed system devices:
S: SPI Flash c814, handled by FAT.
Load drivers, config 0...

Driver: SDSD... E'SDSD' E'noLibF' not loaded

Driver: RUN... FC00,D Y:0xfc00: 0x2000-13 -> 0x0
Driver: RUN... FC00,C Y:0xfc00: 0x0-12 -> 0x0
Driver: UARTIN...