Forum Discussion
Altera_Forum
Honored Contributor
22 years agoUsing the cpu simulator
QII4.1,SOPC4.1 web edition, Nios3.2 Trying to get the gdb cpu simulator to work. Do I need to build the code in any special way to make this work? I have tried using the same build I use for the ...
Altera_Forum
Honored Contributor
22 years agoThe main thing is that when I step thru assembly code, it does not execute the instructions correctly. The register window often does not show the proper result of having executed the instruction shown. The $pc is sometimes incorrect, even though the proper code address is right there in the code window. In certain modules, I can step a few instructions and then it just refuses to proceed. The target settings in the Insight tool do not match the setup file settings that should have been loaded, and I end up reloading everything twice. Whenever I make a mistake in the sequence of what to load when, everything locks and I have to shut it down.
All of this may be the result of not building the code correctly, or not creating a proper setup file for gdb. There must be a better set of docs that describe what goes in the setup file. If you could post the contents of your setup file and command lines for build & debug, I could try it. My original goal was to step thru the assembly from reset to main(), a useful thing to do. For my system that would include the onchip bootstrap, the flash copy routine, and my app. I have had no luck getting more than one code image loaded at the same time, but there is no point if the tool does not work properly. I have tried building for debug (or not) and building with no optimization. The GDB HW debugger does work, but I lose connection frequently and I can't step into ROM. I tried the NiosII IDE, and that simulator appears to work. For the moment I am stuck with NiosI.