VS1005 board stuck in a loop

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
malcolm.slater
User
Posts: 7
Joined: Sun 2021-01-24 21:44

VS1005 board stuck in a loop

Post by malcolm.slater » Sun 2021-01-31 12:53

I've recently bought a VS1005 developer board with LCD - its completely standard.
Initially it worked via the LCD screen to play and record audio.
I connected using putty over the serial connection and ran some command like dir, changed drive and tried to run some of the commands such as PlayFileLoop.
The device now gets stuck in a loop when rebooted (text below). I've tried all combinations of S buttons on reboot. The LCD menu no longer comes up.

I would like to reset the board - I have the IDE for windows, and can compile the solution and update the PROM successfully but it doesn't reset the board.

I have a background in electronics and computing, but also really need some help to get my project up and running. I plan to build a looper pedal for guitar which records a section of music and repeats it, controlled by external pedals. I would appreciate anyone who could help me with this, my company can do this as paid work.

Many thanks in advance for any help.

Here's the output on reboot:

Hello.
VSOS 3.56 build Oct 24 2018 15:05:51
VLSI Solution Oy 2012-2018 - www.vlsi.fi

Starting the kernel..
Starting Devices...
External SPI Flash

Installed system devices:
S: SPI Flash 1f14, handled by FAT.
Load drivers, config 0...
Driver: RUN... E'RUN not found'
not loaded
Driver: SDSD... E'SDSD not found'
not loaded
Driver: AUODAC... E'AUODAC not found'
not loaded
Driver: AUIADC... E'AUIADC not found'
not loaded
Driver: UARTIN... E'UARTIN not found'
not loaded
Driver: S:SHELL.AP3...
VSOS SHELL
E'GETCMD not found'
E' not found'
E'GETCMD not found'
E' not found'
E'GETCMD not found'
E' not found'

these lines then repeat infinitely
E'GETCMD not found'
E' not found'

Hannu
Senior User
Posts: 145
Joined: Mon 2016-05-30 11:54

Re: VS1005 board stuck in a loop

Post by Hannu » Tue 2021-02-02 9:36

Hello and welcome to the forum!

Something has broken your filesystem of the flash as the VS1005 can't find any files. Connect mini-USB cable and reset VS1005 S1 pressed. The flash should show as USB mass storage device on your computer.

Safest approach is to reformat the file system and copy programs to it. Remember to safely remove the device so that the all data has been written and the filesystem is in consistent state.

You can find the files from root and source code package from: viewtopic.php?f=13&t=680&p=13680#p13680

malcolm.slater
User
Posts: 7
Joined: Sun 2021-01-24 21:44

Re: VS1005 board stuck in a loop

Post by malcolm.slater » Tue 2021-02-02 16:10

Hi

Thanks for the response.

I connected usb lead to computer, formatted the drive as FAT, and copied the root folder from VSOS_360_RootAndLibrariesSourceCode into the root of the VS1005-EFS drive.

I then disconnected the usb, attached the UART so i could connect to serial port and got the following. It appears to do the same regardless of the S button pressed when resetting.

What is E in E'Device not open' - is that E for error or E for can't find E drive?

Is there any possibility of a call/screen share to diagnose this, I'm happy to pay for support. Seems like something that would take someone who knows what they're doing 10 minutes to sort. I haven't done this for a couple of decades and am just poking around in the dark. Many thanks

Malc

ATTACHED DRIVE LISTING
F:\>dir
Volume in drive F is VS1005-EFS
Volume Serial Number is D272-F50E

Directory of F:\

23/01/2021 22:10 <DIR> SYS
13/10/2015 15:42 23,552 ClassicPlayer.ap3
23/05/2017 13:57 3,025 config.txt
13/10/2015 15:42 1,695 hello.mp3
13/10/2015 15:42 35,932 init.ap3
14/12/2017 12:46 1,444 shell.ap3
13/10/2015 15:42 11,056 SimpleMp3Encoder.ap3
13/10/2015 15:42 10,398 SimpleOggEncoder.ap3
13/10/2015 15:42 67 VSOS.INI
8 File(s) 87,169 bytes
1 Dir(s) 294,912 bytes free



SERIAL OUTPUT ON RESET
Hello.
VSOS 3.60 build Jan 30 2021 17:26:45
VLSI Solution Oy 2012-2020 - www.vlsi.fi

Starting the kernel..
Starting Devices...
External SPI Flash

