开发者社区> 问答> 正文

codeblocks中自己做的向导,在链接的时候出错。怎么办。? 报错

codeblocks中自己做的向导,在链接的时候出错。怎么办。? 400 报错

是从一个makefile

如下:

# Blacksun Empire g++ MakeFile generator
# This is a machine generated file-do not edit
# 2012/9/14 13:21:55


TOOLROOT = C:/Cygnus/arm-tools/i686-pc-cygwin/bin
CC = $(TOOLROOT)/arm-elf-gcc
CXX = $(TOOLROOT)/arm-elf-g++
OBJCOPY = $(TOOLROOT)/arm-elf-objcopy
AR = $(TOOLROOT)/arm-elf-ar
LD = $(TOOLROOT)/arm-elf-ld
OUTPUT_DIR = ./
OUTPUT_NAME = ./qiping.elf
OUTPUT_BIN   = ./qiping.bin
LIB = C:/Cygnus/arm-tools/i686-pc-cygwin/arm-elf/lib
GCCLIB = C:/Cygnus/arm-tools/i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0.3


TEXT = 1280000
DATA = 0003000
BSS = 0020000


INC_PATH = -I"C:/Cygnus/arm-tools/i686-pc-cygwin/arm-elf/include" -I"C:/Cygnus/arm-tools/i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0.3/include" -I"./Include"
DEFINE = 
CPPFLAGS = $(INC_PATH) $(DEFINE)
ENDIAN_AS = -Wa,-EL
ENDIANFLAG = -mlittle-endian  -A 'endian(little)'
CFLAGS += $(INC_PATH) $(DEFINE) $(ENDIANFLAG) -fno-rtti -DMACHINE_TYPE_ARM  -w -O0 -g -gdwarf-2
ASFLAGS = -x assembler-with-cpp -Wa,--gstabs -Wa,-mall $(ENDIAN_AS)
LDFLAGS = -n -N -nostartupfiles -static -EL -e_start -g
LINK_DIR = ./
LINK_SCRIPT := "C:\Cygnus\GMaker\GMaker.LD"
LIBS = ./lib/p130.a ./lib/p130-flash.a $(LIB)/libm.a $(LIB)/libc.a $(GCCLIB)/libgcc.a


SOURCES =  cstartup_flash.s main.c function.c
OBJECTS :=  cstartup_flash.o main.o function.o


all: $(OBJECTS) $(OUTPUT_NAME) $(OUTPUT_BIN)
cstartup_flash.o: cstartup_flash.s
$(CC) -c $(CFLAGS) $(ASFLAGS) cstartup_flash.s
main.o: main.c
$(CC) -c $(CFLAGS) main.c
function.o: function.c
$(CC) -c $(CFLAGS) function.c


$(OUTPUT_NAME): $(OBJECTS)
$(LD) -Ttext $(TEXT) -Tdata $(DATA) -Tbss $(BSS) $(LDFLAGS) -L"$(LINK_DIR)" -T$(LINK_SCRIPT) -o $@ $^ $(LIBS)


$(OUTPUT_BIN): $(OUTPUT_NAME)
$(OBJCOPY) -R .data -R .rdata -R .sbss -R .bss  -O binary $(OUTPUT_NAME) tempbin.1
$(OBJCOPY) -R .text -R .rodata --change-section-address .data=0 -O binary $(OUTPUT_NAME) tempbin.2
cat -B tempbin.1 tempbin.2 > $(OUTPUT_BIN)
rm tempbin.1 tempbin.2
rm -f $(OBJECTS)


做了一个向导,但是在编译时出错,怎么办

[100.0%] arm-elf-ld.exe -Ldefault\src  -o default\P130.elf default\src\cstartup_flash.o default\src\main.o   -T ld/target.ld -v -Ttext 1280000 -Tdata 0008000 -Tbss  0003000 -n -N -nostartupfiles -static -EL -e_start -g  lib\file_sys.a lib\P130.a C:/Cygnus/arm-tools/i686-pc-cygwin/arm-elf/lib/libm.a C:/Cygnus/arm-tools/i686-pc-cygwin/arm-elf/lib/libc.a C:/Cygnus/arm-tools/i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0.3/libgcc.a 
arm-elf-ld: Error: highbios.o uses hard floating point, whereas startupfiles uses soft floating point
File format not recognized: failed to merge target specific data of file lib\P130.a(highbios.o)


。。。。。

展开
收起
优选2 2020-06-04 17:39:30 658 0
1 条回答
写回答
取消 提交回答
  • 没有吗######自己顶

    2020-06-04 18:07:35
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
附件下载测试 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载