I am using CodeWarrior Development Studio Version 10.6.4 to develop firmware for a MC9S08DZ32 bare metal target board. I have 2 separate projects. One for the main application and one for the bootloader for field upgrades. I can download and run/debug both separately but when I jump from the bootloader to the main application, the main app still tries to use the bootloader vectors. Here is how I have things setup in CodeWarrior:
Bootloader
In processor build options
ROM F400 size=BAE
In processor properties
Vector table F3C0 size=3E
Reset Vector FFFE
Protected area F400-FFFF (3 KB)
Vector redirection yes
In the CodeWarrior debug configurations
preserved area = 7C00 to F3BE
Main app
In processor build options
ROM 7C00 size=77C0
In processor properties
Vector table FFC0 size=3E
Reset Vector FFFE
Protected area Disabled
Vector redirection no
In the CodeWarrior debug configurations
preserved area = none
I first download the main app. Then I download the bootloader. I look at memory and the main app is still intact including its vectors. I then run and I can verify that the bootloader is running. I can communicate with it via a serial port and give it commands. When I give it the command to execute the main app, it goes to the correct location but when an interrupt happens, it uses the bootloader vectors instead of its own. What have I done wrong?
Note that I have searched the forums and found no direct answer. I have a trouble ticket into NXP and they have not been able to help yet. They suggested I come here so here I am. Please don't refer me to a link that supposedly answers this question because there isn't any. I will give you any additional details you need. Please! Thank you!