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

General Bootloader Question

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



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

General Bootloader Question
PostPosted: Tue Dec 21, 2010 4:16 pm     Reply with quote

I've read through the CCS bootloader examples ex_bootloader.c and ex_bootload.c and I can understand the program flow. Where I get confused is if I use interrupts in my main program. What happens with them? Do these lines in ex_bootloader.c automatically "take care" of any interrupts I use in my main program so that the interrupts will "fire" normally without me having to do any #org-ing or anything out of the ordinary?

In the bootloader:
Code:
#int_global
void isr(void) {
   jump_to_isr(LOADER_END+5*(getenv("BITS_PER_INSTRUCTION")/8));
}


My main program:
Code:
#int_RDA
RDA_int() {
   data_received = TRUE;
}

#int_RTCC
RTCC_int() {
   timer_expired = TRUE;
}


Will these two interrupts "fire" when serial data is received by the UART and when timer 0 rolls over? Do I require anything more to assure that the interrupts don't get "lost"?
dbotkin



Joined: 08 Sep 2003
Posts: 197
Location: Omaha NE USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Dec 21, 2010 4:21 pm     Reply with quote

Yep -- the bootloader relocates your ISR code to its new location and everything works as normal. I'm using a USB bootloader on one project, and a heavily customized one in another to load firmware fro a USB drive (via VNC1L chip). You pretty much never even know it's there.
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Thu Jan 06, 2011 4:53 pm     Reply with quote

Finally got around to this and you're right - very simple & transparent - just write a program like you would normally do, but include the bootloader header file.

Thanks!
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