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 > getting the eclipse HDE plugin to work - please help

#83423 - Ant6n - Tue May 16, 2006 6:04 am

hi,

I am trying to get HDE for eclipse to work. It seems like a great plugin, for a great IDE, making things simpler; but so far it doesnt really work for me.
I followed the instructions and installed insight, msys, and devkitpro r8, and set all environment variables.
i created an empty project. that worked fine (only the project is empty ;)
then i added a new empty c source file (main.c).
i add a function:

int main(){
while (1);
return 0;
}

but i get the errors in the problems tab:

Code:
Severity   Description   Resource   In Folder   Location   Creation Time
2   *** [gbatest.elf] Error 1   gbatest         May 16, 2006 12:45:11 AM
0   File not indexed because it was not built   main.c   gbatest      May 16, 2006 12:43:44 AM


and in the console:


Code:
**** Full rebuild of configuration Debug for project gbatest ****

make -k clean all
rm -rf  ./main.o  ./main.d gbatest.elf
 
Building file: ../main.c
Invoking: GCC C Compiler
arm-elf-gcc -O0 -g3 -Wall -c -fmessage-length=0 -mthumb -mthumb-interwork -omain.o ../main.c
Finished building: ../main.c
 
Building target: gbatest.elf
Invoking: GCC C Linker
arm-elf-gcc -mthumb-interworking -specs=gba.specs -ogbatest.elf ./main.o
c:\programs\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/programs/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1\libgcc.a(_call_via_rX.o) does not support interworking, whereas gbatest.elf does
c:\programs\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/programs/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1/../../../../arm-elf/lib\libc.a(malloc_vars.o) does not support interworking, whereas gbatest.elf does
c:\programs\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/programs/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1/crtend.o does not support interworking, whereas gbatest.elf does
c:\programs\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/programs/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1/crtn.o does not support interworking, whereas gbatest.elf does
c:/programs/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1/../../../../arm-elf/lib/gba_crt0.o(.init+0x224): In function `$t':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [gbatest.elf] Error 1
make: Target `all' not remade because of errors.
Build complete for project gbatest


After turning off arm-thumb interworking (in the helpfile it says it doesnt work, what is up with that anyway) i get:


Code:
**** Full rebuild of configuration Debug for project gbatest ****

make -k clean all
rm -rf  ./main.o  ./main.d gbatest.elf
 
Building file: ../main.c
Invoking: GCC C Compiler
arm-elf-gcc -O0 -g3 -Wall -c -fmessage-length=0 -mthumb -omain.o ../main.c
Finished building: ../main.c
 
Building target: gbatest.elf
Invoking: GCC C Linker
arm-elf-gcc -specs=gba.specs -ogbatest.elf ./main.o
c:/programs/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1/../../../../arm-elf/lib/gba_crt0.o(.init+0x224): In function `$t':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [gbatest.elf] Error 1
make: Target `all' not remade because of errors.
Build complete for project gbatest


If I launch the thing it actually starts but shows a white screen in vba-sdl. and eclipse gives a "launching - error starting process" error.
It seems that the main.c is not added to the project at all (not built, not indexed, undefined reference to main...)
Can anybody help me here? any hint is greatly appreciated.
thank you

anton


Last edited by Ant6n on Fri May 19, 2006 8:28 pm; edited 1 time in total

#83588 - Ant6n - Wed May 17, 2006 4:31 am

nobody? i thought there are some people who use eclipse for gba in this forum?

#84620 - Ant6n - Tue May 23, 2006 7:31 pm

If nobody can help me here, can at least someone tell me where i could find help?
Or where my question was wrong?

thx
anton

#84658 - Cearn - Tue May 23, 2006 11:17 pm

Here are three things that may or may not help (I can't be sure as I'm not familiar with Eclipse or your makefile or file organisation)

Quote:
Code:

arm-elf-gcc -O0 -g3 -Wall -c -fmessage-length=0 -mthumb -mthumb-interwork -omain.o ../main.c
../main.c
Finished building: ../main.c
This builds ../main.c, i.e. the file called main.c one directory level up from the makefile. If that's how your code is organised then nevermind, but it is a little suspicious. Also, I don't think that there is such a flag as '-g3', just '-g'.

Quote:
Code:
arm-elf-gcc -mthumb-interworking -specs=gba.specs -ogbatest.elf ./main.o
There is no flag called '-mthumb-interworking'. Lose the 'ing'.

Quote:
Code:
In function `$t':
: undefined reference to `main'

An undefined reference means that the file(s) is/are compiled, but that there's no function called 'main()' in the project. Make sure you actually have a main function (in ../main.c, the file that's compiled, not ./main.c)

#84932 - sumiguchi - Thu May 25, 2006 9:40 pm

I can't even find the HDE plugin for eclipse! Have a link?
Edit: Woops! Found it Handheld Dev Env plugin! http://hde.gamedev.at/

#84936 - keldon - Thu May 25, 2006 10:16 pm

I couldn't get it to work, but I was happy with my editplus setup so it didn't bother me.

#84967 - Ant6n - Fri May 26, 2006 3:50 am

i was thinking to use it in a course environment, so that's linux, and the school already uses eclipse primarily for java, but also c/c++. I would really like to have a decent environment that supports debugging, works in linux and doesnt cost a fortune and is simple to use once it's setup...
so far i am pretty stalled on this topic. It seems all that is wrong is the adding of a file that includes a function main, which actually gets indexed.
I wish they had included a more throughout tutorial.