gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Eclipse IDE

#14228 - bomberman - Sat Jan 03, 2004 12:18 am

Hi there,

I've discovered in this forum that some guys were using eclipse as an IDE to develop.
So I downloaded eclipse 2.1 and CDT 1.2 (plug in for C/C++ dev) and within 30mn I could recompile all my previous projects previously built within Visual HAM. No problem here...

But to debug through vba-sdl, I can not figure out what to do. I have tried several combinations of parameterizations and none of them gave some results.
Did someone succeed in this ? If yes, I would be glad to be helped a little !

Thanks !

#14276 - NoMis - Sat Jan 03, 2004 7:46 pm

i am writing a tutorial at this time. heres a brief instruction what to do

1. get the newest vba-sdl

2. set up vba-sdl as an external programm and give him "-G tcp ${resource_loc}" as startparameter

3. set up the debugger, this is a little tricky because eclipse says you cant debug using this compiler:

Set up a new configuration under c/c++ local application and then

First open the debuger tab and select GDB Server as Debugger. Then put in your local ip. type ipconfig in a commandprompt if you dont know it. and give him port 55555. now give him the full path to the gdb.exe in your devkitadv\bin folder
Press aply now

second go to the main tab and select the elf file your programm creates. eclipse will now say there is no compiler but it will work, just press aply.

4. goto organize favorites... under your debug menu and add your new configuration.

5. select your elf file in the project browser and start vba-sdl over the external programms. then start your debug configuration and you can debug using eclipse


hints:
- eclipse may hav1e problems to shut down the gdb process. if this happens just go use the windows task manager to shut down the "arm-gdb-elf" process
- you cant pause the programm so make some breakpoints


if you have any questions ask me.

NoMis

#14326 - bomberman - Sun Jan 04, 2004 10:51 pm

Hey, thanks that worked great...

I was almost there, except the {resource_loc} parameter in the vba launch... And also I was misled by the fact that you have a warning when setting up the debugger. With your clear explanations, everything went fine :O)

I'll just add that when setting vba, do not forget to tick the 'Run tool in background' box... This is obvious, OK ;O)

A final note... There is a way to stop the execution of your game when you want. Just press F11 in vba, it will trigger a SIGTRAP that the debugger will catch. It's just like a breakpoint without it !!!

What a pleasure to debug in such an environment... This is much more user friendly than Insight !
Do a lot of people here use this IDE ?

P.S: my compiler chain is HAM, not DevkitAdvance

#14429 - torne - Tue Jan 06, 2004 4:15 pm

I use Eclipse and it kicks Insight. My high-level assembler will eventually integrate with Eclipse (smart editor, incremental assembly..etc).

#14431 - bomberman - Tue Jan 06, 2004 4:53 pm

What do you mean ?
Quote:
I use Eclipse and it kicks Insight


That Eclipse runs a process of Insight ? On my configuration, it runs gbd which connects to Visualboy Advance and all the debug features like breakpoint, variables display, stack display... are in different windows of the Eclipse IDE which compiled my game just seconds before !!!

Which version are you using ?

#14435 - tepples - Tue Jan 06, 2004 5:13 pm

Slang alert: "Foo kicks Bar" can mean that "Foo soundly defeats Bar".
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#14439 - bomberman - Tue Jan 06, 2004 6:03 pm

Ah of course.... The worst is, I knew this slang expression but it didn't come to my mind at all :O) Not being an english speaker native has its drawbacks also ;O)

And so, yes, Eclipse is soooooo an improvement over Insight ! I can't understand how I could work with Insight for a year now ...

#24244 - RaBBi - Fri Jul 30, 2004 2:21 pm

Hi,

I tried to follow the steps by NoMis, but the config dialog window doesn't allow me to put '55555' as port value.

So I hacked the config file writing 55555 in replacement of default port 10000, as I saw it in another topic.

Assuming this part is correctly configured, I tried to set VBA as an external tool.
No problem during this step.

But when I select my .elf file then run External Tools>VBA I get error message from the emulator :

Code:
"Error opening image -G tcp c:\eclipse\workspace\CoS\rabbi.elf"



So, can someone could give me some details about how to set eclipse for debugging, using VBA too ?

Thanks ^^

Edit: I managed to execute VBA as external tool, so I can bring some correction to the info given by NoMis.

So the startparameter is "${resource_loc} -Gtcp" without quotes and without space between "-G" and "tcp".

But I still have problem running gdb so my request still active ^^


RE-Edit : I managed to start the debugger but get another problem : "main function not defined".

In fact, my main is called AgbMain and is void type instead of int.

So, GDB cannot insert temporary breakpoint, thus debug don't start...
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#24362 - RaBBi - Mon Aug 02, 2004 6:22 am

Hmm...

I've edited my crt0.S file and now my main function is defined.
That point is ok.
(thanks for the answer...)

But still cannot debug with Eclipse.
Nobody use this IDE ?
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#24377 - NoMis - Mon Aug 02, 2004 4:05 pm

What problems are left. It should work since you get gbd and vba running.
Are there any error messages? What are your compiler options?

NoMis

#24915 - RaBBi - Fri Aug 13, 2004 2:55 pm

Sorry to answer after a while but I didn't look at the GBA dev for some weeks ^^

So, back with this debugger problem.

I use GNUARM, with this defaults options.

And this is error message I get in Eclipse's console :

Code:
info threads
warning: RMT ERROR : failed to get remote thread list


And the screen in VBA becomes white.
(Then crash if I try to look at the memory viewers for instance)
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#24948 - NoMis - Fri Aug 13, 2004 8:09 pm

I never used GNUARM. I sticked with devkitadv and didn't do anything at all for a while now. It's maybe a problem with GNUARM's gdb implementation. Seems it can't get the thread to attach to. I have to download GNUArm and take a look at this issue but i can't promise you to find the error.

NoMis

#24990 - RaBBi - Sat Aug 14, 2004 5:32 pm

Thanks ^^

I'll try with old devkitadv I used before switching to GNUARM this week too.
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25022 - NoMis - Sun Aug 15, 2004 2:53 pm

I get the same error that you get but the debugging runs regardles of that error. So it should work.

NoMis

#25030 - RaBBi - Sun Aug 15, 2004 7:53 pm

So lucky you are...

I passed several hours in a row attempting to have a little sign of debugging...
Nothing...
Everthing crashes, emulator first...

First, VBA 1.6 and later versions don't load the .elf and crash.

So I came back to VBA1.5
When I break into GDB > emu crashes.


After trying with vba sdl, this version of the emu doesn't load the .elf file...
it says : "Failed to load file [PATH]\rabbi.elf"


So, NoMis or anybody else who managed to have a good debug way, could you explain me how in details please?
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25101 - RaBBi - Mon Aug 16, 2004 11:53 pm

Aheum...

Nobody debugs their own GBA project(s) here ?
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25126 - dagamer34 - Tue Aug 17, 2004 4:44 am

I don't think a lot of us use Eclipse as an IDE.

I personally use VisualHAM which handles everything at setup. All I have to do is tell it to debug my app and it does so with only a single click of the mouse. :)
_________________
Little kids and Playstation 2's don't mix. :(

#25137 - NoMis - Tue Aug 17, 2004 7:44 am

Whats happening after you get that error:

Quote:
info threads
warning: RMT ERROR : failed to get remote thread list


I get that all the time but it just starts debugging.

Is there any other error. There is normaly a popup opening wich has another error description when debugging wasn't possible.

NoMis

#25147 - RaBBi - Tue Aug 17, 2004 12:42 pm

The problem still isn't here anymore.

In fact, VBA SDL cannot load .elf file, as you say in your explanation (and I find it logical), so from this point, I cannot do anything further...
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25149 - NoMis - Tue Aug 17, 2004 1:02 pm

RaBBi wrote:
The problem still isn't here anymore.

In fact, VBA SDL cannot load .elf file, as you say in your explanation (and I find it logical), so from this point, I cannot do anything further...


I had that problem with GNUARM to ... i didn't solved it :(

But i was able to compile with devkitadv and then debug with gnuarms gdb. I have no idea why it's unable to load in VBA when the source is compiled with GNUARM. Seems like an compatibility issue. If so you might be unluky unless the VBA guys take a look at this.

NoMis

#25173 - RaBBi - Tue Aug 17, 2004 7:28 pm

I thought about a kind of incompatibility too ^^

Thus I tried with the .elf of an older project, compiled with devkit advance, and get the same problem : VBA fails to load .elf...
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25204 - RaBBi - Wed Aug 18, 2004 2:51 pm

NoMis, do you use devkitARM or the older devkit?

'Cause I tried to load .elf compiled with devkitARM and...stille failed -__-
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25205 - NoMis - Wed Aug 18, 2004 3:26 pm

I used the newest version of devkitadv wich is r5. I compiled everything with g++. I compiled every cpp file with the -g option and the thumbmodel with interworking on and compiled all s files exactly the same but with the arm model. Optimization was also turned off wich I recommend anyway if you making a debugable file.

With this configuration I have no problems to load the .elf file into vba.

NoMis

#25209 - RaBBi - Wed Aug 18, 2004 6:12 pm

Just a little question...

Do you compile with multiboot? or not ^^ :P
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^

#25421 - NoMis - Sun Aug 22, 2004 5:58 pm

without. Sorry for late answer, i was on the games convention :)

#25821 - RaBBi - Sun Aug 29, 2004 1:33 am

It's why it works ;)

The problem I had was linked to the multiboot option ^^
Disabled it and now everything's OK.

Thanks for trying to help ^^
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^