moving vector table to ram

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

moving vector table to ram

ソリューションへジャンプ
865件の閲覧回数
barbercolman
Contributor III

I though by default MQX would have to have the vectors in ram. However, I was reading a note about bootloaders and it talked about setting an option in user_config.h to move the vectors from rom to ram. Could not find this option in user_config.h. So are vectors moved by default or what?

 

Any help?

I have an application that needs a short 1ms timers and so I need to directly access a timer ISR. It works now but I am woried about after bootload process.

0 件の賞賛
返信
1 解決策
438件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Barber,

The MQX_ROM_VECTOR definition by default has been set to 1 to have the vector table in ROM/Flash.  Setting it to 1 in the user_config.h will over ride the default setting in the twrk60n512.h header in the BSP (this example is for Tower K60 but each BSP has a unigue header in the BSP-->BSP Files folder).

Another thread speaks on this topic:

https://community.freescale.com/message/91476#91476

 

For having a direct interrupt, you need to stick your timer vector in the table (in the same folder listed above and in the vectors.c file).  Then have your ISR have the prefixed __declspec(interrupt).  This case is for running vector table from ROM/Flash.

 

If setting up the vector table for RAM, then your code can insert the vector directly in to the vector table...reference this post:

https://community.freescale.com/message/60097#60097 

 

Hope this helps.

Regards,

David

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
439件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Barber,

The MQX_ROM_VECTOR definition by default has been set to 1 to have the vector table in ROM/Flash.  Setting it to 1 in the user_config.h will over ride the default setting in the twrk60n512.h header in the BSP (this example is for Tower K60 but each BSP has a unigue header in the BSP-->BSP Files folder).

Another thread speaks on this topic:

https://community.freescale.com/message/91476#91476

 

For having a direct interrupt, you need to stick your timer vector in the table (in the same folder listed above and in the vectors.c file).  Then have your ISR have the prefixed __declspec(interrupt).  This case is for running vector table from ROM/Flash.

 

If setting up the vector table for RAM, then your code can insert the vector directly in to the vector table...reference this post:

https://community.freescale.com/message/60097#60097 

 

Hope this helps.

Regards,

David

0 件の賞賛
返信