Promming an EEPROM or SPI FLASH with VS1053

Using VSDSP legacy command line tools.
User avatar
Panu
VLSI Staff
Posts: 2523
Joined: Tue 2010-06-22 13:43

Promming an EEPROM or SPI FLASH with VS1053

Post by Panu » Mon 2010-10-04 11:19

Here's a command line utility to prom a SPI EEPROM or SPI FLASH image (up to 64K) with VS1053 / VS8053. Just extract the contents to a folder such as "c:\uniprom", copy the image to a file named "eeprom.img" in the folder and write "uniprom" at the command line. If you use a COM port other than COM1, edit the "uniprom.bat" file's "-p #" parameter.

The promming program is loaded into the VSx053 using VS3EMU. The program checks whether there is an EEPROM or a FLASH connected to the VSx053, and proms the image accordingly. The name of the file is always "eeprom.img".

Screen dump:
VS1053 16/24 BIT SPI EEPROMMER / FLASHER V1.0 (PP)
Detecting connected SPI Flash or EEPROM type...
Read electronic signature (RDES (0xAB) method): ff ff
Read manufacturer and product id (RDID (0x90) method): ff ff
Sending a Flash Erase Block 0 (64KB) Command (0xD8)...
Erase returned immediately, probably this is an EEPROM chip: Using 16-bit address.
Opened file eeprom.img.
Programming blocks of data... "." means OK, "X" means error.
.1K.
Verifying...
.1K.
Verify OK.
Finished!
-Panu
Attachments
uniprom.zip
Command line utility to prom an EEPROM or SPI FLASH image with the VS1053
(161.7 KiB) Downloaded 891 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

f.novi
User
Posts: 2
Joined: Mon 2010-11-29 23:10

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by f.novi » Thu 2010-12-02 1:18

Dear Support,
I have just installed VSIDE 2.0.5b and am interested in building and customizing the 3-button vs10xx standalone player, but could only find a template for the HiFi player project.
I have a Proto Board v2.0.

I wanna do a simple MP3 player controlled by UART at 19200 bps with some simple command
'g' = play, 'p' = pause, 's' = stop so I have downloaded VS1053 standalone player / recorder 1.19 sources.

I follow these steps:
1) remove the SPIB jumper (GPIO0 low) and MMC/SD card (GPIO1 low)
2) turn the prototyping board on
3) run the prommer
4) add the SPIB jumper, insert MMC/SD card
5) reset or power-off and power-on the unit

I Get vs10xx-prom and vskit130 for windows
I want to program the SPI eeprom with file player1053bbut.bin
I don't understand The point number 3
I'm sorry but I don't understand how Prom an eeprom.
Can you explain me every step please?
How Can I do??
I modified the prom.bat to:

copy %1 boot.img
vs3emu -chip vs1002b -e 0x50 -s 9600 -x 12288 -ts 115200 -l player1053bbut.bin -c run.cmd -p 1
del boot.img

But what is boot.img? Where Can I found?

I found a boot1053b.img in the sources directory after "make" the standalone-vs1053-119,
but the prom process not termitate, is blocked at Section 24.
I attach the log.
Thank you in advance for your cooperation.
Sincerely,
Franco

C:\VSDSP\code>vs3emu -chip vs1002b -e 0x50 -s 9600 -x 12288 -ts 9600 -l player10
53bbut.bin -c run.cmd -p 1
VSEMU 2.2 Nov 12 2010 16:48:42(c)1995-2010 VLSI Solution Oy
Using serial port 1, COM speed 9600
Waiting for a connection to the board...

Chip version "1053"
Stack pointer 0x1920, bpTable 0x4f56
User program entry address 0x50
player1053bbut.bin: includes optional header, 24 sections, 770 symbols
Section 1: sci_defaults page:1 start:49154 size:14 relocs:0 fixed
Section 2: MySdi page:0 start:24 size:5 relocs:1 fixed
Section 3: startup page:0 start:80 size:4 relocs:3 fixed
Section 4: hook page:0 start:0 size:1 relocs:1 fixed
Section 5: SpiSendClocks page:0 start:84 size:22 relocs:1
Section 6: SpiSendReceiveSpi page:0 start:106 size:8 relocs:1
Section 7: SpiSendReceiveMmc page:0 start:114 size:29 relocs:1
Section 8: GetByte page:0 start:143 size:6 relocs:1
Section 9: GetLong page:0 start:149 size:19 relocs:3
Section 10: bss_y page:2 start:6144 size:128 relocs:0
Section 11: HandleDir page:0 start:168 size:143 relocs:36
Section 12: UserHook page:0 start:311 size:512 relocs:135
Section 13: MyMain page:0 start:823 size:269 relocs:71
Section 14: bss_x page:1 start:6144 size:31 relocs:0
Section 15: init_x page:1 start:6175 size:1 relocs:0
Section 16: FragmentList page:0 start:1092 size:90 relocs:19
Section 17: ReadDiskSector page:0 start:1182 size:30 relocs:8
Section 18: CheckFileType1053 page:0 start:1212 size:29 relocs:3
Section 19: MmcCommand page:0 start:1241 size:37 relocs:11
Section 20: NextSector page:0 start:1278 size:20 relocs:2
Section 21: ApplAddr page:0 start:1298 size:22 relocs:4
Section 22: InitFileSystem page:0 start:1320 size:116 relocs:27
Section 23: OpenFile page:0 start:1436 size:35 relocs:7
Section 24: Shuffle page:0 start:1471 size:28 relocs:6

User avatar
Panu
VLSI Staff
Posts: 2523
Joined: Tue 2010-06-22 13:43

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by Panu » Thu 2010-12-02 8:08

Actually, you didn't prom the eeprom, you uploaded the stand-alone player code into RAM for debugging. Section [24]Shuffle is the last section, and now the stand-alone player program is running in VS1053. It doesn't write anything to console, so you don't see any output.

If you attach an SD card, you should now hear VS1053 play the files BUT there's a compiler dependency in the code which makes some formats unplayable when compiled with lcc.exe (the code was developed with vcc.exe compiler). That's why the template was not included in VSIDE 2.05. We're working hard to get a new release soon.

To burn the eeprom, use the "Uniprom" procedure described in the original post.
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

BenC
User
Posts: 5
Joined: Tue 2011-04-12 9:24

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by BenC » Wed 2011-05-04 23:51

Hi Panu
D:\PROJECTS\DVR\uniprom\uniprom>copy eeprom.img
Dosya kendi üstüne kopyalanamaz.
0 dosya kopyalandı.

D:\PROJECTS\DVR\uniprom\uniprom>vs3emu -chip vs1002b -e 0x50 -s 9600 -x 12288 -t
s 38400 -l uniprom.coff -c run.cmd -p 1
VSEMU 2.1 Oct 1 2008 13:34:08(c)1995-2007 VLSI Solution Oy
Using serial port 1, COM speed 9600
Waiting for a connection to the board...
Chip version "1053"
Stack pointer 0x1920, bpTable 0x4f56
User program entry address 0x50
Speed changed to 38400
uniprom.coff: includes optional header, 23 sections, 887 symbols
Section 1: code page:0 start:80 size:2 relocs:2 fixed
Section 2: puthex page:0 start:82 size:53 relocs:5
Section 3: puthex8 page:0 start:135 size:37 relocs:3
Section 4: SpiPrivDelay page:0 start:172 size:10 relocs:1
Section 5: SpiSendClocks page:0 start:182 size:24 relocs:1
Section 6: SpiPrivSendReceive page:0 start:206 size:51 relocs:4
Section 7: SpiPrivInit page:0 start:257 size:14 relocs:0
Section 8: SpiPrivRead page:0 start:271 size:52 relocs:11
Section 9: SpiPrivStatus page:0 start:323 size:33 relocs:4
Section 10: SpiPrivWrite page:0 start:356 size:63 relocs:13
Section 11: SpiStatus page:0 start:419 size:33 relocs:4
Section 12: SpiEraseBlock page:0 start:452 size:107 relocs:24
Section 13: SpiBlockWrite page:0 start:559 size:71 relocs:13
Section 14: SpiVerify page:0 start:630 size:71 relocs:15
Section 15: BlockProgram page:0 start:701 size:58 relocs:9
Section 16: ReadSignature page:0 start:759 size:97 relocs:30
Section 17: main page:0 start:856 size:257 relocs:107
Section 18: oldmain page:0 start:1113 size:23 relocs:6
Section 19: init_x page:1 start:2048 size:19 relocs:0
Section 20: const_x page:1 start:2067 size:692 relocs:0
Section 21: bss_x page:1 start:2759 size:260 relocs:0
Section 22: VS_stdiolib page:0 start:1136 size:50 relocs:13
Section 23: VS_stdiolib$0 page:0 start:1186 size:134 relocs:37
VS1053 16/24 BIT SPI EEPROMMER / FLASHER V1.0 (PP)
Detecting connected SPI Flash or EEPROM type...
Read electronic signature (RDES (0xAB) method): 00 00
Read manufacturer and product id (RDID (0x90) method): 00 00
Sending a Flash Erase Block 0 (64KB) Command (0xD8)...
Erase returned immediately, probably this is an EEPROM chip: Using 16-bit addres
s.
Opened file eeprom.img.
Programming blocks of data... "." means OK, "X" means error.
.
Verifying...
.
Verify OK.
Finished!
Done. Resetting chip.
.

But my program not runing.

My board is VS1053B-L proto board.
I use VSIDE 208b2.
Compile OK. No problem.

I use coff2spiboot for my coff file "coff2spiboot aa.coff eeprom.img"

But my board not runing. Where is my mistake?

Code: Select all


#include <stdio.h>
#include <vs1053.h>
#include <gpio.h>

#define LED_4 (1 << 7) /* Led 4 is at GPIO7 */

#define SET_LED_4_ON GPIO_SET_HIGH(LED_4)
#define SET_LED_4_OFF GPIO_SET_LOW(LED_4)

#define CONFIGURE_LED_4 {GPIO_CONFIGURE_AS_OUTPUT(LED_4);}

main()

  {

	int i,j,k,m;
	
	CONFIGURE_LED_4;
	
		while(m < 1000)
			
			{

				SET_LED_4_ON;

				puts("Hello,world.");
				
				for(i=1;i<1000;i++)
					{
						SET_LED_4_OFF;
						
						for(i=1;i<100;i++)
							{
								for(i=1;i<10;i++);
							}
					}
				
				m++;
			}
	

}



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

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by pasi » Fri 2011-05-06 23:43

BenC wrote:I use coff2spiboot for my coff file "coff2spiboot aa.coff eeprom.img"
You need to specify an execute address with -x. Normally the execute address you would use with vs1053 is 0x50, so add "-x 0x50". Also note that vs10xx spi boot image and vs1000 spi boot image are different formats, so make sure you use the right program (coff2spiboot / coff2nandboot for vs1000, coff2boot for vs1053).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

BenC
User
Posts: 5
Joined: Tue 2011-04-12 9:24

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by BenC » Sat 2011-05-07 19:44

thanks friends.

I think I need some more work

BenC
User
Posts: 5
Joined: Tue 2011-04-12 9:24

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by BenC » Thu 2011-09-08 11:46

Hi Friends.

I did not to convert eeprom image file.

C:\Program Files\VSIDE\bin>coff2spiboot -x 0x50 recorder1053b.bin eeprom.img
not a COFF file: recorder1053b.bin

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

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by pasi » Fri 2011-09-09 13:53

BenC wrote:C:\Program Files\VSIDE\bin>coff2spiboot -x 0x50 recorder1053b.bin eeprom.img
not a COFF file: recorder1053b.bin
If recorder1053b.bin is from the code/ subdirectory, it is already a boot image file (starts with "P&H"). You can simply copy it to eeprom.img .
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Churmenton
Senior User
Posts: 80
Joined: Wed 2012-07-11 15:58

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by Churmenton » Mon 2012-11-12 8:20

hi support,
" copy the image to a file named "eeprom.img" in the folder and write "uniprom" at the command line"
what you mean?this sentence i don't understand well, how to copy "image" to "eeprom"? where the "image" come from?other program's image?or the "eeprom.img" in the uniprom folder? how to generate a folder called "uniprom"?we can prom image to eeprom or spi flash in this uniprom file,if i prom other image to eeprom,how to do?please!!!

Churmenton
Senior User
Posts: 80
Joined: Wed 2012-07-11 15:58

Re: Promming an EEPROM or SPI FLASH with VS1053

Post by Churmenton » Fri 2012-12-21 9:48

Just extract the contents to a folder such as "c:\uniprom"
,how to extract?

Post Reply