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 support@ccsinfo.com

How can I use the bootloader in PCM example folder ??

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



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

How can I use the bootloader in PCM example folder ??
PostPosted: Mon Jan 22, 2007 10:15 am     Reply with quote

Hi,

Compiler : PCM 3.228
Target: 16F648A, 16F877A

I would like to use the bootloader given in the PICC folder, I have also managed to modify it for a 16F877A mcu, but I find that when I load a program into the mcu, the bootloader gets erased, as a result I have to burn the bootloader using a programmer..

Is this how a bootloader works ?? kindly explain how I can prevent the bootloader from getting erased ...

Unfortuantely I have lost the source code for the above problem, so I may have to work out the program again ....

thanks
arunb
Ttelmah
Guest







PostPosted: Mon Jan 22, 2007 10:33 am     Reply with quote

The 'keys', are the definitions in bootloader.h. You include this file, with the running program, as well as with the bootloader itself, but in the bootloader program, define the keyword _bootloader, before loading it. In the main program, you load it without this definiton. It then adds these definitions to your 'bootloaded' program:

#define LOADER_END 0x1FF
#define LOADER_SIZE 0x1BF

#build(reset=LOADER_END+1, interrupt=LOADER_END+5)

#org 0, LOADER_END {}

Now, the last two lines of this, move the bootloaded program up, to avoid the bootloader.

Best Wishes
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