Teensy++2.0 reflashing only the data portion of your program

Status
Not open for further replies.

texan4ever

New member
I have an application where the user will update a data array on the host side. I then have a program that will convert the new data to intel hex. I want then to then reflash this data into my AVR.

I am using an AT90USB1286. My program is small and uses less than 25% of the AVR's flash memory. In my C code I have hard coded the location of the data:

Code:
// Sample code to test idea
#define FLASHADDR  0x3000 
for (i=0; i<50; i++) { 
   data = pgm_read_byte(FLASHADDR + i); 
   pchar(data) 
}

Now if I paste my data values at the bottom of the hex file for the main code it works fine:

Code:
:1008200039012196F0E3C233DF0759F78FEF93EDDB 
:10083000A0E381509040A040E1F700C00000D2CF7B 
:04084000F894FFCF5A 
:1030000041412068656C6C6F20776F726C64204161 
:103010004142422068656C6C6F20776F726C64214E 
:00000001FF

If I try to flash just the last 3 lines of the file listed above, things dont work.

The original program is lost and nothing seems to work.

Suggestions?
 
Status
Not open for further replies.
Back
Top