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.

[FAQ] PROCESSOR-SDK-J721E: How to move function/API to specific section in RTOS?

Part Number: PROCESSOR-SDK-J721E
Other Parts Discussed in Thread: SYSBIOS

Many a times, there is a need to move a function/API to a specific section of the memory map, like internal memory for CPU performance optimization or memory optimization. This article explains how to do it in SYSBIOS.

  • There are two ways to move the function to specific section. 

    1. We could create a new section, for example New_Section in the linker command file and then move this function to this section. Below two changes show examples of it
      1. In the source code move the ISR code to specific section like below
        1. __attribute__((section(".New_Section"))) void API_to_Move(arguments)
      2. In the linker command file, move this section to required memory section, for example, below code is moving to TCM memory
        1. .New_Section : {*(.New_Section*)} palign(8) > TCM
    2. You could move entire object file to specific memory location in the linker command file. For example, in the below change, entire object file for api.obj is moved to New_Section, which is stored in internal memory TCM.
      1. New_Section: {
        -l out/api.obj(.text)
        } palign(8) > TCM

    Regards,

    Brijesh