> On 5/2/2012 1:51 PM, Mike snyder wrote: >> The C32 compiler provides a ramfunc keyword to run specific functions >> in RAM but I am not very clear on how one would run an entire program >> from RAM. One thought I am planning on trying out is to modify the >> linker file so all address are in RAM and see if that would work - >> however I wanted to check with the collective wisdom of the piclist to >> see if anyone has already done that or something similar? >> >> Thanks >> Mike > > There is a program that someone has written to implement a form of BASIC > on the pic32 and it runs programs in ram that are typed in by the user. > You might look at the source for that and see how it was done. > http://www.pic32.byvac.com/pic32_intro.php > > Mark Hanchey I suspect tokenized Basic is stored in RAM while the interpreter remains in flash. I think the original poster is looking at running the bootloader in RAM so he can overwrite boot flash. This, to me, is dangerous, but I guess it could be done. You could end up with a dead box with nothing in flash. What I've done on PIC32 bootloading is to have the application write the new code to external SPI flash. When the entire new code has been written to external flash, a call to a simple (ideally, error free) function in boot flash copies the external flash back to the application area internal flash. To allow for things to go wrong, I also keep a copy of the factory application code out in the external flash. Holding a certain button combination on power up copies the factory code back to the application flash so you can try again. Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! Not sent from an iPhone. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .