Forum Discussion
MMinu3
New Contributor
6 years agoHow to place my code in different sections of internal and external memory
Hi all, I'm working on the CYCLONE 10 evaluation board with both external and internal RAM enabled: when I place the whole code/data only in internal or in external memory, all works fine. Now I nee...
EricMunYew_C_Intel
Frequent Contributor
6 years agoHi Maurizio,
May I know what was the error you got ?
You may need to verify if the memory section name is same as the one in your Nios II BSP or hardware.
Also, the __attribute__ must be placed in a function prototype.
Thanks.
Eric
- MMinu36 years ago
New Contributor
Hi Eric, for example I tried to place an ISR function in my internal RAM (called RAM) in a section called “.myfastcode”: please refer to attached image for my memory sections in BSP. The function declaration is “void handle_timer_interrupt(void* p) __attribute__ ((section (".RAM.myfastcode")));”. When I build the project, this error appears: “section .RAM.myfastcode loaded at [000000000100d22c,000000000100d337] overlaps section .rodata loaded at [000000000100d22c,000000000100d3ab]”. Note that the overlap is in the “HRAM” address space, while I have declared my section to be in “RAM”. The same error appears even if I try to put my function in “.myfastcode” section instead of the previous “.RAM.myfastcode”. Any suggestion is welcome Thanks in advance Maurizio