From: Karl L. <kar...@se...> - 2010-10-18 21:28:38
|
I now have a two-chip system (ATmega328P + 25LC512 serial EEPROM) that lets me save a working amforth image to serial EEPROM and selectively restore that system to flash on reset. This makes a huge difference in development, since I was forever lancing the kernel and having to drag out the AVR programming dongle. Now, I just hold down the LOAD button on my target, hit reset, and the system is restored to the previous save. The save_system word copies the full image, including the contents of EEPROM, to flash. So I can extend the dictionary as much as I want; the restored system works just like it did immediately prior to the save. (Warning: This hasn't been extensively tested, but I'm pretty sure it works. :-) ) I've created a set of .asm files that support this system. The serial EEPROM words are compiled into the kernel at build-time and I had to make some changes to the amforth.asm file, so the final image needs at least a '328p to hold the larger bootloader code. Total size, including EEPROM data, is slightly over 11 KB. I can make the .asm files available if anyone is interested... Karl |