By Hand
The vs1000 audio module source package provides a Makefile, which contains instructions for the make.exe tool. You need some other tools than make.exe as well in your command search path. You can also copy the required .exe files from vside\bin\ to the audio module source directory. Then you can say
> make
and it will create the separate programs, then create boot images from each separately, and then combines the separate boot images into "spiall.spi". This is the image you need to program into the SPI FLASH.
You need at least make.exe, vcc.exe, vsa.exe, vslink.exe, coff2spiboot.exe, and combineimg.exe.
If you get errors when you say "make", the programs are not in your path or in the working directory.
Using VSIDE
In the VSIDE solution you can edit the configuration from system.h, then select Rebuild. The separate programs will be compiled, boot images generated, and a single combined boot image spiall.spi generated from them.
spiall.spi can then be programmed into the module by
- using UART and vs3emu.exe -- you need a RS232 adapter or USB-UART cable. "make program" will program the new firmware to the module.
- using pcflash.exe -- you need a RS232 adapter or USB-UART cable, pcflash.exe can be found from http://www.vlsi.fi/en/support/software/vs1000tools.html
- using uSD card: if the SPI FLASH already contains a previous firmware, copy spiall.spi to the card and rename to FIRMWARE.RAW, then copy SDUPDATE.PRG to the same card. Power up the audio module, insert the card, and in two seconds the firmware should be updated. Then remove the card, and the update software will restart the module with the new firmware.
- you need a RS232 adapter connected to RX/TX/GND/IOVDD of the module and COM1 in your PC
- pull down xCS to prevent boot from SPI FLASH, then power up the module, then remove the pull-down
- the actual programming:
- By Hand: run "make program", which creates spiall.spi, prommer24.bin, connects to module using vs3emu.exe, loads programmer, which programs the boot image
- With VSIDE: select "Prommer/Flasher Utility" from the Project menu, then select the "VS1000 SPI Flasher (24-bit) (Writes pre-generated EEPROM..)" version.
- With pcflash.exe: run pcflash.exe with the suitable options like instructed in its documentation.
Code: Select all
vs3emu -chip vs1000 -s 115200 -p 1 -l prommer24.bin -c run.cmd
- "make" to build spiall.spi and SDUPDATE.PRG
- copy SDUPDATE.PRG into the uSD card
- copy spiall.spi into the uSD card, rename it to FIRMWARE.RAW
- power up the module,
- insert the uSD card, wait 2 seconds (if you have headphones/speaker connected you'll hear a beep when the programming has finished), remove card
You can also update the audio content using uSD card:
- Create CONTENT.RAW and put it into the uSD card with SDUPDATE.PRG (and optionally FIRMWARE.RAW)
- power up the module,
- insert the uSD card, wait for long enough time (if you have headphones/speaker connected you'll hear a beep when the programming has finished), remove card
How do I create my own content.raw file with my own .ogg (and/or .wav) files?
WARNING: this does not work well together with USB mass storage because imggen052 does not make FAT12 images! We need to have some workaround for that!
Download imggen052.zip from http://www.vlsi.fi/en/support/software/vs1000tools.html, uncompress and run imggen052.exe. In imggen052.exe select
- x no boot code
- x spi flash
- set nominal size to the correct size (2MB)
- x force FAT partition to start at : 0
Then power up the module, insert uSD card, wait about 100 seconds for full content and remove card. GPIO0_5 is toggled during programming, so you can monitor the progress.
You can also update the audio content using USB:
- Attach to USB (pins USBP, USBN, GND, VBUS to VCC). Providing VCC will power up the module and after detecting USB host, it will enter USB mass storage mode. If uSD card is inserted, it will be shown as a removable disk, otherwise the SPI FLASH content are is shown.
- If this is the first time copying to the SPI FLASH disk, format the disk using the PC to make sure it's not our nonstandard FAT12/FAT16 disk format from imggen052. This is not needed if you use uSD.
- Copy the files with the PC, and choose Eject disk, and detach from USB.
- Power the module normally.
Make sure you program the module with the Prommer/Flasher utility "VS1000 SPI Flasher (24-bit) (Writes pre-generated EEPROM images)" . If you don't have this version, you need to add the following entry to VSIDE\bin\prommer.index:
Code: Select all
[vs1000_spi_flash_24bit_preparedimage]
Name = "VS1000 SPI Flasher (24-bit) prepared image"
TargetPlatform = "VS1000"
Description = "This VS1000 prommer can program SPI Flash memory chips with 24-bit address space. Communication is handled via UART cable. Image file has been prepared already by post-build step."
ImageName = "eeprom.img"
UseVs3Emu = "1"
PrommerBinary = "uniprom1k24.bin"
PrommerMemDesc = "prommer24.mem"