gba compile problem records (updated source and CDT project)

2010-08-07  来源:本站原创  分类:CPP  人气:205 

FP error occurs, GNUARM "ERROR: xxx.o uses software FP, whereas main.elf uses hardware FP"
Reference http://www.embeddedrelated.com/groups/lpc2000/show/13575.php
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

Recompile:
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:
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%
pause
@ Echo on
Then double-click the Start CDT.
Or refer to the official testing method http://vba.ngemu.com/faq.shtml .

References:
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%
start eclipse.exe

-------------------------------------------------- ----------

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.

相关文章
  • gba compile problem records (updated source and CDT project) 2010-08-07

    FP error occurs, GNUARM "ERROR: xxx.o uses software FP, whereas main.elf uses hardware FP" Reference http://www.embeddedrelated.com/groups/lpc2000/show/13575.php Use GNUARM tool chain (arm-elf-) may occur when this error. May be due to: a) Use-m

  • gba compile problem records 2010-08-07

    FP error occurs, GNUARM "ERROR: xxx.o uses software FP, whereas main.elf uses hardware FP" Reference http://www.embeddedrelated.com/groups/lpc2000/show/13575.php Use GNUARM tool chain (arm-elf-) may occur when this error. May be due to: a) Use-m

  • Open Source Flex/AS3 project 2010-03-05

    1. Flexbox http://flexbox.mrinalwadhwa.com/ This is a flex developer from India in February 2007 to establish a flex component library, which also has a lot of good things. 2. Flexlib http://code.google.com/p/flexlib/ And others established by the Do

  • (Reprinted) Cygwin GCC's Makefile in the Eclipse CDT project symbols and the path to configure automatic discovery 2010-12-07

    (Reprinted) http://codingdao.com/wp/post/cygwin-eclipse-cdt-makefile-symbol-path-discovery/ MinGW GCC tool set first to use the project does not have this problem: CDT can be found a very good set of tools installed MinGW, MinGW GCC's Toolchain and t

  • About ruby-openid authentication problem records 2010-06-30

    Today in the Rails project, encountered an error, reminder: uninitialized constant OpenID:: Store. Online catalog of some, the decision to the original ruby-openid-2.1.7 switch to ruby-openid-1.1.4, the problem disappeared. The cause of the cause of

  • On the ruby-openid authentication problem records 2010-06-30

    Today in the Rails project, encountered an error, reminder: uninitialized constant OpenID:: Store. Online catalog of some, the decision to the original ruby-openid-2.1.7 switch to ruby-openid-1.1.4, the problem disappeared. The cause of the cause of

  • To compile the Linux kernel source Google Android 2010-07-08

    This is the time prior to his article in laboratory tests, and today I discovered yet sent to, click on the order of release. Google launched the Android platform source code for Linux is based, in the previous related articles I have mentioned this,

  • mac compile problems encountered Android source code 2011-05-28

    Speed ​​has been not to force, under the source and then does not want to copy from the same time that the source code over, and now I have been waiting to see the requirements according to the source code into the / Volumes / android / Android-Sourc

  • [Android] problem records - Android support the unit of measurement 2010-03-29

    Transfer from android official documents, can not provide links, because the android official website of the links are in harmony. I have the Japanese version of google android in the cache inside the turn to the following. Quickly preserved. 1. You

  • China the fastest centos yum (updated source) 2010-04-08

    centos update source http://ftp.sjtu.edu.cn/centos/, Shanghai Jiaotong University, but the server is located in Beijing, China Education Network hub, I do like the side of Chaoyang District, IP, previously had classes in there on, the download speed

  • ubuntu10.4 updated source of domestic 2010-05-27

    Taiwan's official source: deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse deb http://tw.archive.ubuntu.com/ubuntu/ lucid-securit

  • vmware problem records Memo 2010-07-12

    1.bridge connection type network problems unsuccessful open the "program" -> "VMware" - "Virtual Networks Editer" (Virtual Network Editor) Type for the bridge to see a vmnet0 ... The following vmnet information in bridgeto

  • SSH integration of problem solving (updated ing) 2010-12-10

    1, the first error that occurs when integrating struts Checked before the Internet a lot, but have no good explanation, my English is not very good, in that large segment of error messages do not bother to look. Today saw a solution, but added to my

  • [Turn] to add the updated source Ubuntu 10.10 2011-02-23

    Original: http://www.ylmf.net/ubuntu/tips/2010123019307.html Installed the latest version of Ubuntu, the Ubuntu 10.10, I began the agonizing journey. Objectively speaking, start and shutdown faster speed is still quite fast. Open Firefox and install

  • Summary of Oracle DB problem (continually updated) 2011-05-04

    (1) DBLink, Materialized View and "synonym translation is no longer valid" solution: check the synonym sql is correct.especially point the remote schema of the table. example: CREATE MATERIALIZED VIEW foo REFRESH FAST START WITH SYSDATE NEXT SYS

  • China the fastest centos5.4 yum (updated source) 2010-04-08

    The first step: Edit / etc/yum.repos.d/CentOS- Base.repo as: [base] name=CentOS-5 - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch& repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ base

  • Rails version of the actual project, the process of records updated to 2.3.8 (continued) 2010-06-21

    1. Install rails -2.3.8 (while ensuring actionmailer, actionpack, actionwebservice, activerecord, activeresource, activesupport version is 2.3.8); 2. Change the config / environment.rb code RAILS_GEM_VERSION to 2.3.8; 3. All Test:: Unit:: TestCase re

  • mysql uninstall problem records 2010-08-11

    Freebsd mysql installed in the post-uninstall # Cd / usr / ports / database / mysql * / into the ports of the mysql installation directory # Make deinstall clean uninstall command Then when you install a new mysql error: mysql-server-5.4.2 cannot ins

  • uninstall mysql installation problem records 2010-08-11

    Freebsd mysql installed in the post-uninstall # Cd / usr / ports / database / mysql * / into the ports of the mysql installation directory # Make deinstall clean uninstall command Then when you install the new mysql error: mysql-server-5.4.2 cannot i

  • RedHat install hadoop + hbase problem records 2010-08-27

    Vshpere virtual machine installed in the virtual two RedHat system. 1 in / etc / hosts, replace 172.0.0.1 with the host name mapping, slave can not find the master. To delete the host name. . 2 hbase the hbase-site.xml configuration file hbase.rootdi