Homebrew How to compile 3ds homebrew manually by command line

doyoulovecake

New Member
Newbie
Joined
Jan 22, 2020
Messages
3
Reaction score
0
Trophies
0
Age
36
XP
64
Country
United States
Hello there, I've used the Makefile from examples to compile homebrew successfully. I would like to use another build system but first I need to understand what the Makefile is doing. I've tried the following two commands (compile and link) but they only work on emulators and crash my physical 3DS.
I would be glad if someone could help me with this.



Compile:
Code:
arm-none-eabi-g++ -MMD -MP -g -o main.o -Wall -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/Projects/include/ -I/include/m3d/ -I/opt/devkitpro/portlibs/3ds/include -I/opt/devkitpro/libctru/include -I/Projects/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c src/main.cpp
Link:
Code:
arm-none-eabi-g++ -o main.3dsx *.o -lm3dia -Llib -L$DEVKITPRO/libctru/lib -L$DEVKITPRO/portlibs/3ds/lib -lcitro3d -lcitro2d -lctru -specs=3dsx.specs -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -Wl,-Map,8.map

I would also like to know how the map files are generated.
Thanks in advance!
 

Site & Scene News

Popular threads in this forum