Hi,
I am working on LPC2368 microcontroller. I need to develop two codes. One for bootloader and other is the actual application code.
The bootloader resides at 0x0000 and the application code is at 0x2000 The bootloader RAM is from 0x40000000 to 0x40000BFF and the application code RAM is from 0x40000C00 onwards.
I am using a flag in the bootloader to identify if there is a firmware upgrade. If this flag is set then the new firmware stored at a location other than actual application will be loaded into the application location i.e., 0x2000 and hence the firmware had been upgraded.
Now my problem is when my actual application code is running the interrupts are being called from the IVT of the Bootloader. Since i am using the VIC Vector Table for interrupts so both the IVT from Bootloader and application code are pointing to the same location. So i am not having any trouble with the IRQs.
Now i need to add a Data Abort handler which calls a function in the application code for handling data abort instructions.
This handling i have added in the IVT of the application code. But since the interrupts are being called from the IVT of the bootloader i couldnt write handling for Data Abort from application code.
I had seen many threads and all suggest to remap the interrupt vectors to RAM Mode. But if i did so the IVT of the application code will be mapped to 0x40000000.
But my bootloader is using the RAM from 0x40000000 so should i leave the first 64 bytes of RAM for application IVT and then allocate my Bootloader RAM and after that allocate my Application RAM??
Please do suggest me how i need to achieve this.
Thanks in advance