Homebrew Noob HB dev questions

Monado_III

Well-Known Member
OP
Member
Joined
Feb 8, 2015
Messages
722
Trophies
0
Location
/dev/null
XP
1,443
Country
Canada
So I just started learning C but I'd like to eventually get into making 3ds homebrew. But I have several question that I can't find answers to; A)Can I set up Code::Blocks as my IDE for homebrew development and B)What IDE am I suppose to use if it's not Code::Blocks and how do I set it up? (I already have the DevKitARM installed on my Fedora and Mint installations)

Sorry, if these questions seem stupidly obvious but I'm only in Gr. 9 and this: http://3dbrew.org/wiki/Setting_up_Development_Environment didn't help me that much.
 

Lenan

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
172
Trophies
0
Age
32
XP
142
Country
Swaziland
You can use whichever IDE you want.
1.Create new empty project and skip setup page.
2. Right click your project -> properties -> in Project settings, check "This is a custom Makefile".
2.2 If you want auto-completion: Right click project -> properties -> "C/C++ parser options" -> add -> x\devkitPro\libctru\include (x= is your path to the devkit folder)
3. (Not sure about this one) still in project properties -> build targets -> switch type to "commands only".

I didn't actually test this (except for auto completion) but i hope this brings you on the right track :P

If it doesn't, I recommend Netbeans and then just follow the instructions on that link you posted.
 

Monado_III

Well-Known Member
OP
Member
Joined
Feb 8, 2015
Messages
722
Trophies
0
Location
/dev/null
XP
1,443
Country
Canada
The 3dbrew intrutions say: "It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top"

Where in the top of the makefile?
 

Lenan

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
172
Trophies
0
Age
32
XP
142
Country
Swaziland
Sorry, I have no clue. I'm on Windows and I just use the default one (pretty much every hb source uses the same one) and it works fine for me.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
You can place them at the "top" of makefile.
edit it, and past the lines on line 1 so all the other commands in the makefile will know where the "devkitpro" and "devkitarm" variable environment are pointing to.
 
  • Like
Reactions: Monado_III

Slushie3DS

Cold Beverage Lover
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
I just use Gedit, a native Linux plain text editor, and do what Cyan just said. Although, that's just the bare mineral approach, and I don't recommend it unless you're really good at debugging without help.
 

Monado_III

Well-Known Member
OP
Member
Joined
Feb 8, 2015
Messages
722
Trophies
0
Location
/dev/null
XP
1,443
Country
Canada
Wow a mod responded! Ok, so when I try to build one of the examples using make this happens in the Terminal;

'main.c
arm-none-eabi-gcc -MMD -MP -MF /home/myname/Documents/ctrulib-master/examples/app_launch/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/home/myname/Documents/ctrulib-master/examples/app_launch/include -I/opt/devkitpro/libctru/include -I/home/myname/Documents/ctrulib-master/examples/app_launch/build -DARM11 -D_3DS -c /home/myname/Documents/ctrulib-master/examples/app_launch/source/main.c -o main.o
linking app_launch.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/bin/ld: error: main.o uses VFP register arguments, /home/myname/Documents/ctrulib-master/examples/app_launch/app_launch.elf does not
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file main.o
collect2: error: ld returned 1 exit status
/opt/devkitpro/devkitARM/3ds_rules:37: recipe for target '/home/myname/Documents/ctrulib-master/examples/app_launch/app_launch.elf' failed
make[1]: *** [/home/myname/Documents/ctrulib-master/examples/app_launch/app_launch.elf] Error 1
Makefile:125: recipe for target 'build' failed
make: *** [build] Error 2'

What am I doing wrong? BTW I really appreciate you guys helping me. I feel like an absolute idiot right now.
 

Slushie3DS

Cold Beverage Lover
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
Wow a mod responded! Ok, so when I try to build one of the examples using make this happens in the Terminal;

'main.c
arm-none-eabi-gcc -MMD -MP -MF /home/myname/Documents/ctrulib-master/examples/app_launch/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/home/myname/Documents/ctrulib-master/examples/app_launch/include -I/opt/devkitpro/libctru/include -I/home/myname/Documents/ctrulib-master/examples/app_launch/build -DARM11 -D_3DS -c /home/myname/Documents/ctrulib-master/examples/app_launch/source/main.c -o main.o
linking app_launch.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/bin/ld: error: main.o uses VFP register arguments, /home/myname/Documents/ctrulib-master/examples/app_launch/app_launch.elf does not
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file main.o
collect2: error: ld returned 1 exit status
/opt/devkitpro/devkitARM/3ds_rules:37: recipe for target '/home/myname/Documents/ctrulib-master/examples/app_launch/app_launch.elf' failed
make[1]: *** [/home/myname/Documents/ctrulib-master/examples/app_launch/app_launch.elf] Error 1
Makefile:125: recipe for target 'build' failed
make: *** [build] Error 2'

What am I doing wrong? BTW I really appreciate you guys helping me. I feel like an absolute idiot right now.

From the looks of that, it seems you're missing app_launch.elf.

Also, don't feel bad. Everyone starts somewhere.
 

Slushie3DS

Cold Beverage Lover
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
How would I create an .elf? When I try to build the file from Netbeans it gives me the same error.

If you look at that error message, you can see where the .elf is supposed to be located. Whatever you're trying to do seems to be attempting to grab an example .elf from the ctrulib-master, which you do not have. Did you install those examples?
 

Monado_III

Well-Known Member
OP
Member
Joined
Feb 8, 2015
Messages
722
Trophies
0
Location
/dev/null
XP
1,443
Country
Canada
If you look at that error message, you can see where the .elf is supposed to be located. Whatever you're trying to do seems to be attempting to grab an example .elf from the ctrulib-master, which you do not have. Did you install those examples?
Well, I've downloaded those examples, and I'm trying to turn one into a 3dsx for future reference on how to build 3dsx's and to make sure my IDE is set up properly.
 

Lenan

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
172
Trophies
0
Age
32
XP
142
Country
Swaziland
I just made a new clone of ctrulib+examples and build the app_launch with no problems.

Did you modify the makefile? If so, undo your changes, try again, and report back. :P
 

Monado_III

Well-Known Member
OP
Member
Joined
Feb 8, 2015
Messages
722
Trophies
0
Location
/dev/null
XP
1,443
Country
Canada
I just made a new clone of ctrulib+examples and build the app_launch with no problems.

Did you modify the makefile? If so, undo your changes, try again, and report back. :P
I only modified the top with the export stuff. Take that away and you'll get a error message.
(export DEVKITPRO=/opt/devkitpro and export DEVKITARM=/opt/devkitpro/devkitARM)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
Moderators are normal people !
we are part of the users and are here because we like to help and because we love same things as others (homebrew, video games, dev, etc.)

I don't have linux, and I'm also a noob in lot of domains, I'm also learning homebrew development. just take your time and read a lot to understand what you see and what you do.

arm-none-eabi/bin/ld: error: main.o uses VFP register arguments,
examples/app_launch/app_launch.elf does not

It's not crashing on compilation (creating the objects). It seems to crash when linking the compiled objects (the .o) to create the elf file (the final executable). linker and compiler are maybe not using the same "method" ? (like I said, I don't know a lot, I'm learning too. I don't know what VFP arguments are)
verify your environment, if your are using latest devkitpro and libctru. (it should include proper .ld file used to link the objects)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    NinStar @ NinStar: It will actually make it worse