Below I have pasted the two *.sta files from both my Application, and my rendition of the Bootloader. I have a question regarding the "Segment" area at the bottom of each file. They seem to be mapped correctly, and upon inspection of the *.lst files, the code looks OK. The application starts correctly, I wiggle some bits in my init routine.
What does not work is my interrupts (serial and input capture). What pit falls should I look for?
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Tue Jun 29, 2004 6:13 pm
In the PIC16 there are two important addresses to consider: The boot vector at address 0x0000 and the interrupt vector at address 0x0008. For the PIC18 there is also the FAST interrupt vextor at 0x0018.
Your bootloader is in this same memory area as the interrupt vector so you have you to do something special for relocating the interrupt vectors for your application.
There are several possible approaches:
1) Your bootloader filters these addresses when loading a new application and relocates them to a new address. This has the advantage that your applications don't have to know anything about a possible bootloader. Disadvantage is that for easy implementatio you will have to place your bootloader in the top of the available program memory.
2) Compile your programs with the reset vectors located to other adresses. Advantage is that your bootloader doesn't have to relocate the vectors and can be placed in the bottom of the program memory with the write protect fuses available!!!. Disadvantage is that all your applications need a little bit of extra code for the interrupt relocation.
On this page, scroll down to 'How to Relocate User Code' for instructions on how to allocate memory for your bootloader and to relocate the interrupt vectors.
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