This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: How to place different vector_table to M4F in Linker File

Part Number: AM2434

Hi,

we want to place the vector table of an embedded RT OS into address 0x00000000 of M4F. Currently, TI Clang Compiler always places gHwiP_vectorTable to this address. But I need to place another vector table there to run into OS startup.

Also the entry point is _c_int00 when looking into map file. Clang always puts this into 1st place, even I don't list it in my Linker Script.

My linker script tells the linker explicit to use .reset_vector symbol on this place. But every time looking into map file, it just stays at _c_int00

Is there a way to avoid that?

Kind regards

Andreas

  • Hi Andreas,

    The reason that the  gHwiP_vectorTable is always put at 0x00000000 is because the following statement in C:\ti\mcu_plus_sdk_am243x_08_03_00_18\source\kernel\freertos\dpl\m4\HwiP_armv7m_handlers_freertos.c OR

    C:\ti\mcu_plus_sdk_am243x_08_03_00_18\source\kernel\nortos\dpl\m4\HwiP_armv7m_handlers_nortos.c:

    uint32_t __attribute__((section(".vectors"), aligned(32))) gHwiP_vectorTable[HwiP_MAX_INTERRUPTS] AND

        .vectors:{} palign(8) > M4F_VECS in the linker cmd file and

        M4F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000200

    You can use your own function to replace the _c_int00 in gHwiP_vectorTable, but it may get back fired, because the _c_int00 is needed for CLANG built program.

    Best regards,

    Ming

  • Thanks.

    I noticed we compile and link the modules of this nortos lib into firmware. This leads to the point that the entries in the linker where overridden. So I removed the nortos files from build and now the OS will be linked.

    Kind regards

    Andreas