gba compile problem records

分类:CPP 2010-08-07 来源:CodeWeblog.com 人气:269

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:
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%
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 $< $@
        $(GBAFIX) $@ -t$(NAME) -c$(GAMECODE)

$(TARGET_ELF): $(OFILES) $(AFILES) Makefile
        @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

分享到:
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. Partition.Master.v6.0.1.Server.Edition.Retail-FOSI.zip | 44336665 | b8c3826f8bb987d20f1638c5738c520f | h = tyjt34glcalmlndrittr64ihk4ejcy6i | /

  • Database design techniques in the 14 2009-07-15

    Database design techniques in the 14 Published: 2007-12-03 16:55 | Author: kider | Source: MySQL Community portal Author: maXiaoKe, Source: IT Experts Net / Javereserarch, Editor: LI Shu-qin, 2007-11-23 09:22 The following 14 techniques, many people ...

  • java database design techniques in the 14 2009-11-06

    The following 14 techniques, many people in a large number of database analysis and design practice, summed up gradually. For the use of these experiences, the reader can not help bowls of Health, by rote, and to digest the understanding, seek truth from

  • 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 probl

  • Database design techniques in 14 [Reserved] 2010-04-17

    Source I do not know where, and Oh. Also, please forgive me. 1. Original documents and the relationship between entities Can be one to one, one to many, many to many relationship. In general, they are one to one relationship: the one and only origina ...

  • - Xp and windows7 dual system installation (windows7 install xp) 2010-07-11

    http://hi.baidu.com/bbk% 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

  • Kinds of ways to connect to the database 2010-10-11

    Oracle8/8i/9i database (thin model) Class.forName ("oracle.jdbc.driver.OracleDriver"). NewInstance (); String url = "jdbc: oracle: thin: @ localhost: 1521: rcl"; / / orcl SID for the database String user = "test"; String pass

  • Database table design 2010-10-19

    1. Original documents and the relationship between entities is one to one, many, many to many relationship. In general, they are one to one relationship: the one and only original documents corresponds to a corresponding entity. In exceptional circumstanc

  • Some skills in database design 2010-11-07

    1. Original documents and the relationship between entities is one to one, many, many to many relationship. In general, they are one to one relationship: the one and only original documents corresponds to a corresponding entity. In exceptional circumstanc

  • Switch: 14 database design skills 2011-01-07

    From: http://apps.hi.baidu.com/share/detail/15273387 1, the original documents and the relationship between entities can be a one to one, many, many to many relationship. In general, they are one to one relationship, that is an original document and

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.190 (s). 14 q(s)