Author Topic: Altera JTAG UART output to GDB  (Read 1135 times)

0 Members and 1 Guest are viewing this topic.

Offline DagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Altera JTAG UART output to GDB
« on: October 05, 2020, 05:12:39 am »
I've been developing a project of mine which has an Intel FPGA running a NIOS processor. I've been using printf() for debugging from the NIOS side to the PC. This works ok when using the "NIOS 2 Software Build Tools for Eclipse". However after updating the toolchain to the newest 20.1 there seems to be some kind of bug causing me to not be able to do "run as" preventing me from running the code via Eclipse. The "Run configurations" menu correctly shows my programming cable but the "run" button stays grayed out. The old version of the toolchain I had before had the same bug but I could get around it by replugging the cable or something but not now...

Anyway I'm not too attached to using the Eclipse for anything and I can run everything else from the CLI except I cannot get the JTAG UART printf() output to appear in gdb. Since this works when run from Eclipse I'm sure my project and code are configured correctly so I think I am just missing some command from gdb or gdb-server telling it to display/print the JTAG UART data. I know for some GDBs/processors this command is "monitor semihosting enable" but the NIOS gdb does not seem to know this command. Does anyone know what I need to do to get the printf() stuff to appear in gdb?
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline MarginallyStable

  • Regular Contributor
  • *
  • Posts: 68
  • Country: us
Re: Altera JTAG UART output to GDB
« Reply #1 on: October 05, 2020, 07:07:02 pm »
The jtag uart output comes from the terminal program nios2-terminal.exe   You should be able to lookup the proper command line and attach using it in NiosII command shell
 

Offline DagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Altera JTAG UART output to GDB
« Reply #2 on: October 06, 2020, 05:07:00 am »
The jtag uart output comes from the terminal program nios2-terminal.exe   You should be able to lookup the proper command line and attach using it in NiosII command shell

THANKS! I haven't actually noticed that binary at all. I've just assumed the IDE must be reading the output from gdb somehow since it is using the JTAG.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf