gba compile problem records

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)

Operational issues:
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:
Start with a relatively high CPU when the 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.
Observed Debug window, find the path name changed because 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 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 .

1) 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
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)
LIBS    = -lstdc++

#  Need to be compiled .o and need to clear the  .o And  .d
SFILES  = common/asm/crt0.s common/asm/div.s common/asm/vba.s
 common/gbadev/common.d common/gbadev/cpu_arm.d common/gbadev/gamemath_arm.d \
 common/gbadev/mt19937ar.d \
 common/gbadev/common.c common/gbadev/cpu_arm.c common/gbadev/gamemath_arm.c \
 common/gbadev/mt19937ar.c \

 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


#  Compile tools default parameters
ASFLAGS = --fatal-warnings 

 -MMD -mthumb -mthumb-interwork -nostdlib -fverbose-asm -fpeephole \
 -mtune=arm7tdmi -mcpu=arm7tdmi \
 -Wall -W -Wshadow -Wno-unused-parameter -Wno-strict-aliasing \
 $(INCDIR) \

 -nostartfiles -Wall

.PHONY: all clean
        @make $(TARGET_BIN)


        @echo -- Build GBA...
        $(OBJCOPY) -v -O binary $< $@
        $(GBAFIX) $@ -t$(NAME) -c$(GAMECODE)

        @echo -- Generate MAP and Build ELF...
        @echo no content > $(MAPFILE)
        $(LD) -o $@ $(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%
start eclipse.exe

分类:CPP 时间:2010-08-07 人气:282
blog comments powered by Disqus


  • Windows 2003 disk partition tool (Partition Master) 2011-01-10

    ed2k: / / | file |% 5B% E6% 98% 93% E6% 88% 91% E5% 88% 86% E5% 8C% BA% E5% A4% A7% E5% B8% 88% 5D.EASEUS. | 44336665 | b8c3826f8bb987d20f1638c5738c520f | h = tyjt34glcalmlndrittr64ihk4ejcy6i | /

  • Disk partition wizard Norton PartitionMagic (PQ8.0) use diagrams and the use of (collection) 2010-03-23

    A friend installed, commissioning, repair computers to come into a wide range of issues. Frequently encountered problem is that not enough hard disk space it! Weighs, and later found that many new to the computer's friends would come across this prob

  • - Xp and windows7 dual system installation (windows7 install xp) 2010-07-11 C1% D9% B1% F8/blog/item/f6732ef88f9b3c839e5146b2.html Photo Xiangjie windows operating system installation (4 )---- xp and windows7 dual system installation (windows7 install xp) 2009-10-08 20:34 just like many of my friends

  • Eclipse for DS-5的使用(ARM学习计划) 2014-11-23

    DS-5是ARM提供的IDE,支持所有ARM芯片的开发,最新版的64位DS-5支持ARMv8架构,不过得需要正式版的license. ARM提供30天的试用的license,可以到官网申请,官方说试用版的旗舰版DS-5能使用全部功能,64位Eclipse for DS-5集成了CDT,内部编译器有交叉编译器ARMCompiler5.05.ARMCompiler6.00u2.gcc for arm,只有ARMCompiler6.00u2支持Cortex-A53的开发,不过亲测使用试用版的licen

  • (Reprinted) hard concept: cylinders. Track. Sector. Clusters 2010-02-08

    The most basic component of the hard disk is made of hard metal coated with magnetic media disc, the number of different capacities ranging from the hard drive disc. Each disc has two sides, can record information. Disc is divided into a number of fa

  • mount command Xiang Jie and Case Analysis 2010-02-17

    mount command Xiangjie and Case Analysis Source: ChinaUnix blog Date: 2008.08.23 23:35 (0 comments) I want to comment mount command Xiangjie function: to load the specified file system. Syntax: mount [-afFhnrvVw] [-L] [-o] [-t] [device name] [mount p

  • win7 environment hard drive to install Linux on Redhat5.4 2011-03-16

    Installed win7, iso file to the hard disk on the basis of installing a dual system. Preparing for installation: 1. Redhat5.4 mirror; rhel-server-5.4-x86_64-dvd.iso 2. Grldr, used to boot the system, I downloaded the grub4dos-0.4.4 software, and there

  • C / C + + compiler and debugger, and a static library. Dynamic library used summary 2011-05-04

    Often, a friend asked about unix is the technology section below. I compiled the following most commonly used unix system debugging tools to debug technology articles. We want to help. In addition static library, dynamic library is also relatively hi

  • Spring Annotations Learning Letters (2) control layer comb 2010-08-04

    Spring notes yesterday have a whole understanding, at least to complete a simple web application structure. Of course, not perfect, this is only the beginning! Today saw Spring 3.0 annotations, I feel that they have been subverted. Years ago, in orde

  • Programmer Competency Matrix you belong to which layer? 2010-11-13

    Original 5BCN% 5DProgrammer% 20competency% 20matrix.htm [Translation] programmers ability to Programmer Competency Matrix Matrix Note: Each level of knowledge is increasing, and in the level of n, also contains all you nee

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 闽ICP备15018612号

processed in 0.133 (s). 10 q(s)