- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running NIOSII v.5.0 with QuartusII v.5.0 on my Windows 2000 machine. The
installation of both packages was ok. I have built a .elf file containing my application (without use of NIOSII IDE) and I want to debug it using Insight (GDB) from the Cygwin command line. I run Insight using the following command: nios2-debug --cable=usb-blaster <myApplicationFile.elf> On the console screen I see no error messages and my application is downloaded into hardware memory. I'm able to see the first two lines of my application. The problem is concerning the commands to run the application. No commands work and, if I try to type the commands on the GDB console, GDB doesn't reply also when I type wrong commands. It seems GDB is not running Please, can you help me ? Best Regards /AlessandroLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by alessandro@Dec 21 2005, 01:02 PM i'm running niosii v.5.0 with quartusii v.5.0 on my windows 2000 machine. the
installation of both packages was ok. i have built a .elf file containing my application (without use of niosii ide) and i want to debug it using insight (gdb)
from the cygwin command line. i run insight using the following command:
nios2-debug --cable=usb-blaster <myapplicationfile.elf>
on the console screen i see no error messages and my application is downloaded
into hardware memory. i'm able to see the first two lines of my application. the
problem is concerning the commands to run the application. no commands work
and, if i try to type the commands on the gdb console, gdb doesn't reply also
when i type wrong commands. it seems gdb is not running
please, can you help me ?
best regards
/alessandro
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11704)
--- quote end ---
--- Quote End --- If I remember correctly, nios2-debug is a vestige of the 'legacy SDK' -- are you using that? As an alternative I would suggest the direct approach - this is an excerpt from our eCos for Nios II document that describes loading & debugging via insight; there is nothing magical about an eCos .elf from one you create, so this should in theory work for you as well. Granted, there may be some tweaking required: <div class='quotetop'>QUOTE </div> --- Quote Start --- 8.2 JTAG debug using Insight To debug an application using nios2-elf-insight, you should first launch nios2-gdb-server to establish a JTAG connection to the board. This is done by running the following command from within an SDK shell: > nios2-gdb-server –-tcpport=2343 & To debug an application named “hello” in the current directory, you should then run: > nios2-elf-insight hello This will launch the insight debug interface. To connect to the board, open the GDB console by selecting “Console” from the “view” menu. Then type the following commands: > target remote :2343 > load > break main > jump *_start This will: establish a connection to the target; download the executable; set a breakpoint at main; and then begin execution. You can use these same commands when using nios2-elf-gdb in place of nios2-elf-insight. From here, it is then possible to step, break, continue etc. You can find further information the Insight online help (select “help” at the top of the Insight window).[/b] --- Quote End --- Note that the above example assumes that "hello" is an .elf file... just without any .elf file extension.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right.... and you can use other GDB-compatible debuggers, as well. ddd (http://www.gnu.org/software/ddd/) is a particularly nice one, if you're UNIX jock.
Cheers, - slacker
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page