Dear all,
I'd like to create an MQX test application on an MPC5644A MCU. In order to configure the memory usage, I modified the "shipped" lcf file.
My problem is that wherever I use the section ".Foo" expression, the linker throws the following error:
Linker command file output section '.Foo' has a type or input which is incompatible with section '.__Foo' in file ... Change the type or add an input for this section.
For example I'd like set where to put the interrupt table. The relevant part of my lcf file:
MEMORY
{
resetvector: org = 0x00000000, len = 0x00000008
init: org = 0x00000010, len = 0x0000FFF0 /*64K */
exception_handlers: org = 0x00010000, len = 0x0030000 /* 192K */
internal_flash: org = 0x00040000, len = 0x003C0000 /* 3840K */
internal_ram: org = 0x40000000, len = 0x00020000
heap : org = 0x40020000, len = 0x00008000
stack : org = 0x40028000, len = 0x00008000
end_of_kd: org = 0x4001DFF0, len = 0x00000000
}
FORCEACTIVE { "bam_rchw" "bam_resetvector"}
SECTIONS
{
GROUP : {
.intc_hw_branch_table (VLECODE) LOAD (ADDR(exception_handlers)) ALIGN (0x10) : {}
.ivor_branch_table_p0 (VLECODE) LOAD (_e_intc_hw_branch_table) ALIGN (0x10) : {}
.__exception_handlers (VLECODE) LOAD (_e_ivor_branch_table_p0) : {}
} > exception_handlers
}
__IVPR_VALUE = ADDR(exception_handlers);
EXCEPTION_HANDLERS = ADDR(.ivor_branch_table_p0);
And in the c source code I use the following pragmas:
#pragma section code_type ".ivor_branch_table_p0"
#pragma force_active on
#pragma function_align 16
#pragma require_prototypes off
asm void ivor_branch_table_p0(void) {
nofralloc
...
}
Finally the error:
Description Resource Path Location Type
Linker command file output section '.__exception_handlers' has a type or input which is incompatible with section '.__exception_handlers' in file 'C:\Freescale\Freescale_MQX_4_2\lib\xpc564a.cw10\bsp\Debug\build-bsp_xpc564a- Debug\BSP_Files\IntcInterrupts_c.obj'. Change the type or add an input for this section.
To be honest, I don't understand the lcf syntax for 100%... so any help appreciated!
Thank you!
János Murai