Installed system devices:
S: SPI Flash 1f14.
E'Device not open'

0 driver(s) loaded.

VSOS running with 5 tasks:
Task I/O Stack:0010-020f (512w), free:337
Task Int Stack:0210-024f ( 64w), free:28
Task Net Stack:0250-0251 ( 2w), free:1
Task UI Stack:0252-0253 ( 2w), free:1
Task DECOD Stack:0254-03cf (380w), free:379

Interrupts: INT0_DAC:2->37765 INT13_RX:1->32923 INT15_TI1:1->525 INT16_TI2:1->11130

Load S:INIT.AP3...E'Device not open'

S:INIT.AP3 not found.
Nothing to do.USB publishing disk: SPI Flash 1f14.
Size 1.9 MB.
SCSI START

User avatar
Henrik
VLSI Staff
Posts: 1200
Joined: Tue 2010-06-22 14:10

Re: VS1005 board stuck in a loop

Post by Henrik » Fri 2021-02-05 9:44

Hello!

The issue you are experiencing is a bit perplexing. That message should not be showing, and if it does, it usually is a sign of a file system that VSOS doesn't recognize. Are you sure that you formatted the 2 MiB drive to be FAT, and not for instance Ex-FAT? If you are not sure, please try reformatting the drive, and make sure it is formatted to play FAT, or FAT-12 to be precise.
malcolm.slater wrote:
Tue 2021-02-02 16:10
What is E in E'Device not open' - is that E for error or E for can't find E drive?
That is E for Error.

If you cannot get your issue solved with reformatting as told above, I would very much like to see if I can repeat your issue. Could you make a copy of your live system for me? To do that, run the following steps:

1) Make a copy of your VSOS Kernel project (so that we can use that directory as a discardable working directory).
2) unzip the attached file eeprom_e.map to the working directory (it will replace the default eeprom_e.map in that directory). This map file will cause the eeprommer program to not program the eeprom, but instead dump its contents to a file.
3) Push BOOT SELECT and keep it pushed, then push RESET, after waiting for at least one second release BOOT SELECT.
4) Open the VSOS Kernel project in VSIDE, then select Project -> Prommer/Flasher Utility -> VS1005G External SPI Flash Prommer -> eeprom.img. After a few seconds, you will start to see the following output in VSIDE's Standard Input/Output window.

Code: Select all

Starting VS1005gexternal SPI Flash prommer v2020-08-11...
  Default SPI speed 0.5 Mbit/s
  Serial Flash RDID: manufacturer c8, type 40, density 15
  Serial Flash REMS: c814

Opened map file "eeprom_e.map"
  Set SPI speed to 10.0 Mbit/s
  Dumping external SPI flash to flashdump.img
    32 / 2048 KiB
    64 / 2048 KiB
[... many similar lines removed ...]
  2048 / 2048 KiB
Ready. (Press Close/Cancel on VSIDE)
This will take a couple of minutes.

5) You now have flashdump.img in your directory, and its size should be exctly 2 MiB, or 2097152 bytes.
6) Zip flashdump.img, post it here, and I will try to repeat your issue.

Kind regards,
- Henrik
Attachments
eeprom_e.map.zip
eeprom_e.map that will dump the contents of External SPI memory to file flashdump.img
(1010 Bytes) Downloaded 6 times
Good signatures never die. They just fade away.

malcolm.slater
User
Posts: 7
Joined: Sun 2021-01-24 21:44

Re: VS1005 board stuck in a loop

Post by malcolm.slater » Fri 2021-02-05 22:38

Hi Henrik,

Thank you very much for the reply. I formatted the drive as MSDOS FAT on a Mac, it's usually ok. I have now reformatted it on a PC but it has the same issue.

As the board was stuck in a loop I had previously tried resetting the internal and external PROM from the latest solutions on this site - details below 1 and 2. They both ran successfully, but still with same issue 3.

I followed all your instructions and have uploaded the flashdump file for you here.

Does it usually run from the internal or external prom, what's the purpose of each? thanks

Malc


1
VSOS_361g_Extflash.solution
prommer utility
VS1005G external SPI Flash Prommer

Code: Select all

Version:1.0 StartHTML:0000000105 EndHTML:0000002587 StartFragment:0000000443 EndFragment:0000002551
Starting VS1005gexternal SPI Flash prommer v2020-08-11...
  Default SPI speed 0.5 Mbit/s
  Serial Flash RDID: manufacturer 1f, type 86, density  1
  Serial Flash REMS: 1f14

