Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

eclipse debug fails

Altera_Forum
Honored Contributor II
1,720 Views

I followed recomendation from "Linux reference guide.pdf" for nios2 and tried to debug hello application for my prepared system. As described on page 23, I tried: 

# debug hello.gdb 

 

with the following response: 

 

DEBUG: running "hello.gdb" ... 

BINFMT_FLAT: bad magic/rev (0x10101ff, need 0x4) 

BINFMT_FLAT: bad magic/rev (0x10101ff, need 0x4) 

 

without propmt at the end, I don't know what does it means but the first line was ok, so I tried to debug hello in Eclipse. There I also followed step by step procedure to get desired results, but for example when printf( "%s", greetings ) command had been in debug mode executed, then no nice message in the bash terminal appeared and after another printf() command execution it printed something like this "ELF" and the debug session in dev. board stopped (# prompt appeared) while debug in eclipse still indicated "stepping".. 

 

conclusion on the problem - debugging in eclipse goes wrong and I dont know why.. 

 

!!! maybe the problem comes with my non-standard development station configuration: 

 

- Nios II IDE v 1.1 

- Nios cyclone 1c20 dev. kit ----here is no mistake i really mean Nios not Nios II 

- LPT ByteBlaster II 

- uClinux Kernel v 2.6 

 

thanks http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
522 Views

Hi, the debug command that you run from within Nios II linux is 

 

debug app 

 

not 

 

debug app.gdb 

 

The gdb file is necessary on the host side not on your Nios II Linux system. Let me know if I&#39;ve been unclear.
0 Kudos
Altera_Forum
Honored Contributor II
522 Views

hi Ken, 

 

thank you, now it works much more better http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Altera_Forum
Honored Contributor II
522 Views

I&#39;m glad to hear that. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

0 Kudos
Altera_Forum
Honored Contributor II
522 Views

Hello! When I use one of the sample applications (like ping.exe) and compile it for debug as the Quick Start manual says, I have a problem when I try to "debug ping", I get an immediate "I/O Error . . . " and then back to the command prompt. 

 

Any ideas? When I delete all of the code from ping.exe and just put a simple printf() it, it debugs just fine. Other sample apps do exactly the same thing. 

 

*Brian
0 Kudos
Reply