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

gdb and daig_printf()

Altera_Forum
Honored Contributor II
1,008 Views

Is it possible to use jtag_uart with gdb, i.e. I want to use gdb via nios2-gdb-server --tcpport=2343 and still use diag_printf over the same jtag port. It looks like it should be possible in the config by setting CYGSEM_HAL_DIAG_MANGLER to gdb and CYGDBG_HAL_DIAG_TO_DEBUG_CHAN to True. 

 

Whatever combination I use fails to work, I might be something to do with my app not starting when I use diag_printf() until I run nios2-terminal 

 

Help! 

 

Thanks Robert.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
266 Views

Hello, 

 

simply start two shells, on one start nios2-gdb-server and on the other start nios2-terminal. The jtag_uart is indeed blocking: if you don't have the nios2-terminal running, the application blocks in the diag_printf call. 

 

Regards, 

Andreas.
0 Kudos
Altera_Forum
Honored Contributor II
266 Views

Great, this worked, I was trying to get the output into insight, but this will do just fine. 

I disabled mangling, for what it's worth. 

 

 

Thanks. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

Robert.
0 Kudos
Reply