Putting vector table in RAM

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

Putting vector table in RAM

2,354件の閲覧回数
vrg6
Contributor I

Hello all,

I am currently working on a project that uses a mcuboot and application on the same flash memory. So far everything is working fine, but I have ran into a problem. The application uses MQX and has a special start of file signature that it needs for mcuboot configuration parameters. This is the same spot as the vector table. 

I was pointed to this guide that said to set MQX_ROM_VECTORS to 0 and compile. It appears that the vector reset table is no longer at 0 and is getting put in the RAM area, but when I try to program my board I get the following error .

pastedImage_1.png

When I don't have MQX_ROM_VECTORS set to 0 and have a base version of the project, everything programs and builds just fine.

Attached is the linker file I am using. 

How do I get the vector table into RAM?

ラベル(1)
0 件の賞賛
返信
1 返信

2,157件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi, 

Typically you don't put vector table directly to RAM for internal flash targets. The vector table is located physically in internal flash in non-volatile memory and the startup code makes a copy from flash to RAM. 

In general with the supported toolchain, all need is to build BSP and PSP with #define MQX_ROM_VECTORS 0.

 

In user configuration of your board user_config.h:

 

#define MQX_ROM_VECTORS 0 

#define BSPCFG_ENABLE_ITTYF 1   

#define BSP_DEFAULT_IO_CHANNEL "ittyf:"  

 

Build MQX libraries. Then build /mqx/examples/hello2 application for internal flash Debug target. Load hello2 executable to MCU and run.

I break in idle task, in debugger I can see Cortex-M4 VTOR = 0x1FFF0000. At address 0x1FFF0000 I can see vector table, most of vectors point to _int_kernel_isr().

 

Please let me know if this helps,

have a nice day!

Soledad

0 件の賞賛
返信