Flashy Firmware - Please Read!

127 views
Skip to first unread message

Julian Skidmore

unread,
Jul 1, 2011, 11:01:22 AM7/1/11
to fign...@googlegroups.com
Hi folks,

FIGnition has passed a major milestone towards becoming a
properly-working computer - the VDsk Flash disk now has built-in
purging which means it can reclaim modified blocks and you can use the
Flash chip as a disk until the chip itself wears out!

Although you won't be able to see any difference (it's all behind the
scenes), I'm really excited by this as it's the smallest working,
wear-levelling flash disk system I know of at only 1.5Kb of compiled
'C' and it brings FIGnition one step closer to being a real computer.
It's taken me 19 years to get to the point where I've had the time and
opportunity to prove flash filing doesn't have to be complex and the
result is available today.

I'm so excited I've written a blog about it:

http://oneweekwonder.blogspot.com/2011/07/flashy-fignition.html

The firmware has been upgraded to Version 0.7.0:

https://sites.google.com/site/libby8dev/fignition/FirmwareRev0_7_0.hex?attredirects=0&d=1

(the firmware also contains a small improvement to the Keypad help, it
doesn't display odd graphics chars).

I'm releasing the source code immediately along with the test code I
used (attached) with a GPLV3 licence.

I've also attached the Test code used to test the firmware on a Flash
device along with T2E2 (again) the EEPROM .hex file generator. It
takes about 2 hours to fully run and will COMPLETELY ERASE the Flash
device many times.

My normal test procedure is:

0 edit, Cmd+erase

( for A25L080 FIGnitions you'll need to define 1976 const dsk
for A25L040 FIGnitions you'll need to define 952 const dsk
for A25L40PU FIGnitions you'll need to define 768 const dsk

first.
)

-1 load

-1 delay !
brefs dsk 32 fill
dsk 1 - gpurj
dsk tpurj

This tests the basic operation. tpurj stops and waits for a key press
whenever it finds an error displaying what should be read and what was
read instead. A successful run will end with OK without pausing for a
key press (usually it displays 32 32 OK).

I then do:

1 gpurj
dsk tpurj

Which tests the first purge (since all the flash pages have now been
used). Then:

dsk 1 - gpurj
dsk tpurj

Which tests another complete pass using at least all the flash pages. Then

29 ap

Tests disk purging for another 29 passes (a total of 31 passes).

The basic test routine works as follows: A random number is written to
the beginning of a random virtual page and also copied to an array
during gpurj. In tpurj all the vdisks are loaded in turn and the
number in the page is compared to its value in the array - if it
matches, the virtual block is said to have been correctly written
(that is, the block hasn't been lost, nor are we reading an old
version of the block). The test routine had to basically fit in an
EEPROM block since, of course, the Flash disk will be erased during
the test procedure.

Note: The A25L080 chip has only been tested in simulation so far, but
the tests pass in simulation and real hardware for the other 2 device
types.

-cheers from julz

VDskRev1_0_0.zip
PurgeTesting.zip

Ian

unread,
Jul 1, 2011, 1:16:09 PM7/1/11
to fign...@googlegroups.com
Sounds impressive. Are you releasing the FIGnition source code?

Do you want a A25L080 chip for testing as I have a spare?

-- Sent from my Palm Pre2

Julian Skidmore

unread,
Jul 1, 2011, 1:44:50 PM7/1/11
to fign...@googlegroups.com
Hi Ian,

> Sounds impressive.

Thanks!

> Are you releasing the FIGnition source code?

Well, at least I've released a bit of it now. There are a few things I
need to do to get it into shape before I feel I can release the rest.
Amongst them:

* I need to set up a repository on Git Hub (I think I'll be using that).
* I need to modularize the source code properly. Normally I'd separate
things out as much as possible, but in my haste to deliver the
original firmware, most of it was chucked in the original blinky.c
test firmware. In fact, internally it's still called Blinky, i.e. as
in the program that flashes an LED! That needs to change, obviously.
* I need to add the proper GPL headers to the rest of the source code
and get it right, otherwise it won't be properly licenced.
* I need to remove extraneous files.
* I need to automate the entire build process. I currently have a
hacky tool which processes .hex files and converts the FIG Forth ROM
part of the firmware to a big-endian format, which is FIGnition's
native format (though AVR is little-endian). The hacky tool involves
manually working out where that ROM actually starts. It's dreadful.
* I should add some more comments to my code and tidy it up!

Obviously I also need to release the circuit designs too, but this
will be done in another stage.

> Do you want a A25L080 chip for testing as I have a spare?

Gosh, it's a thought, though I published the test code so others can
have a go. It takes about 2 hours to run ( though the last command
should be 12 ap, not 26 ap as for the smaller devices).

-cheers from julz

Reply all
Reply to author
Forward
0 new messages