Opened map file "eeprom_e.map"
  Set SPI speed to 10.0 Mbit/s
  Programming file "eeprom_e.img" (0x009bac bytes) to addr 0x000000 (0)
    Erasing: ..........
    Program: ..........
  Ok
ok.
Resetting...
2
VSOS_361g_Intflash.solution
prommer utilty
VS1005G Internal Flash Prommer

Code: Select all

Version:1.0 StartHTML:0000000105 EndHTML:0000002352 StartFragment:0000000443 EndFragment:0000002316
Opened map file "eeprom_i.map"
  Programming file "RESCUE_IMG" (0x0006d0 bytes) to addr 0x000000 (0)
    Erasing: .
    Program: .
  Ok
  Programming file "eeprom_i.img" (0x009b7f bytes) to addr 0x001000 (4096)
    Erasing: ..........
    Program: ..........
  Ok
ok.
Resetting...

3

Code: Select all

Hello.
VSOS 3.61 build Nov 19 2020 09:59:15
VLSI Solution Oy 2012-2020 - www.vlsi.fi

Starting the kernel..
Starting Devices...
Internal Flash

Installed system devices:
S: SPI Flash c213.
E'Device not open'

0 driver(s) loaded.

VSOS running with 5 tasks:
Task   I/O Stack:0010-020f (512w), free:337
Task   Int Stack:0210-024f ( 64w), free:28
Task   Net Stack:0250-0251 (  2w), free:1
Task    UI Stack:0252-0253 (  2w), free:1
Task DECOD Stack:0254-03cf (380w), free:379

Interrupts:  INT0_DAC:2->37765 INT13_RX:1->32923 INT15_TI1:1->525 INT16_TI2:1->11129

Load S:INIT.AP3...E'Device not open'

S:INIT.AP3 not found.
Nothing to do.USB publishing disk: SPI Flash c213.
Size 0.9 MB.
SCSI START
Attachments
flashdump.img
(2 MiB) Downloaded 6 times

User avatar
Henrik
VLSI Staff
Posts: 1200
Joined: Tue 2010-06-22 14:10

Re: VS1005 board stuck in a loop

Post by Henrik » Mon 2021-02-08 9:25

Hello Malc!

Thank you very much for the dump file you made for me. Analysis showed some interesting things.
malcolm.slater wrote:
Fri 2021-02-05 22:38
Hi Henrik,

Thank you very much for the reply. I formatted the drive as MSDOS FAT on a Mac, it's usually ok. I have now reformatted it on a PC but it has the same issue.
Again, very useful information.

Here my guess on what has happened.
1) When formatting, the Mac has decided to make a partition table to the VS1005 DevBoard's External FLASH.
2) When reformatted with a PC, Windows respected the partition table and didn't rewrite or modify it.
3) For reasons still unknown, VSOS cannot read the partition table entry correctly. I will investigate and fix the issue for future releases. However:
4) Making a partition table for a device with less than 2 MiB of storage space doesn't make any sense. The table eats an additional 28 KiB of a device that is small to begin with. So, as a stopgap measure:
5) Attached is a ZIP file with a working image, including VSOS and a disk image. Copy the two files inside the ZIP to the same working directory you used to dump the image, then rerun the Flasher/Prommer tool.
6) When you have a working system, replace the files on the FLASH with the files you want to have there (it's a live image of my current development system so it contains things that are experimental or completely unnecessary for anyone but me).

By folllowing these instructions you should again have a perfectly working system. And I'll have a look on what makes VSOS frown on the Mac-formatted partition table.
Does it usually run from the internal or external prom, what's the purpose of each? thanks
Internal FLASH is a 1 MiB (megabyte) non-volatile memory that is inside the VS1005 package. It's good for a final, mass-produced release of a product, if the application can fit within the limited 1 MiB space.

External FLASH is a (typically 2 MiB, can be larger) external non-volatile memory on the Developer Board. Because it's bigger than the internal memory, it's easier to use when developing an application. Booting from it is also easier to bypass if something goes wrong (just push BOOT SELECT on the VS1005 DevBoard while RESETing).

Kind regards,
- Henrik
Attachments
VSOS_Image_and_eeprom_e.zip
Copy to your working directory, then program eeprom.
(701.61 KiB) Downloaded 6 times
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1200
Joined: Tue 2010-06-22 14:10

Re: VS1005 board stuck in a loop

Post by Henrik » Mon 2021-02-08 12:20

Hello again, Malc!

I was able to find and fix the error that caused VSOS to malfunction with your External FLASH. The issue was with deciphering pointers in the partition table. Apparently we have never before had a situation where the Internal or External FLASH has contained a partition table.

So, if you'd rather fix your issue by trying out the new version 3.62 of VSOS, it is available here:
viewtopic.php?f=13&p=13975#p13975

One small thing... To keep this forum as helpful as possible, I am thinking of moving this thread to the "VS1005 and VSOS Software" sub-forum. Unless you have anything against it, I'd like to do it in a couple of days. I thought I'd better warn you first so that this thread won't just suddenly disappear from where you'd expect it to be.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

malcolm.slater
User
Posts: 7
Joined: Sun 2021-01-24 21:44

Re: VS1005 board stuck in a loop

Post by malcolm.slater » Mon 2021-02-08 17:38

Fantastic,

I'll give the new VSOS a go, and happy to move thread.

That was fast work!

Thanks,

Malc

User avatar
Henrik
VLSI Staff
Posts: 1200
Joined: Tue 2010-06-22 14:10

VS1005 board stuck in a loop

Post by Henrik » Tue 2021-02-09 11:48

(This is a placeholder message and should be ignored)
Good signatures never die. They just fade away.

malcolm.slater
User
Posts: 7
Joined: Sun 2021-01-24 21:44

Re: VS1005 board stuck in a loop

Post by malcolm.slater » Tue 2021-02-09 22:07

Hi

I tried all those thing and now get it to load which is good news! I can play hello.mp3 and also a file on SD card after s1+s2.

I prommed with your attachment, upgraded Int and Ext to 3.62.

I copied the files from small_root (minus one that didnt fit) from VSOS_360_RootAndLibrariesSourceCode to board via the USB.

I still have an issue that the drive when attached as a USB is 1MB not 2, I can't seem to do anything to fix that, is it somehow looking at the internal prom not the external when the USB is attached, is there any way to check? I'm pretty sure I've tried everything, deleted partitions, blown away and reset both on mac and windows. When it loads it always says it's using Internal Flash however, no button combination or boot select sets it to external. I need 2MB so I can run the display and classicplayer I think.

Details below, thanks again for your help.

Code: Select all

Starting the kernel..
Starting Devices...
Internal Flash
(full output at the bottom)

MAC has a util to format to FAT12:

https://www.unix.com/man-page/osx/8/newfs_msdos/

Code: Select all

diskutil unmountDisk disk3s1
sudo newfs_msdos -F 12 disk3s1 # make FAT12

sudo newfs_msdos -N disk3s1 #check
4096 bytes per physical sector
/dev/rdisk3s1: 201 sectors in 201 FAT12 clusters (4096 bytes/cluster)
bps=4096 spc=1 res=1 nft=2 rde=512 sec=208 mid=0xf8 spf=1 spt=32 hds=16 hid=16 drv=0x80
201*4096=823,296 bytes which is exactly what I get for size.

Playing around with windows, formatting and redoing gets the same result.

Code: Select all

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
..
  Disk 2    Online          896 KB      0 B

Code: Select all

Hello.
VSOS 3.62 build Feb 08 2021 18:06:01
VLSI Solution Oy 2012-2021 - www.vlsi.fi

Starting the kernel..
Starting Devices...
Internal Flash

Installed system devices:
S: SPI Flash c213, handled by FAT.
Load drivers, config 2...
Driver: SDSDMONO... D: SD/SD Card

Driver: AUODAC...
Driver: AUIADC...   Input 0x4040  Rate 48000
Driver: UARTIN...
Driver: S:SHELL.AP3...
VSOS SHELL
S:>dir d:
...
-    8. SDSDMONO.DL3      11586 2018-01-31 11:07:40 SDSDMONO.DL3
-   15. TEST.MP3         968121 2012-07-18 19:13:50 TEST.MP3
-   16. UTOPIA~1.MP3    1471792 2004-06-15 14:15:48 Utopia-free-sample.mp3
S:>


S:>playfile d:01rele~1.mp3
Playing '01. Release The Pressure.mp3'
E'MOJIBAKE not found'
~0503'Release The Pressure
~0505'Leftfield
~0504'Leftism
~050d'01
~0506'1995
[00:34]

Post Reply