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++
12612 Discussions

[uClinux] debug stub not caught by gdb

Altera_Forum
Honored Contributor II
909 Views

Hi all, I tried to debug a user app using a procedure listed on he wiki, namely: 

  1. configure FPGA (nios2-configure-sof ...) 

  2. open a JTAG terminal on host (nios2-terminal) 

  3. start gdb server on host (nios2-gdb-server --tcpport 8888) 

  4. start gdb on host upon vmlinux (nios2-linux-uclibc-gdb vmlinux) 

  5. connect gdb to server (target remote localhost:8888) 

  6. from gdb load vmlinux on target (load) 

  7. start kernel execution (continue), now uClinux boots as seen on nios2-terminal 

  8. at target's prompt execute 'debug hello' (hello is the hello world app).
Now the expected behaviour is (I think) for gdb to stop the processor as the Nios2 debug application stub 'debug' issues a 'movi r2, 1; trap' instruction pair, but what I get is the hello program fully executed and the target's prompt ready again. 

 

I'm using the wiki version of both uClinux & toolchain. nios2-elf-gdb does also the same. 

 

What's my error? Why gdb does not caught the trap? 

 

Thanks and regards.
0 Kudos
0 Replies
Reply