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

Converting PCH bootloader to PCD

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







Converting PCH bootloader to PCD
PostPosted: Thu Apr 02, 2009 9:04 am     Reply with quote

I am trying to use bootloader for PIC18F for PIC24H.

Replaced RS232 pin numbers, fuses.
Replaced erase_program_eeprom to erase_program_memory (Looks like PCD doesnt support erase_program_eeprom).
Code:
#if defined(__PCM__)
   #define LOADER_SIZE   0x17F
#elif defined(__PCH__)
   #define LOADER_SIZE   0x3FF
#elif defined(__PCD__)
   #define LOADER_SIZE   0x3FF
#endif

I get the following errors when i compile it

ERROR 126 invalid ORG range.

What am i doing wrong?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Thu Apr 02, 2009 3:40 pm     Reply with quote

You have to change a lot more. Handling of interrupts is basically different with PIC24/30/33 and must be considered when writing a bootloader. CCS has a PCD bootloader example with the loader placed in high program memory. Personally I don't like it, cause it isn't fail safe. A protected bootloader however requires to set all interrupt vectors used in the application to fixed addresses.
Vamsi
Guest







PostPosted: Fri Apr 03, 2009 8:05 am     Reply with quote

Where can i find the PCD example? I dont find it in C:\Programfiles\PICC\examples.

Thank you.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Apr 03, 2009 10:24 am     Reply with quote

PICC\drivers
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