Hi,
I'm currently writing an I2C bootloader for the JM32.
The MCU exits from reset and a GPIO is checked for '1' or '0' to determine if an updated is needed (our host controller will toggle this GPIO if an update is needed).
My bootloader currently uses interrupts to catch the incoming I2C Bytes.
I don't completely understand if I am able to use interrupts in both the bootloader and the application code.
In the bootloader project should I disable vector redirection since this is not intended to be field updated?
In the user application project should I enable vector redirection and when the program jumps to the user application it will redirect the vectors to their new location?
BTW, do I tell the linker to place the bootloader in the top flash page by editing the PRM file?
Any help is greatly appriciated.
S.B.D
You will be much better off making the bootloader run without interrupts. Otherwise things get very complicated.
You will need to have the bootloader figure out how to jump to the application.
Bob
you have to use segments and set the PRM file to locate that code in the boot segment.
If doing this in separate projects, then you can set up the memory spaces to handle it.
I just finished getting my USB bootloader to work. It is built as one project with the ap and the bootloader in one.
Bob