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

JTAG UART connection fails after running load in gdb

JonathanCarlson
Beginner
785 Views

I'm using Quartus 23.4 (I can't upgrade to a later version) and wanted to run GDB.

I followed the NIOS V processor example and was able to get the Ashling GDB Server and GDB running.

I'm running gdb-server as:

ash-riscv-gdb-server --device 0343B0DD --auto-detect true --probe-type usb-blaster-2 --core-number 0 --jtag-frequency auto-adjust --gdb-port 54321

I'm running gdb as:

/opt/intelFPGA_pro/23.4/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gdb /path/to/exec.elf

Running

(gdb) target remote:54321

 I see the GDB server respond with

Got a debugger connection from 127.0.0.1 on port 54321.

If then run

(gdb) continue

I can connect via a JTAG UART interface and communicate to my device.

If I hit Ctrl-C in gdb, I can no longer communicate with the device. But if I run:

(gdb) continue

I can then communicate with the device again via JTAG UART.

However, I want to set a breakpoint which requires loading the exec.elf in gdb.

If I run

(gdb) load

The program successfully loads and I can set a breakpoint.

However, if I run:

(gdb) continue

I can no longer communicate with the device over a JTAG UART connection.

If I only run `(gdb) load` and don't set any breakpoints, I still cannot communicate over JTAG UART.

The JTAG UART communication only fails after running (gdb) load.

Please let me know if you need any other information to help fix the issue. Thanks for the help!

0 Kudos
14 Replies
JingyangTeh
Employee
688 Views

Hi


Is there an error message when you lose the communication after the "load" command?

If you are using the GUI are you having any issue when debugging the application?


Regards

Jingyang, Teh


0 Kudos
JonathanCarlson
Beginner
657 Views

Hi,

There is no error message on either the gdb client or server. The GDB server is still running but the JTAG UART connection is no longer working. I am not using the GUI but am instead using ash-riscv-gdb-server and riscv32-unknown-elf-gdb as described above.

0 Kudos
JonathanCarlson
Beginner
622 Views

For more information, the JTAG UART connection I'm using is based off of the alterajtaguart tool from https://github.com/thotypous/alterajtaguart/

0 Kudos
JingyangTeh
Employee
539 Views

Hey


Could you try using the JUART connection that is added from the IP Catalog instead? It is free to use from in the Platform Designer.


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
479 Views

Hi


Do you have an update on this case?

Have you tried adding the JUART IP from the IP Catalogue instead of the one in GitHub?


Regards

Jingyang, Teh


0 Kudos
JonathanCarlson
Beginner
423 Views

Hi,

 

I am using the JUART IP from the IP Catalog in Project Designer. The GitHub link I provided: https://github.com/thotypous/alterajtaguart/ is just a way to talk to that JTAG UART connection from the host computer.

 

Do you know if it's possible to have multiple JTAG UART interfaces on the same FPGA?

Is it possible this is required if I want to have both the gdb and the JTAG UART console open at the same time?

0 Kudos
JingyangTeh
Employee
364 Views

Hi


Apologize for the late reply, as I was OOO.


While using the JTAG UART, you could not access the console from the JTAG.

Because it is only one JTAG connection, either it is used to output a console or being used as debug.

Adding additional JTAG UART would not help this situation.


Regards

Jingyang, Teh


0 Kudos
JonathanCarlson
Beginner
299 Views

Hi,

 

No worries about the OOO.

 

Are there other available channels (other than JTAG) which a console interface could connect to?

Is there a recommended way to have a console connection and GDB (over JTAG) running at the same time?

0 Kudos
JingyangTeh
Employee
180 Views

Hi


Sorry to say that it is not possible to use both the GDB and uart at the same time.

It is a limitation right now.



0 Kudos
JonathanCarlson
Beginner
141 Views

Hi,

 

Well, thanks for the confirmation.

 

Are there other available channels (other than JTAG) which a console interface could connect to?

0 Kudos
JonathanCarlson
Beginner
138 Views

To clarify, I meant: Are there other available channels (other than JTAG UART) which a console interface could connect to?

0 Kudos
JingyangTeh
Employee
105 Views

Hi

 

You could add in the UART IP and select the UART IP in the BSP generation when selecting the source of printout.

2024-12-16_15h37_30.png

 

Regards

Jingyang, Teh

 

0 Kudos
JingyangTeh
Employee
74 Views

Hi


Are you able to pipe the debug logs to the UART instead of the JTAG UART?


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
42 Views

Hi


As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



Regards

Jingyang, Teh


0 Kudos
Reply