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.

CCS/MSP432P401R: Run-Time Relocation in function

Part Number: MSP432P401R

Tool/software: Code Composer Studio

When several functions are configured, I want to execute in ram.

I know that if I give the --ramfunc compiler option in a simple way, it will execute on ram, but I wonder what to do if I want to execute another function with ram after the executable has been created.

Do i need to devise a new method based on features like code injection?

In addition, is the Run-Time Relocation described in section 3.5 of the ARM Assembly Language Tools v18.1.0.LTS equivalent to the --ramfunc compiler option?

  • Hayeon,

    I will look into this query and get back to you shortly.

    In the meantime, please see this wiki page: 

    BR,

    Seong

  • HAYEON CHOI said:
    Do i need to devise a new method based on features like code injection?

    No.  (Though I have to admit I'm not sure what you mean by code injection.)  You might be able to solve your problem by applying the ramfunc attribute to just one function ...

    __attribute__((ramfunc))
    void f(void) {
    ...
    }

    Or, perhaps you want to have multiple functions run in the same range of RAM.  You can do that by combining features of the linker called UNION and copy tables.  An example is in this application note.  The example is for a different processor, but the essentials are the same.

    HAYEON CHOI said:
    is the Run-Time Relocation described in section 3.5 of the ARM Assembly Language Tools v18.1.0.LTS equivalent to the --ramfunc compiler option?

    Yes.  Though it is a bit more accurate to say the ramfuncs feature of the compiler is implemented with run-time relocation.

    Thanks and regards,

    -George

**Attention** This is a public forum