Hello everyone,I am trying to place a function in a specific section (like PFRAM) within the User Boot Area using the __attribute__((section("PFRAM"))) directive, but it's not working as expected.
PFRAM
__attribute__((section("PFRAM")))
IDE : e2Studio
Compiler : GCC
Debugger : E2 lite
Does anyone know the cause of this issue? I would greatly appreciate it if someone could help me resolve this problem!
With my sincerest gratitude!
This is my project : RX660_functionTest
In my linker_script.ld:
Hello,Thanks for posting ur question online.I am looking at your issue and I will get back to you asap!Thanks,Panos
Hi Panos,I hope this message finds you well. Just checking in to see if there are any updates regarding my question.I understand you might be busy, and I really appreciate your time and help.Thanks again!Best regards,hoanpx
Hi Hoanpx,
I checked your project and change the "PFRAM" to ".pfram", now it works well:
And in the map file:
BR,
NP_Renesas
Hi NP_Renesas,
Thank you for the solution you provided. It really works!. However, there is one more issue: the '.rpfram' section that I defined in the linker_script.ld is not working as expected, It cannot determine the end address."And in the linker_script.ld:
Thanks,hoanpx
In the script.ld, please define the user section as *(.name).
And I found that you define the "PFRAM" section in RPFRAM secion area, is this what you want?
Exactly, this is what I want. My goal is to copy the function my_function() from UB_AREA to the section in RAM.
If you just want your function run in RAM, you can define a user section in RAM and put your function in this section. But if your goal is to "copy" the function from UB to RAM, I think it is not possible.