I am creating a USB based bootloader.
I have two hex files or programs. Bootloader code is burned into ROM with P&E micro programmer.
THis bootloader code erases and burns my Application code into ROM.
I have protected area of 8kb(E000 - FFFF) and I am using vector table at default place in Bootloader code and my Application code has redirected vector tables to DFC4.
Things are pretty fine till here. After I am done with my bootloader I can start my Application code by a Jump to _EntryPoint where my APllication code resides. My Application gets powered up but then doesn't start reason being NVOPT_INIT which still stays "Vector REdirection" is false ie as NVOPT_INIT lies at location FFBF, I can not write to it as it is a protected area. However, as it still contains value from Bootloader code ie 0x7E, which should be 0x3E for Application code, my application fails.
So, in short how can I update this NVOPT once I am done with my Bootloader code?
I am using 9S08JM60 micro controlloer and Code Warrior IDE Version 5.9.0