VS1010 utility programs

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
Aleksi
User
Posts: 7
Joined: Wed 2019-06-12 10:03

VS1010 utility programs

Post by Aleksi » Fri 2019-08-23 7:48

Greetings!


Here are two small utility programs called "Delete" and "Copy". With these programs you can delete and copy files (NOT folders) directly from terminal.

To use program "Delete" you need to insert delete.dlx file into your SYS folder and to delete some file (lets say test.txt from sys folder) you can give command "delete D:sys/test.txt".

To use program "Copy" you need to insert copy.dlx as well as program ParamSpl.dlx (handles the parameters given to program Copy) to your sys folder. To copy a file you need to give command "copy source destination". For example "copy D:test.txt D:newTest.txt". Note that destination filename can not be longer than 8.3 characters. For example "12345678.123" is fine.

Binaries are provided below as well as solution files for further development.


I hope this is helpful for you. Feedback and questions are welcome!


Kind regards,

VLSI Solution's trainee
Aleksi
Attachments
ParamSpl.dlx
ParamSpl program, VS1010 VSOS executable
(898 Bytes) Downloaded 15 times
Delete.dlx
Delete program, VS1010 VSOS executable
(1.17 KiB) Downloaded 15 times
Copy.dlx
Copy program, VS1010 VSOS executable
(2.83 KiB) Downloaded 17 times
arch-Delete-2019-08-23-08-34-RC1.zip
Delete program, VSIDE Solution with source code
(20.71 KiB) Downloaded 23 times
arch-Copy-2019-08-23-08-33-RC1.zip
Copy program, VSIDE Solution with source code
(22.16 KiB) Downloaded 17 times
arch-ParamSpl-2019-07-05-14-22-RC1.zip
ParamSpl program, VSIDE Solution with source code
(12.86 KiB) Downloaded 23 times

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

Re: VS1010 utility programs

Post by Panu » Fri 2019-11-08 12:37

DiskFree, ported from VS1005 VSOS 3.54 root sources to VS1010D.

Here's a handy way to run DiskFree from your program:

Code: Select all

extern u_int32 scratch;
ioresult main (char *params) {

	RunLib("DISKFREE","-p 1401 D:");
	printf("D: has %ld kB free.\n",scratch);

}
And the result:
VS1010>free
D: has 959968 kB free.

VS1010>
This takes advantage of 5 words of fixed scratch area in VS1010, which is in X address 1401. Make sure you have both DiskFree.dlx and ParamSpl.dlx in your SYS folder.
Attachments
DiskFree.dlx
DiskFree.dlx, VS1010D VsOs executable. Place this file and ParamSpl.dlx to your S:SYS/ folder.
(6.76 KiB) Downloaded 13 times
arch-DiskFree-2019-11-08-12-34-VS1010D.zip
VsOs DiskFree for VS1010D. VSIDE solution with source code.
(25.32 KiB) Downloaded 12 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

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

GpioCheckPins

Post by Panu » Tue 2019-11-19 12:10

Here's a small program, GpioCheckPins, which keeps printing the states of all GPIO pins until ESC key is pressed. It's useful for checking which pins your board's buttons are connected to. Pushing the buttons causes the corresponding number to change between 0 and 1.

Here's the printout:

Code: Select all

VS1010>GpioPinCheck
 0.0123456789abcdef 1.0123456789abcdef 2.0123456789abcdef
   0001101110100000   1111000010011100   1111101100001100
Here's the code:

Code: Select all

ioresult main (char *params) {
	int i,j;
	for (j=0; j<3; j++) {
		printf(" %d.",j);
		for (i=0; i<16; i++) {
			printf("%x",i);
		}
	}
	printf("\n");
	while(USEX(1700) != 27) { // Check for UART0 console ESC key in VS1010 without requiring symbols
		printf("\r");
		for (j=0; j<3; j++) {
			printf("   ");
			for (i=0; i<16; i++) {
				printf("%x",GpioReadPin(j*16+i));
			}
		}
	}
}
Attachments
GpioPinCheck.dlx
VS1010 VSOS Executable
(892 Bytes) Downloaded 4 times
arch-GpioPinCheck-2019-11-19-12-09-v1.zip
Source code
(6.39 KiB) Downloaded 4 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply