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 for 18F6520

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



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

Bootloader for 18F6520
PostPosted: Tue Jan 27, 2009 2:44 pm     Reply with quote

My application works good if I just load the program into the chip and run without a boot loader.

When I program the chip with the bootloader, and load the application (After adding #include<bootloader.h>) the application will not run. I use many interrupts in my main app. I think I have to change the LOADER_END to 0x7FF but what do I make the LOADER_SIZE?

Here is bootload.h:
Code:

#define LOADER_END   0x7FF
#define LOADER_SIZE  0x???

#ifndef _bootloader
#build(reset=LOADER_END+1, interrupt=LOADER_END+9)
#org 0, LOADER_END {}
#endif


Here is the top few lines of bootloader.c
Code:

#ifndef LOADER_END

#define LOADER_END      getenv("PROGRAM_MEMORY")-1

#define LOADER_SIZE   0x3FF

#endif


#define LOADER_ADDR LOADER_END-LOADER_SIZE
#define BUFFER_LEN_LOD 64

int  buffidx;
char buffer[BUFFER_LEN_LOD];

#define ACKLOD 0x06
#define XON    0x11
#define XOFF   0x13
abq_guy



Joined: 26 Jan 2009
Posts: 13

View user's profile Send private message

PostPosted: Tue Jan 27, 2009 3:02 pm     Reply with quote

Hello,

I have the same question but with respect to PIC18F8722. I also wanted to know, what goes in void application(void) in the bootloader.c

Thanks,

abq_guy
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