Is it possible to relocate the interrupt vector table into a different location within nonvolatile memory (ROM)?
I took a Kinetis K64F Freedom board (FRDM-K64F) and loaded a basic MQX 4 example (CodeWarrior 10/gcc) project into it. That works; but when I try to move the interrupt vector table from 0x0 to 0x1000 within the linker file, all I get is immediate interrupts/crashing. Upon loading the code, I see, with the debugger, that the table has moved to 0x1000. Is there more that I need to do other than the changes within my linker file (snippets below)?
MEMORY
{
vectorrom (RX): ORIGIN = 0x00001000, LENGTH = 0x00000400
cfmprotrom (R): ORIGIN = 0x00001400, LENGTH = 0x00000020
rom (RX): ORIGIN = 0x00001420, LENGTH = 0x000FeBE0
ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00040000
}
SECTIONS
{
. = 0x1000;
.vectors :
{
__vector_table = .;
__VECTOR_TABLE_ROM_START = __vector_table;
KEEP(*(.vectors_rom))
. = ALIGN (0x4);
} > vectorrom
}
Solved! Go to Solution.
Hello Joe,
So I think this related how to remap MQX4 project, about the detail configuration for MQX lib such as you mentioned "MQX_ROM_VECTORS = true ", I don't have access help you create new case, so could you please take another ticket in the MQX thread: https://community.nxp.com/community/mqx there is MQX expert support this.
BR
Alice
Hello Joe,
The "SECTIONS" part needn't change.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Joe,
Sorry now we don't recommend use MQX, so I haven't install MQX on my PC.
You can first test a simple bare board project, if have problem after remap, I can help to check your code on my side.
And if you just start development, I recommend you use MCUXpresso IDE, and freeRTOS, this is the supported tool
by official, and if there is some problem, we can fix. While if use CW and MQX, there won't any update or patch for kinetis.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Alice,
I have no problems executing a relocated table on a bare board project, so the issue must involve MQX 4 (I tried it in both CW and KDS). The project is 1.5 years old; it is too late to change the OS now and I am almost done with the code. Is it possible for me to start an NXP support ticket, or is MQX 4 not supported at all (I only need a work-around, not an MQX patch)?
Hello Joe,
So I think this related how to remap MQX4 project, about the detail configuration for MQX lib such as you mentioned "MQX_ROM_VECTORS = true ", I don't have access help you create new case, so could you please take another ticket in the MQX thread: https://community.nxp.com/community/mqx there is MQX expert support this.
BR
Alice
Thank you.