VS1010 utility programs

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

VS1010 utility programs

Post by Aleksi »

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 198 times
Delete.dlx
Delete program, VS1010 VSOS executable
(1.17 KiB) Downloaded 180 times
Copy.dlx
Copy program, VS1010 VSOS executable
(2.83 KiB) Downloaded 174 times
arch-Delete-2019-08-23-08-34-RC1.zip
Delete program, VSIDE Solution with source code
(20.71 KiB) Downloaded 188 times
arch-Copy-2019-08-23-08-33-RC1.zip
Copy program, VSIDE Solution with source code
(22.16 KiB) Downloaded 186 times
arch-ParamSpl-2019-07-05-14-22-RC1.zip
ParamSpl program, VSIDE Solution with source code
(12.86 KiB) Downloaded 186 times
User avatar
Panu
VSDSP Expert
Posts: 2818
Joined: Tue 2010-06-22 13:43

Re: VS1010 utility programs

Post by Panu »

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 169 times
arch-DiskFree-2019-11-08-12-34-VS1010D.zip
VsOs DiskFree for VS1010D. VSIDE solution with source code.
(25.32 KiB) Downloaded 171 times
User avatar
Panu
VSDSP Expert
Posts: 2818
Joined: Tue 2010-06-22 13:43

GpioCheckPins

Post by Panu »

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 168 times
arch-GpioPinCheck-2019-11-19-12-09-v1.zip
Source code
(6.39 KiB) Downloaded 174 times
User avatar
Panu
VSDSP Expert
Posts: 2818
Joined: Tue 2010-06-22 13:43

RTC aware file copy

Post by Panu »

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 154 times
arch-copy-2020-01-02-20-32-RTC.zip
Source code
(7.03 KiB) Downloaded 145 times
AAT
User
Posts: 8
Joined: Fri 2021-01-08 18:07

Re: VS1010 utility programs

Post by AAT »

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: 1800
Joined: Thu 2010-07-15 16:04

Re: VS1010 utility programs

Post by pasi »

AAT wrote: Sat 2021-01-30 1:36Can 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: 8
Joined: Thu 2021-01-28 12:54

Re: VS1010 utility programs

Post by terop »

Here's some more utility programs:
1) Format
2) Date
3) Time
Attachments
Time.dlx
(1.37 KiB) Downloaded 43 times
time.zip
(46.22 KiB) Downloaded 43 times
Date.dlx
(11.66 KiB) Downloaded 44 times
date.zip
(110.17 KiB) Downloaded 47 times
Format.dlx
(16.2 KiB) Downloaded 49 times
format.zip
(130.08 KiB) Downloaded 42 times
terop
User
Posts: 8
Joined: Thu 2021-01-28 12:54

Re: VS1010 utility programs

Post by terop »

And some more minor utilities:
1) Delay
2) Echo
Attachments
Echo.dlx
(2.07 KiB) Downloaded 43 times
echo.zip
(49.91 KiB) Downloaded 42 times
Delay.dlx
(500 Bytes) Downloaded 48 times
delay.zip
(40.87 KiB) Downloaded 42 times
terop
User
Posts: 8
Joined: Thu 2021-01-28 12:54

Re: VS1010 utility programs

Post by terop »

Here's some more utilities:
1) Crc32
2) FatInfo
Attachments
Crc32.dlx
(4.03 KiB) Downloaded 48 times
Crc32.zip
(65.35 KiB) Downloaded 41 times
FatInfo.dlx
(10.47 KiB) Downloaded 47 times
FatInfo.zip
(98.46 KiB) Downloaded 46 times
User avatar
Henrik
VLSI Staff
Posts: 1218
Joined: Tue 2010-06-22 14:10

Re: VS1010 utility programs

Post by Henrik »

Hello!

About documentation...

Currently there is no VS1010-specific documentation for the utilities that Tero has released (and will release) here. However, they are direct VS1005 ports, so the documentation for them is available in the VS1005 VSOS Shell document Chapter 7.1, Shell Command Programs and VSOS Libraries. I have attached the current release of the document to this message.

When we have ported more utilities, it is our plan to release them in a larger package with documentation, similar to the Root Images and Libraries with Source Code packages we release for VS1005.

Kind regards,
- Henrik
Attachments
VSOS_Shell_v360.pdf
VS1001 VSOS Shell document. Includes documentation for Utilities that are ported for VS1010 and relesed in this thread.
(414.04 KiB) Downloaded 42 times
Good signatures never die. They just fade away.
Post Reply