Altera_Forum
Honored Contributor
21 years agoLinux application debug problem
Hello,
I'm having problems debugging a Linux application using Eclipse. I followed the steps in the "Microtronix Nios II Linux Distribution Reference Guide" document and I get the following results: 1) On the Linux console, I've uploaded my app (hello.exe) and started it with debug. The output looks normal: # debug hello.exe DEBUG: running "hello.exe" ... 2) In Eclipse, when I launch the debugger it displays the following in the Console window: # [nios2-gdb-server] nios2-gdb-server listening on port 2342 # [nios2-gdb-server] accepting gdb connection # [nios2-gdb-server] connecting to JTAG debug module ??---># [nios2-gdb-server] CPU will be reset on connect # [nios2-gdb-server] using MDI port: "sld" # [nios2-gdb-server] JTAG cable: "USB-Blaster [USB-0]" # [nios2-gdb-server] JTAG device: 2 # [nios2-gdb-server] JTAG debug module instance: 0 # step: c # [nios2-gdb-server] tcp receive failed # [nios2-gdb-server] closing gdb connection The problem seems to be that the debugger is resetting the CPU which kills the "debug hello.exe" running under Linux. After this the debugger halts with a pop-window which says: Exception occurred during launch Reason: An existing debugging session is running. Trying to return Linux to a known state. In the meantime the Nios II has been reset and the Linux login prompt is displayed on the console again. I can't find any setting in Eclipse which will disable this CPU reset. Also, is there a way to specify which JTAG cable to use when debugging Linux applications? The normal Nios II debugger lets you specify a cable and device to use, but this option is not available in the Linux debugger. Has anybody else encountered this problem? Thanks, Terry Graessle