We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am working with Atmega128 and i want to write a program that enters the boot section when a particular pin is low and after executing boot program looks in the application area of Atmega128. If some program is present there i want to erase it. Up till noe i have managed to cause the program to enter in boot section and execute the code. But further i have no idea how can it make a search for the presence of some code in application area and then to erase it. Thanks in advance.
hopefully you forced your program into boot using the watchdog reset.
But further i have no idea how can it make a search for the presence of some code in application area and then to erase it.
you can write a specific location in flash with a code indicating that the program at a specific location was programming successfully (either by IAP or JTAG - use absolute positioning of the code) after you verified its checksum. you can erase Flash by IAP commands. consult your processor manual.
... if you can find them.
This IS a Keil forum
Erik