View previous topic :: View next topic |
Author |
Message |
ktallevi
Joined: 17 Dec 2005 Posts: 58
|
pic18f8722 and loader.c issue |
Posted: Sun Jul 23, 2006 9:33 pm |
|
|
Hi,
has anyone successfully modified CSS's loader.c for a pic18f8722?
as far as transferring a hex file to the PIC, there seems to be no issue. the problem I am having is with the actual programming of the memory.
The first packet of data writes successfully to the program memory, any packets after that corrupt the data written to the memory.
According the help file in CCS 3.249...
"For chips where
getenv(�FLASH_ERASE_SIZE�) = (�FLASH_WRITE_SIZE�)
WRITE_PROGRAM_EEPROM
Writes 2 bytes, no erase is needed."
in this case erase and write size are 64, therefore no prior erase command is required. So i commented out erase_program_eeprom(addr); in loader.c
same issue, any ideas??
thanks |
|
|
ktallevi
Joined: 17 Dec 2005 Posts: 58
|
update |
Posted: Sun Jul 23, 2006 11:09 pm |
|
|
ok after a little bit of thought I realized that
int8 data[32]; should infact be...
int8 data[128]; as the pic18f8722 writes 64 bytes at a time.
This means that I need to send 4 intel hex packets to the pic before I can properly write a block of data to the program memory.
So I guess again I ask, has anyone already modified loader.c to do this, or should I go ahead and do it so it can be posted in the code area
-kevin |
|
|
|