Telegram Group & Telegram Channel
Help: GDB Remote Debugging with Spike + pk Timing Out on Port 1234 (RV32IMAC)

Hi all,

I'm working with a RISC-V toolchain targeting rv32imac and trying to debug a simple hello.elf program using spike and gdb, but I'm stuck with a timeout issue when GDB tries to connect.

Here's what I have:

Toolchain: `riscv32-unknown-elf-gcc` (newlib)
hello.elf is compiled for RV32IMAC and runs fine with Spike + pk.
`pk` is 32-bit and works correctly.
GDB loads hello.elf correctly.



spike --isa=RV32IMAC /path/to/pk /path/to/hello.elf

This prints the expected output (e.g., “Hello, RISC-V!”).

When I try to launch Spike for remote debugging:

spike --isa=RV32IMAC --rbb-port=1234 /path/to/pk /path/to/hello.elf

It prints:

Listening for remote bitbang connection on port 1234.

Then in another terminal, I run GDB:

riscv32-unknown-elf-gdb /path/to/hello.elf
(gdb) target remote localhost:1234

But I get:

Could not connect: Connection timed out.

I’ve verified the ELF and pk binaries are 32-bit and compatible.
The firewall is disabled, and I'm on a local VM running Ubuntu.
Spike version is 1.1.1-dev (built from source).

# My Questions:

Is --rbb-port expected to work out-of-the-box with rv32imac?
Is there a minimum Spike or pk version required for remote GDB debugging?
Could this be an issue with how Spike is configured or built?

Any suggestions, debugging tips, or example working setups would be much appreciated!

Thanks in advance

https://redd.it/1l9viom
@r_riscv



tg-me.com/r_riscv/3430
Create:
Last Update:

Help: GDB Remote Debugging with Spike + pk Timing Out on Port 1234 (RV32IMAC)

Hi all,

I'm working with a RISC-V toolchain targeting rv32imac and trying to debug a simple hello.elf program using spike and gdb, but I'm stuck with a timeout issue when GDB tries to connect.

Here's what I have:

Toolchain: `riscv32-unknown-elf-gcc` (newlib)
hello.elf is compiled for RV32IMAC and runs fine with Spike + pk.
`pk` is 32-bit and works correctly.
GDB loads hello.elf correctly.



spike --isa=RV32IMAC /path/to/pk /path/to/hello.elf

This prints the expected output (e.g., “Hello, RISC-V!”).

When I try to launch Spike for remote debugging:

spike --isa=RV32IMAC --rbb-port=1234 /path/to/pk /path/to/hello.elf

It prints:

Listening for remote bitbang connection on port 1234.

Then in another terminal, I run GDB:

riscv32-unknown-elf-gdb /path/to/hello.elf
(gdb) target remote localhost:1234

But I get:

Could not connect: Connection timed out.

I’ve verified the ELF and pk binaries are 32-bit and compatible.
The firewall is disabled, and I'm on a local VM running Ubuntu.
Spike version is 1.1.1-dev (built from source).

# My Questions:

Is --rbb-port expected to work out-of-the-box with rv32imac?
Is there a minimum Spike or pk version required for remote GDB debugging?
Could this be an issue with how Spike is configured or built?

Any suggestions, debugging tips, or example working setups would be much appreciated!

Thanks in advance

https://redd.it/1l9viom
@r_riscv

BY RISC-V Reddit




Share with your friend now:
tg-me.com/r_riscv/3430

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

The lead from Wall Street offers little clarity as the major averages opened lower on Friday and then bounced back and forth across the unchanged line, finally finishing mixed and little changed.The Dow added 33.18 points or 0.10 percent to finish at 34,798.00, while the NASDAQ eased 4.54 points or 0.03 percent to close at 15,047.70 and the S&P 500 rose 6.50 points or 0.15 percent to end at 4,455.48. For the week, the Dow rose 0.6 percent, the NASDAQ added 0.1 percent and the S&P gained 0.5 percent.The lackluster performance on Wall Street came on uncertainty about the outlook for the markets following recent volatility.

telegram from us


Telegram RISC-V Reddit
FROM USA