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

CCS bootloader overwrites himself?

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







CCS bootloader overwrites himself?
PostPosted: Thu Aug 23, 2007 4:18 am     Reply with quote

Hi,
I have a problem with the ccs-bootloader, I use it with a PIC18F252.
I made the required changes and tried the example bootload.c.
Everything works fine.
Now I need to load my own application in the PIC.
After re-boot the complete Code in the PIC is destroyed.
The application doesn`t run, re-booting and bootloading again is not possible.

In the application-code is no #org-directive,
but a #rom-directive to store data in internal EEPORM.

After reading the PIC with a Programmer I recogniced, that parts of the application are written in Memory at adresses lower then 0xf500.

So I think the bootloader has been overwritten.

Can anywhone help me?

Many Thanks

Dirk
Ttelmah
Guest







PostPosted: Thu Aug 23, 2007 5:05 am     Reply with quote

You need to use the #build directive in the application, to make it load above the bootloader.

Best Wishes
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

How-To for Bootloaders?
PostPosted: Thu Aug 23, 2007 8:06 am     Reply with quote

There are bits and pieces all over this forum, but is there anywhere a good explaination of how to use a bootloader, including what changes have to be made to stand-alone code to make it bootloader compatible, and what you need on the PC end? I have been using PICs for almost 20 years but I have never had to use a bootloader until now.
_________________
The search for better is endless. Instead simply find very good and get the job done.
grasspuddle



Joined: 15 Jun 2006
Posts: 66

View user's profile Send private message

PostPosted: Thu Aug 23, 2007 8:09 am     Reply with quote

the ccs bootloader uses 0-500 (hex) for the bootloader. look at your program code you want to load. that data range should be empty and the beginning of your code should start around 501
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Aug 23, 2007 11:20 am     Reply with quote

Unfortunately the bootloader I have to use is a derivative of the CCS one that uses RS485 with Ethernet style packets designed for sending sensor data. It is largely undocumented and takes 2176 bytes of ROM. Maybe I should learn how to use the simple CCS one first.
_________________
The search for better is endless. Instead simply find very good and get the job done.
dirk
Guest







PostPosted: Thu Aug 23, 2007 3:56 pm     Reply with quote

Many Thanks for your Help,
I thought the bootloader adds an offset to the application-programm.
Now I have included the bootloader.h-file and everything works fine.


Best Wishes

Dirk
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