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 int_global information

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



Joined: 20 May 2016
Posts: 10

View user's profile Send private message

Bootloader int_global information
PostPosted: Thu Jun 15, 2017 1:45 am     Reply with quote

I'm triying to modify the BOOTLOADER in order to update the firmware from an External EEPROM, for OTA.

I almost understand all the CCSC example except for this sentence:
Code:

#int_global                                                                     
void isr(void) {
   jump_to_isr(LOADER_END+5*(getenv("BITS_PER_INSTRUCTION")/8));   //65527 + 10
}

Someone can explain the interrupt?
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Thu Jun 15, 2017 3:27 am     Reply with quote

It's the 'revectorer' (created word...). Very Happy

The bootloader sits at the bottom of memory (it has to in order to be called on boot). Problem is that the interrupts call one or two locations immediately above this (one for a PIC16, two for a PIC18). The 'jump_to_isr()' instruction, is a special one, that automatically inserts the jump(s) (both if necessary), 'up' to where the boot code resides in your loaded program.

So it 'revectors' the one or two interrupt calls up to the loaded code. Does nothing else.
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