KEAZ128 relocate vector table

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KEAZ128 relocate vector table

Jump to solution
1,079 Views
fanziyu
Contributor IV

MCU: s9keaz128amlh

IDE: S32 Design Studio for ARM Version 2018.R1

Problem: I use bootloader  application to reprogram the mcu.I found something interesting that the mcu works well after using bootloader to reprogram,but i don't relocate the vector table in both project(bootloader project and app project ).So my problem is what will happen theoretically if i don't relocate the vector table?

I have a guess that if i modify the interrupt program in my app project,then use bootloader  application to reprogram the mcu,the modified part of the program will not be made into the MCU.

Thanks!

 

0 Kudos
Reply
1 Solution
1,031 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @fanziyu 

I hope you are doing well ! 

 One  scenario that I could see, is that the application will have troubles to execute any of its  IRQ handlers, thus limiting its functionality. 

For example  if you have moved your application at  0x000_4000. If you do not  relocate the vector table, you wont be able to run IRQs as expected from your application, because the core may be still expecting  an interrupt to  be as default, close to 0x0000_0040 , with  the vector table offset from your bootloader project. 

Actually, in the vector table , there is a hard-fault  handler. It would be interesting , to see what happens, with your current setup,   if you perform a invalid operation, that produces the trigger of  that  hard-fault handler.  Not sure if you will be able to see hard-fault of the bootloader project executing. If you do, maybe you will be need to add further steps to run and restore your application , but I do not see purpose on that effort, as the best will be to relocate the vector table , since the beginning.  

All the best, 

Diego.

View solution in original post

0 Kudos
Reply
1 Reply
1,032 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @fanziyu 

I hope you are doing well ! 

 One  scenario that I could see, is that the application will have troubles to execute any of its  IRQ handlers, thus limiting its functionality. 

For example  if you have moved your application at  0x000_4000. If you do not  relocate the vector table, you wont be able to run IRQs as expected from your application, because the core may be still expecting  an interrupt to  be as default, close to 0x0000_0040 , with  the vector table offset from your bootloader project. 

Actually, in the vector table , there is a hard-fault  handler. It would be interesting , to see what happens, with your current setup,   if you perform a invalid operation, that produces the trigger of  that  hard-fault handler.  Not sure if you will be able to see hard-fault of the bootloader project executing. If you do, maybe you will be need to add further steps to run and restore your application , but I do not see purpose on that effort, as the best will be to relocate the vector table , since the beginning.  

All the best, 

Diego.

0 Kudos
Reply