GP32 Help With Gdb-stub


bobintrees

Still Fresh
Joined
Feb 7, 2004
Messages
35
I am having some trouble getting mirthis' gdb-stub working.

I compiled the gdbserv and the example gdb-loader.
Both compiled without problems.
I ran gdb-loader and it crashes like it should.

So then I start up gdbserv.
gdbserv gives me:
GDB thread is starting...
Opening socket, please wait.
Socket successfully opened.
Couldn't bind socket to port 2334.
Waiting for connection...
Got connection
Waiting for data

Then it says
error reading from bulk endpoint 0x81: Connection timed out.
over and over.

and gdb gives me Timed out.

Any ideas?
Thanks,
Bobby
 
Hi,
The "error reading from bulk endpoint 0x81: Connection timed out." -error is nothing to worry about.
But "Couldn't bind socket to port 2334." is not very good.
GDB connects to the GDB-server through that port.

I have no idea what causes that, some nasty firewall software?

---
mithris
 
Ok, a reboot fixed that problem. What is the proper way to stop the gdbserv?

Now i have another problem:

Code:
(gdb) target remote localhost:2334
Remote debugging using localhost:2334
Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet: $qC#b4...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout

gdbserv:
Got connection
Waiting for data
Sending data [9] +$Hc-1#09 
error reading from bulk endpoint 0x81: Connection timed out
Data send result: [-1]
error reading from bulk endpoint 0x81: Connection timed out
Sending data [8] $Hc-1#09 
error reading from bulk endpoint 0x81: Connection timed out
Data send result: [-1]

Does that a bit more...

error reading from bulk endpoint 0x81: Connection timed out
WARNING: Lost connection, waiting for new connection
Waiting for connection...

Any ideas?
Thanks,
Bobby
 
Okay, which stub are you using?
There are the UART version and the USB version.

Is the USB correctly initialized on the GP32 side?
And, when you connect to the GP32, it's after it crashed?

Hmm.. and more important, which GCC version are you using?
anything above 3.2.2 could cause problems, if that is the case, i could send you a precompiled version of the stub.


---

mithris
 
It requiers MFW2 or one i modded myself..
In a coming version you don't need to flash it at all..

---
mithris
 
ok..
I am using the usb version.
What do you mean my correctly initialized?
I run gprun to load the gxb, then it crashes, then i start the server, then I start gdb.

For the the computer I am using gcc 3.3.3.
For the gp32 i am using gcc 3.4.

Which one needs to be 3.2.2?
If you could send the precompiled stub, I would appritiate it.
PM me for my email.

Thanks,
Bobby
 
mithris posted on Apr 28 2004 at 10:08 AM said:
It requiers MFW2 or one i modded myself..
In a coming version you don't need to flash it at all..

---
mithris
copy the first 4kb of flash into ram, and use the mmu to remap it, then edit the vectors in ram? Tis the way I would do it.
 
Last edited by a moderator:
Yep, thats the way i'll do it..
Have done some tests with it already..
But i will add some other features aswell..
Watchpoints would be neat.. will also use the MMU..

---
mithris
 
Must say, the MMU is a lot more powerful than what I first thought also.

I look forward to the new version !
 
Back
Top