Hi Don,
If you’d like to see how the GCC build tools in KDS can do this, you can use KDS to create a new project, and use it as an example. The interrupt vector table is forced to a specific memory section. I created a project with Processor Expert for the K64, and in vectors.c, the line below forces the vector table array into the .vectortable memory section. You can also review the linker file *.ld added to the project to see how .vectortable is used in the linker file.
__attribute__ ((section (".vectortable"))) const tVectorTable __vect_table = { /* Interrupt vector table */
Hello Donald:
The response by colleague Derek Snell is correct, you need __attribute__ ((section (...) )), and modify the linker file as necessary.
There are some tutorials and code examples about this:
Defining Variables at Absolute Addresses with gcc | MCU on Eclipse
Relocating Code and Data Using the CW GCC Linker File for Kinetis
Re: Controlling data and function placement in memory
Re: Re: Syntax to allocate memory assignments to faster memory
Regards!
Jorge_Gonzalez
Hi Don,
If you’d like to see how the GCC build tools in KDS can do this, you can use KDS to create a new project, and use it as an example. The interrupt vector table is forced to a specific memory section. I created a project with Processor Expert for the K64, and in vectors.c, the line below forces the vector table array into the .vectortable memory section. You can also review the linker file *.ld added to the project to see how .vectortable is used in the linker file.
__attribute__ ((section (".vectortable"))) const tVectorTable __vect_table = { /* Interrupt vector table */