From: pito <pi...@vo...> - 2010-09-16 08:30:22
|
Hi, interesting! After dozens of dozens of reflashings I downloaded the image of my flash and eeprom to investigate - after a few hours of work with amfort (4.0, 1284p) I saw a couple (~6)of random words written in eeprom's empty space as well as in flash'. So when you write a code which hangs it may write randomly. So my first thougt was to inhibit i! when not compiling word or not setting variable or constant as it is deffered. But it is not possible, only with fuses. So I did few words for XOR checksums (eexor, ffxor, which put the simple XOR sum of flash and eeprom into eeprom (2 cells). It works, and you may check the consistency of the system on boot fast (takes ~1sec to XOR 128kbytes @ 20MHz in amforth). However the sum changes each time you do a i!. Not easy to track. My idea was to check at boot time the XOR sum, when in error - to reflash the eeprom or flash from an image stored in an external spi flash (e.g cheap AT45DB041D 4mbit 8pin 66MHz). The idea was to write an actually valid image to the external flash when brown-out detected, maybe asm code could be fast enough to do it in few miliseconds until power drops. However, to use the amforth with students means to calculate with a lot of reflashes.. Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "Kalus Michael" <mic...@on...> Komu: "Everything around amforth" <amf...@li...> Předmět: Re: [Amforth-devel] Marker etc. Datum: 16.9.2010 - 1:51:35 > Hi Al. > > Seems the list does not take any attachments. > Try these links: > http://dl.dropbox.com/u/1170761/marker.asm > http://dl.dropbox.com/u/1170761/savesystem.asm > > > I presume this is broken because of the changes > > to here and dp > > > recently. > > > This is the old version I have on amforth3.6, may > be its still good > with 3.8 : > : pushee ( -- ) > here , heap , edp , edp 8 do i e@ , 2 +loop ; > : popee ( adr n -- ) > 0 do dup i + i@ i 2* 2 + e! loop drop ; > : marker ( -- ) > edp >r here >r > pushee create r> , r> , > does> >r r@ i@ r> 1+ i@ popee ; > > Michael > > > Am 16.09.2010 um 00:49 schrieb Al Williams: > > > I tried entering this as Forth code and got the > > same result. Not > > > sure what > > changes you mean (since you define pushee and > > popee). Also, I don't > > > think the > > list took your attachment. > > > > I presume this is broken because of the changes > > to here and dp > > > recently. > > Anyway, for now I'm sticking with a hybrid 3.8 > > -- I did take some > > > of the > > device and driver stuff out of 4.1 and got it > > working with 3.8. > > > > > > > On Wednesday, September 15, 2010 16:59:25 pm > > Kalus Michael wrote: > > >> Hi. > >> > >> > >> Am 15.09.2010 um 21:24 schrieb Al Williams: > >> .. > >> > >>> Any ideas on getting marker to work? > >> > >> maybe this version works. It copies the > >> _entire_ system vector to > >> >> flash, and pops it back when executing the > >> marker word. > >> >> > >> : pushee ( -- ) dp , here , edp , edp 8 do i > >> e@ , 2 +loop ; > >> >> : popee ( adr n -- ) 0 do dup i + i@ i 2* 2 + > >> e! loop drop ; > >> >> : marker ( -- ) > >> > >> edp >r dp >r > >> pushee create r> , r> , > >> does> >r r@ i@ r> 1+ i@ popee ; > >> > >> I append marker.asm, include it in your > >> application words if you > >> >> like. > >> BUT since it was written for amforth-3.6 on > >> atmega168 you have to do > >> >> the changes mentioned in the file. (pushee has > >> been called ,ee > >> >> there.) > >> > >> Michael > > > > ---------------------------------------------------------------------- > > > > > > > -------- > > Start uncovering the many advantages of virtual > > appliances > > > and start using them to simplify application > > deployment and > > > accelerate your shift to cloud computing. > > http://p.sf.net/sfu/novell-sfdev2dev > > _______________________________________________ > > Amforth-devel mailing list > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > ------------------------------------------------------------------------------ > > Start uncovering the many advantages of virtual > appliances > and start using them to simplify application > deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |