Forum Discussion
Altera_Forum
Honored Contributor
12 years agoFWIW, I noticed some really strange nios2 runtime failures today, and after tracking it down I doscovered that the root cause was in fact that the instruction master's code address span was allowed to grow to cross more than 28 bits. It appears that we are actually limited to 25 bits of address times 32 bits for the external ram given that there must be room also for the debugger port, and also tigtly coupled code in on-chip ram.
However, what was truely alraming (from my perspective) was that this _didnt_ produce any GNU ld linker errors at all as the QSYS warning suggests. Instead, in my observation this results only in production of defective object code which is only detected ultimately via runtime failures, but only if the processor jumps sufficently far in the address span. In my situation I was seeing bizarre jumps into unexpedted parts of the code but the code linked on the host just fine. I _am_ building with an older version of the GNU tools which _are_ specially configured to target the RTEMS RT OS so YMMV. $ nios2-rtems-ld --version GNU ld (GNU Binutils) 2.20 Copyright 2009 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty.