View previous topic :: View next topic |
Author |
Message |
dirk Guest
|
CCS bootloader overwrites himself? |
Posted: Thu Aug 23, 2007 4:18 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Thu Aug 23, 2007 5:05 am |
|
|
You need to use the #build directive in the application, to make it load above the bootloader.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
How-To for Bootloaders? |
Posted: Thu Aug 23, 2007 8:06 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
grasspuddle
Joined: 15 Jun 2006 Posts: 66
|
|
Posted: Thu Aug 23, 2007 8:09 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Aug 23, 2007 11:20 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
dirk Guest
|
|
Posted: Thu Aug 23, 2007 3:56 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|