FP error occurs, GNUARM "ERROR: xxx.o uses software FP, whereas main.elf uses hardware FP"
Use GNUARM tool chain (arm-elf-) may occur when this error.
May be due to:
a) Use-mthumb-interwork compiled. s
b) compile. c generated. o in the link on. s generated. o file in front of the
Generally need to press the main menu Project-> Clean ...
Makefile dependency mechanism may result in part. O not cause the error changes
CDT determine whether the debug version of elf:
If you are creating a pure Makefile project requires the project properties -> C / C + + Build-> Settings in check the Elf Parser
While ensuring Makefile to compile each. O use-g3-O0 (third level debugging, the zero level optimization)
As both build and run the vba is difficult to judge the rom gba is normal (for example, some missing. O files)
Some ways to determine:
CPU use is higher at the beginning screen is white layer model viewer can not see what is
Hou occur when debugging Source not found the problem:
Mode debugging using gdbserver debugger and found that this situation can not add a direct result of the breakpoint.
Debug window of observation was found because the path name changed, the original C: \ xx \ xx into \ xx \ xx \ xx.
CDT do not know which disk partition should be to find. C file.
The solution is to Debug Configurations-> Source-> Add-> Path Mapping Add Mapping.
For example, debugging code in the D drive, on the set \ maps D: \
Added: If you open the same port more than 55,555 debugging causes errors
So, step through attention to a single instance of the run before.
Also, select gdbserver debugger, select the tcp 55555 port
And manually specify the arm-elf-gdb.exe.
Debugging before the opening vba, for example, start with a batch VisualBoyAdvance-SDL
@ Echo off
set DEBUG_PATH = D: \ software \ mingwdev \ gba \ gbadev
set DEBUG_ELF = step2.elf
set DEBUG_FLAGS =- Gtcp
% DEBUG_PATH% \ common \ bin \ VisualBoyAdvance-SDL.exe% DEBUG_FLAGS%% DEBUG_PATH% \% DEBUG_ELF%
@ Echo on
Then double-click the Start CDT.
Or refer to the official testing method http://vba.ngemu.com/faq.shtml .
1) http://akkera102.sakura.ne.jp/gbadev/ the Step 2
I offer Step 2. On the basis of the source code written in Makefile, used for CDT debugging.
# Description : # PREFIX: Specifies that the compiler : # arm-elf- : GNUARM # # GBAFIX: Need to point to the specified GBAFIX( Because there is no GNUARM ) # DFILES: Specify those .d files need to be clear ( Open the debug build ) # # Environmental parameters MAKEFLAGS += --no-print-directory SHELL = sh # Tool chain AS = arm-elf-as CC = arm-elf-gcc CPP = arm-elf-g++ LD = arm-elf-g++ AR = arm-elf-ar OBJCOPY = arm-elf-objcopy NM = arm-elf-nm GBAFIX = ./common/bin/gbafix # main File and the destination file name, and gamecode NAME = step2 GAMECODE= $(NAME) NMFILE = $(NAME).nm TARGET_ELF = $(NAME).elf TARGET_BIN = $(NAME).gba MAPFILE = $(NAME).map # .ld File ( The linker configuration ) References and whether to generate a .map file ( Generate a report )(-T,-Map) LDFILEFLAGS = -T./common/ld/gba_cart.ld MAPFILEFLAGS = #-Wl,-Map $(NAME).map # The header file and library file directory, the directory and the library name (-I,-L,-l) INCDIR = -I. LIBS = -lstdc++ # Need to be compiled .o and need to clear the .o And .d AFILES = SFILES = common/asm/crt0.s common/asm/div.s common/asm/vba.s DFILES = \ common/gbadev/common.d common/gbadev/cpu_arm.d common/gbadev/gamemath_arm.d \ common/gbadev/mt19937ar.d \ step2.d CFILES = \ common/gbadev/common.c common/gbadev/cpu_arm.c common/gbadev/gamemath_arm.c \ common/gbadev/mt19937ar.c \ step2.c OFILES = \ common/asm/crt0.o common/asm/div.o common/asm/vba.o \ common/gbadev/common.o common/gbadev/cpu_arm.o common/gbadev/gamemath_arm.o \ common/gbadev/mt19937ar.o \ step2.o \ # Error OFILES lead Simulator is not working properly _OFILES = common/asm/crt0.o step2.o DEBUGFLAGS = -O0 -g3 # # Compile tools default parameters ASFLAGS = --fatal-warnings CFLAGS = \ -MMD -mthumb -mthumb-interwork -nostdlib -fverbose-asm -fpeephole \ -mtune=arm7tdmi -mcpu=arm7tdmi \ -Wall -W -Wshadow -Wno-unused-parameter -Wno-strict-aliasing \ $(INCDIR) \ $(DEBUGFLAGS) LDFLAGS = $(MAPFILEFLAGS) $(LIBS) $(LDFILEFLAGS) \ -nostartfiles -Wall .PHONY: all clean all: @make $(TARGET_BIN) clean: rm -f $(OFILES) $(DFILES) $(MAPFILE) $(NMFILE) $(TARGET_ELF) $(TARGET_BIN) $(TARGET_BIN): $(TARGET_ELF) @echo -- Build GBA... $(OBJCOPY) -v -O binary $< [email protected] $(GBAFIX) [email protected] -t$(NAME) -c$(GAMECODE) $(TARGET_ELF): $(OFILES) $(AFILES) Makefile @echo -- Generate MAP and Build ELF... @echo no content > $(MAPFILE) $(LD) -o [email protected] $(OFILES) $(LDFLAGS)
Although no expert in this Makefile to write a technical content, but after all upgraded (for compiling. O files need to be individually specified)
2) I compiled with GNUARM tool chain, because there is no specific gba GNUARM development libraries and tools, you can take that from devkitPro.
For example gbafix.exe:
3) run the CDT environment variables used to set the batch is
@ Set path =% cd% \ eclipse-cpp-galileo-SR2-win32 \;% path%
@ Set path =% cd% \ devkitPro \ bin;% path%
@ Set path =% cd% \ GNUARM \ bin;% path%
As the Japanese site, may not be easy to find the source of the download, I modified source code and its annex on the CDT project, if interested can look at.
This blog only discuss GNUARM situation, if you have time I will make up the other tool chain Makefile.
By the way, http://akkera102.sakura.ne.jp/gbadev/ use libgba not the same as with devkitPro own.