Hello all, i need to achieve vector remapping which can be enabled or disabled from user code.
i.e. Step1. BDM program the Bootloader code to MCU.
Step 2. Bootloader programs the User Code.
Step 3. vector redirection ON
Step 4. Execute user application.
I tested the remapping using following method:
1. Erase the Mcu using target tasks of Code Warrior.
2. program the bootloader with "const byte NVOPT_INIT @0x0000FFBF = 0x02;" in its global section.
3. program the user application.
4. protect any block of flash usng Target tasks of Code Warrior
After doing this and restarting the MCU give a redirected vector successfully done.
Now what i want is i can enable and disable the mapping from user code and that too not by using Target Task feature of Code warrior. It should be in a way that when jumping from bootloader to application the mapping is enabled and when jumping back to bootloader or say given a reset then the remapping disables.