I'm trying to move my existing project over from devkitadv-r5-beta-3 over to devkitARM to get access to C++11 and beyond features, and
currently I've managed to get it compiling with a few makefile tweaks, but since I'm using my own makefile and not building this in the way recommended for this compiler, I run into "Unsupported ARM mode 00" when trying to run the compiled gba file.
I can progress past this error if I run the ROM through the "gbafix.exe" but running the ROM again simply produces a white screen, when I would normally have a few dancing sprites when compiling with DevKit Advance. Reducing the "main" function down to nothing but an empty loop doesn't fix it either, I still get the same white screen.
Not sure of what else I could be missing at this point. Any help would be greatly appreciated cause the lack of C++11 features are killing me right now.
Things of note-
- I am on WIndows 8.1.
- I am running the ROM through VisualBoyAdvance.
- I am building through Visual Studio as a makefile project, with the build command
Code: Select all
set path=E:\devkitPro\devkitARM\bin; %PATH%
make
- When using gbafix.exe I am simply dragging the .gba file onto the exe to get it to run.
- My makefile is
Code: Select all
TARGET := TestGba
CC := gcc
CXX := g++
SRCDIR := src
OBJDIR := obj
BUILD := bin
DEPDIR := dep
ARCH := #-mthumb -mthumb-interwork
CFLAGS := -g -Wall -O3 \
#-mcpu=arm7tdmi -mtune=arm7tdmi\
$(ARCH)
LDFLAGS :=
ifeq ($(DEBUG_PC),1)
CXXFLAGS := $(CFLAGS) -pedantic -fno-exceptions -I $(SRCDIR)/ -std=c++0x -fpermissive
EXE := exe
else
CXXFLAGS := $(CFLAGS) -pedantic -fno-exceptions -I $(SRCDIR)/ -std=c++0x -fpermissive
EXE := gba
endif
# Recursively search through subdirectories of subdirectories to find files
rfilesearch = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rfilesearch,$d/,$2))
CFILES := $(call rfilesearch,$(SRCDIR)/,*.c)
CPPFILES := $(call rfilesearch,$(SRCDIR)/,*.cpp)
SFILES := $(call rfilesearch,$(SRCDIR)/,*.s)
OBJFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
DEPFILES := $(OBJFILES:.o=.d)
ALL_DEPFILES := $(call rfilesearch,$(SRCDIR)/,*.d)
ALL_OBJFILES := $(call rfilesearch,$(SRCDIR)/,*.o)
# Configure for windows commands
ifeq ($(OS),Windows_NT)
RMCMD = rm
CLEANFILES := $(subst /,\,$(ALL_OBJFILES)) $(subst /,\,$(ALL_DEPFILES))
else
RMCMD = rm
CLEANFILES = DEPFILES OBJFILES
endif
#---------------------------------------------------------------------------------
all: $(BUILD)\$(TARGET).$(EXE)
# Build an exe
ifeq ($(DEBUG_PC),1)
$(BUILD)\$(TARGET).$(EXE): $(OBJFILES)
$(CXX) -o $@ $^ $(LDFLAGS)
else
$(BUILD)\$(TARGET).$(EXE): $(BUILD)\$(TARGET).elf
objcopy -O binary $(BUILD)\$(TARGET).elf $(BUILD)\$(TARGET).gba
# Pre-GBA compiled binary
$(BUILD)\$(TARGET).elf: $(OBJFILES)
$(CXX) -o $@ $^ $(LDFLAGS)
endif
-include $(DEPFILES)
%.d: %.cpp
@$(CXX) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
clean :
$(RMCMD) $(CLEANFILES)
#$(RMCMD) -fr $(TARGET).elf $(TARGET).gba