Forum Discussion
Altera_Forum
Honored Contributor
19 years agoNios Debugger does not load all memory sections
I have three onchip memories in my design. They occupy separate non-contiguous address space. I use the __attribute__ tag to place variables or functions into the other sections. The problem is th...
Altera_Forum
Honored Contributor
19 years agoWell, I'm getting in the habbit of answering my own questions. At least some of them. I happened to stumble across the HAL API function named alt_load_section(). This is the function you are supposed to use if you are booting your project from some sort of ROM. You see, many of the sections you place using the system libary setup panel are automagically set up by the runtime library boot function. But if you specify special sections using the __attribute__ descriptor, you will have to go fetch and place those yourself. Lucky for us, they provide a nifty macro. So all I had to do was add the following lines to the top of my main() function.
ALT_LOAD_SECTION_BY_NAME(onchip_memory_int_code);
ALT_LOAD_SECTION_BY_NAME(onchip_memory_int_data); Now all my sections are loaded properly and it all works as it is supposed to. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif Unfortunately for my case, due to the way I will be downloading dyamic code to the Nios, I won't be able to convince the IDE to stop jamming all my sections together into one memory block, short of writing my own makefile. That is, unless one of you guys knows the magic. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif