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

Bootloader Problem

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



Joined: 12 May 2005
Posts: 31
Location: BRAZIL

View user's profile Send private message Visit poster's website MSN Messenger

Bootloader Problem
PostPosted: Tue Nov 28, 2006 1:15 pm     Reply with quote

Hi,

I am implementing a bootloader using PIC18F8520 and MPLAB 7.21/CCS 3.206. The bootloader receives the application HEX code using UART.

The application code and bootloader are implemented in the SAME project and sent to the PIC using a ICD 2.

The bootoloader area is locate at memory range defined by the folowing defines:

#define LOADER_END getenv("PROGRAM_MEMORY")-1
#define LOADER_SIZE 0x1000
#define LOADER_ADDR (LOADER_END-LOADER_SIZE)

The main() function is also located at the bootloader area and calls the true main application (_main()).

The application code is located in the section (0, LOADER_ADDR-1)

I have the following doubts:

1) When I do the bootloader process using the same code that is currenctly running (e.g from version 0.9 to version 0.9) the application runs without problems after restarting the application.

If I update from one version to another (e.g 0.9 to 1.0), the newer application does not run properly. It seems to start correctly but blocks after some time.
I have read the device memory after the bootloader process and compared to the original HEX file. The application memory are identical. The only difference was located at bootloader section.

Does anyone know what may be going on ?

2) Can I put the bootloader and application on the same project ? In other words, can I program the application and bootloader at the same time or I do need to program first the bootloader and them the application. Is it possible using ICD2?

3) Can I use ICD2 to program the bootloader ?

4) Do I have to set another reset/interrupt vector addresses despite having the bootloader located at the end of the memory ?

5) I also have notice that the assembler code generated for the bootloader is different between two version where the difference is only located at application program code. Does anyone can explain this?


Thanks in advance,

André Moutinho
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