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 7425 times

VSOS UART shell

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.

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!

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.

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 7296 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 ).

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 7296 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.

I have started working with the VSOS_UART_Shell_Extensions_111.zip 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.