You can chat about native SDK questions and issues here.
User avatar
By berkutta
#60714 Hi,

I want to get know how to use the NONOS 2.0 to put a function i to ram and not flash. I need this to do a self update of the flash.

There aren't any definitions in c_types.h like in older NONOS versions.

Berkutta
User avatar
By gjump
#60721 @Berkutta
If you add this to a function declaration __attribute__((section(".data"))) it will probably be stored in RAM. You can check the ELF output file where your function is stored. Be warned that the RAM section is small.

ie:
Code: Select allvoid __attribute__((section(".data"))) foo(void)
{
}
User avatar
By berkutta
#60739 @gjump
Thanks for the answer. But the ESP seems to direct fall into an exception after trying to call the function when it has this argument. The same for .iram0.text. Any other idea?
You do not have the required permissions to view the files attached to this post.
User avatar
By gjump
#60745 @berkuttta
Indeed i made a mistake, actually this memory area is for usar data only, not for function call. My bad!
Replace for __attribute__((section(".text"))) then it's going to be stored somewhere after 0x40100000(start address of instruction RAM). You can double check those regions looking at your memory mapping script (ld script), if you are using the default one (eagle.app.v6.ld) the .text region is stored in IRAM.

Regards,