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