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 146 times
Delete.dlx
Delete program, VS1010 VSOS executable
(1.17 KiB) Downloaded 132 times
Copy.dlx
Copy program, VS1010 VSOS executable
(2.83 KiB) Downloaded 126 times
arch-Delete-2019-08-23-08-34-RC1.zip
Delete program, VSIDE Solution with source code
(20.71 KiB) Downloaded 141 times
arch-Copy-2019-08-23-08-33-RC1.zip
Copy program, VSIDE Solution with source code
(22.16 KiB) Downloaded 140 times
arch-ParamSpl-2019-07-05-14-22-RC1.zip
ParamSpl program, VSIDE Solution with source code
(12.86 KiB) Downloaded 138 times

User avatar
Panu
VLSI Staff
Posts: 2798
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 115 times
arch-DiskFree-2019-11-08-12-34-VS1010D.zip
VsOs DiskFree for VS1010D. VSIDE solution with source code.
(25.32 KiB) Downloaded 126 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
Posts: 2798
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 122 times
arch-GpioPinCheck-2019-11-19-12-09-v1.zip
Source code
(6.39 KiB) Downloaded 128 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
Posts: 2798
Joined: Tue 2010-06-22 13:43

RTC aware file copy

Post by Panu » Thu 2020-01-02 20:37

This program copies a file to a new file and runs RTCREAD to update the system time from RTC hardware so that the target file has a correct date and time, if the RTC has correct date and time. Does not create long file names.

usage:
copy d:fromfile.ext d:tofile.ext


-Panu
Attachments
copy.dlx
VS1010 VSOS Executable
(1.85 KiB) Downloaded 111 times
arch-copy-2020-01-02-20-32-RTC.zip
Source code
(7.03 KiB) Downloaded 101 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

AAT
User
Posts: 7
Joined: Fri 2021-01-08 18:07

Re: VS1010 utility programs

Post by AAT » Sat 2021-01-30 1:36

Can you provide a utility to create a new Directory on the SPI drive (S: or D:)? (mkdir or equivalent).

User avatar
pasi
VLSI Staff
Posts: 1764
Joined: Thu 2010-07-15 16:04

Re: VS1010 utility programs

Post by pasi » Wed 2021-02-10 11:09

AAT wrote:
Sat 2021-01-30 1:36
Can you provide a utility to create a new Directory on the SPI drive (S: or D:)? (mkdir or equivalent).
Your request has been fulfilled here: viewtopic.php?f=15&t=2737
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

terop
User
Posts: 4
Joined: Thu 2021-01-28 12:54

Re: VS1010 utility programs

Post by terop » Fri 2021-02-26 14:41

Here's some more utility programs:
1) Format
2) Date
3) Time
Attachments
Time.dlx
(1.37 KiB) Not downloaded yet
time.zip
(46.22 KiB) Not downloaded yet
Date.dlx
(11.66 KiB) Not downloaded yet
date.zip
(110.17 KiB) Not downloaded yet
Format.dlx
(16.2 KiB) Not downloaded yet
format.zip
(130.08 KiB) Not downloaded yet

terop
User
Posts: 4
Joined: Thu 2021-01-28 12:54

Re: VS1010 utility programs

Post by terop » Fri 2021-02-26 14:42

And some more minor utilities:
1) Delay
2) Echo
Attachments
Echo.dlx
(2.07 KiB) Not downloaded yet
echo.zip
(49.91 KiB) Not downloaded yet
Delay.dlx
(500 Bytes) Not downloaded yet
delay.zip
(40.87 KiB) Not downloaded yet

Post Reply