CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic18f8722 and loader.c issue

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ktallevi



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

pic18f8722 and loader.c issue
PostPosted: Sun Jul 23, 2006 9:33 pm     Reply with quote

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

View user's profile Send private message

update
PostPosted: Sun Jul 23, 2006 11:09 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group