Vector Redirection Question

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Vector Redirection Question

1,253 次查看
S_B_D
Contributor I

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

标签 (1)
0 项奖励
2 回复数

251 次查看
TurboBob
Contributor IV

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

Message Edited by TurboBob on 2009-02-25 11:56 PM
0 项奖励

251 次查看
TurboBob
Contributor IV

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

 

 

Message Edited by TurboBob on 2009-02-25 11:58 PM
0 项奖励