I want to add a string constant to a specific address in the code memory. Through a little research I found out that I can do this by using the __attribute__ keyword.
So my example is shown below. I have inserted this line in my code and it does compile. What I don't know how to do is to define a section in the linker file. Can somebody help me with this?
const char myVar[16]__attribute__((section(".mydata"))) = {"Renesas"};
See these FAQs:FAQ - Allocating a variable/function to a specified section in a GCC projecthttps://en-support.renesas.com/knowledgeBase/19554085FAQ - Allocating sections in GCC/LLVM projectshttps://en-support.renesas.com/knowledgeBase/19597376This page also may help you.FAQ - Linking binary data in GCC projectshttps://en-support.renesas.com/knowledgeBase/20218373These issues are common for all GCC projects. I'd recommend googling for the example codes.