我正在使用应用笔记B-24,在一些编辑之后,我才能完成链接阶段,但在此之后我得到了这个错误
CC ../../../src/modules/app/src/app_project/template_fh/app_template_proj.o
CC startup_ARMCM0.o
链接out / full_emb_sysram.axf
../../patch_code/obj/ch_map.odj:未识别的文件:未识别文件格式
Collect2:错误:LD返回1个退出状态
制作:*** [out / full_emb_sysram.axf]错误1
因此,GCC-ARM-None-EABI无法识别基本的补丁代码
任何评论我可能做错了什么吗?
谢谢
Mohit Maheshwari
你好莫希特,
本周我们的GNU专家是ooo,允许我自己没有多大的GNU经验。我在线快速搜索:可以在GNU中链接才能链接吗?这个线程Belwo意味着没有。
BR JE_DIALOG.
http://www.delorie.com/djgpp/v2faq/faq17_5.html
谢谢for relpy , I got new sdk 3.0.6 , .obj files in this one has elf format and i was able to compile the project and generate hex file, but there is one optimisation option -fplugin=tree_switch_shortcut_elf that my arm-none-eabi compiler does not support , it's for optimization of R.W. FSM that is implemeted in code. i compiled removing that option and hex file is generated and i used JLinkGDBServer and gdb to upload hex file but device is not advertising i used compiler binaries from launchpad project 'https://launchpad.net/gcc-arm-embedded/+download“你能把我指向资源,我可以得到兼容的编译器
你好,
我得到了相同的结果,当我使用这个工具链GCC-ARM-None-EABI-4_8-2014Q3编译时无法宣传。但是,我可以运行代码(即LED闪烁)及其工作。
我还可以确认UART驱动程序无法使用该工具链。我使用转换脚本来生成makefile。我也用DA14580_Beacon_3.40-2.6的样本代码进行了一些测试,没有运气。
无论我将CMD-> Channel_Map设置为零但零的任何东西,我似乎都崩溃了...
任何想法 ?
我可以确认-FPLUGIN=tree_switch_shortcut_elf is not compatible with windows & mac version of gcc-arm-none-eabi-4_8-2014q3, but only on linux. I did not try on a linux box with with option (I'm compiling on a mac.)
Here is my Makefile for further info :
#
#makefile必须定义以下变量,该变量由common.mk使用:
#O:输出目录
#stack_size:为堆栈保留的字节数
#HEAP_SIZE: number of bytes to reserve for the heap
#Cortex_m:Cortex-M模型为目标
#startup_defs:define配置启动代码
#cflags:用于编译和链接的标志
#LDFLAGS: flags used for linking
#rom_map_file:rom地图文件
#obj:要编译和链接的对象文件列表
#target_ell:目标的名称(用于生成的图像)
#
#output directory
o?=出来
#stack size
STACK_SIZE = 0x0600
#heap size
heap_size = 0x0100.
#启动代码
cortex_m:= 0
STARTUP = startup_ARMCM$(CORTEX_M).S
#startup configuration
startup_defs + = -d__stack_size = $(stack_size)-d__heap_size = $(heap_size)
#STARTUP_DEFS += -D__START=main
#STARTUP_DEFS += -D__STARTUP_COPY_MULTIPLE
startup_defs + = -d__startup_clear_bss_multiple
#-os -flto -funding-sections -fdata-sections编译代码大小
#CFLAGS += -flto
cflags + = -ffunction-sections -fdata-sections -wno-mackic-function-ocomation
#Link for code size
GC:= -WL, - GC-部分
src:= src /
BUILD := build/
top?= $(shell pwd)
app_src:= ./app/b4s.c \
。/app/system/periph_setup.c \
。/app/system/b4s_uart.c \
$(SRC)modules/app/src/app.c \
$(SRC)modules/app/src/app_sec.c \
$(src)模块/ app / src / app_sec_task.c \
$(src)模块/ app / src / app_task.c
boot_src:= plf / scip / src / arch / boot / rvds / system_armc0.c \
PLF / RECIP / SRC / ARCH / MAIN / BLE / HARDFAULT_HANDLER.C
#boot_src_s:=plf/refip/src/arch/boot/rvds/boot_vectors.s
boot_src_s:=
ARCH_SRC:= PLF / REFIP / SRC / ARCH / MAIN / BLE / ARCH_MAIN.c \
plf/refip/src/arch/main/ble/jump_table.c \
PLF / RECIP / SRC / ARCH / MAIN / BLE / ARCH_SLEEP.C \
PLF / REFIP / SRC / ARCH / MAIN / BLE / NMI_HANDLER.C \
PLF / RECIP / SRC / ARCH / MAIN / BLE / ARCH_SYSTEM.C
nvds_src:= modules / nvds / src / nvds.c
rwble_src:= modules / Rwip / src / rwip.c \
IP / BLE / LL / SRC / RWBER / RWBE.C
host_src:= ip / ble / hl / src / host / gap / gapm / gapm.c
driver_src:= modules / rf / src / rf_580.c \
plf/refip/src/driver/gpio/gpio.c
profile_src:=
srcs_c:= $(app_src)$(addprefix $(src),$(boot_src))\
$(addprefix $(src),$(Arch_src))\
$(addprefix $(SRC), $(NVDS_SRC)) \
$(addprefix $(src),$(rwble_src))\
$(addprefix $(SRC), $(DRIVER_SRC)) \
$(addprefix $(src),$(profise_src))
srcs_s:= $(addprefix $(src),$(boot_src_s))
标题_DIR:=对话框/包括\
IP / BLE / HL / SRC / HCIH \
IP / BLE / HL / SRC / HOST / ATT \
IP / BLE / HL / SRC / HOST / ATT / ATTC \
ip/ble/hl/src/host/att/attm \
ip/ble/hl/src/host/att/atts \
IP / BLE / HL / SRC / HOST / GAP \
ip/ble/hl/src/host/gap/gapc \
IP / BLE / HL / SRC / HOST / GAP / GAPM \
IP / BLE / HL / SRC / HOST / GATT \
IP / BLE / HL / SRC / Host / Gatt / Gattc \
ip/ble/hl/src/host/gatt/gattm \
IP / BLE / HL / SRC / Host / I2C \
ip/ble/hl/src/host/i2c/i2cc \
IP / BLE / HL / SRC / HOST / I2C / I2CM \
ip/ble/hl/src/host/l2c/l2cc \
ip/ble/hl/src/host/smp \
IP / BLE / HL / SRC / Host / SMP / SMPC \
ip/ble/hl/src/host/smp/smpm \
IP / ble / hl / src / rwble_hl \
IP / BLE / LL / SRC / CONTROLLER / EM \
ip/ble/ll/src/controller/llc \
ip/ble/ll/src/controller/lld \
IP / BLE / LL / SRC / CONTROLLER / LLM \
ip/ble/ll/src/hcic \
ip/ble/ll/src/rwble \
模块/ app / api \
模块/ app / src \
模块/ app / src / app_utils / app_console \
模块/ app / src / app_utils / app_multi_bond \
modules/app/src/app_utils/app_stream_queue \
模块/ app / src / app_profiles / ancc \
模块/ app / src / app_profiles / basc \
模块/ app / src / app_profiles / bass \
模块/ app / src / app_profiles / disc \
模块/ app / src / app_profiles / play \
模块/ app / src / app_profiles / findme \
模块/ app / src / app_profiles / ht \
模块/ app / src / app_profiles / ieu \
模块/ app / src / app_profiles / mpu \
模块/ app / src / app_profiles / neb \
modules/app/src/app_profiles/prox_reporter \
modules/app/src/app_profiles/pru \
模块/ app / src / app_profiles / scppc \
模块/ app / src / app_profiles / spotar \
模块/ app / src / app_profiles / stree \
modules/app/src/app_profiles/streamdatad \
modules/app/src/app_profiles/streamdatah \
modules/common/api \
modules/dbg/api \
modules/gtl/api \
模块/ gtl / src \
模块/ ke / api \
模块/ ke / src \
模块/ nvds / api \
modules/rf/api \
modules/rwip/api\
plf/refip/src/arch \
PLF / REFIP / SRC / ARCH / BOOT / RVDS \
PLF / REFIP / SRC / ARCH / COMPILER / RVDS \
PLF / REFIP / SRC / ARCH / LL / RVDS \
plf/refip/src/arch/main/ble \
PLF / REFIP / SRC / DRIVER / ACCEL \
PLF / REFIP / SRC / DRIVER / ADC \
PLF / REFIP / SRC /司机/电池\
PLF / REFIP / SRC / DRIVER / BME280 \
PLF / REFIP / SRC / DRIVER / COEX \
PLF / REFIP / SRC / DRIVER / EMI \
PLF / REFIP / SRC / DRIVER / GPIO \
plf/refip/src/driver/i2c_core \
plf/refip/src/driver/i2c_eeprom \
PLF / REFIP / SRC / DRIVER / INTC \
PLF / RECIP / SRC / DRIVER / INV \
PLF / REFIP / SRC / DRIVER / LED \
plf/refip/src/driver/pwm \
PLF / REFIP / SRC / DRIVER / RC5 \
PLF / REFIP / SRC / DRIVER / REG \
plf/refip/src/driver/spi \
PLF / RECIP / SRC / DRIVER / SPI_FLASH \
plf/refip/src/driver/spi_hci \
PLF / REFIP / SRC / DRIVER / SYSCNTL \
plf/refip/src/driver/timer \
plf/refip/src/driver/wkupct_quadec
build_dir:= $(addprefix $(build),$(模块))
obj:= $(patsubst src /%c,build /%。o,$(srcs_c))$(patsubst src /%s,build /%。o,$(srcs_s))
包括:= $(addprefix -i,$(addprefix $(src),$(headers_dir)))-i./app -i./app/system
#optimisation flags
#cflags + = -os-fplugin=tree_switch_shortcut_elf
cflags + = -os
cflags + = $(包括)
CFLAGS += -include da14580_config.h
打印-% : ;@echo $ * = $($ *)
#global configuration
rom_map_file:= ./misc/rom_symdef.txt
LDFLAGS += $(USE_NANO) $(USE_NOHOST) $(LDSCRIPTS) $(GC) $(MAP)
#不要抱怨未知属性(即Zero_Init)
CFLAGS += -Wno-attributes -Wno-unused
#Check:此标志可防止警告
#“使用2字节WCHOR_T但输出是使用4字节WCH1_T;
#使用对象的WCHAR_T值可能会失败“
#重新审视如果由于WCHAR_T字符串的预期不起作用。
LDFLAGS += -Wl,--no-wchar-size-warning
src_cfiles := $(SRCS_C)
src_sfiles:= $(srcs_s)
obj_cfiles := $(src_cfiles:.c=.o)
obj_Sfiles := $(src_Sfiles:.s=.o)
#patch objects
patch_objs := ./patch_code/obj/gapm_util.obj \
./patch_code/obj/smpc_task.obj \
/ pa。tch_code/obj/smpc.obj \
/ pa。tch_code/obj/atts_task.obj \
/ pa。tch_code/obj/ch_map.obj \
/ pa。tch_code/obj/ke_task.obj
startup_obj:= $(startup:.s = .o)
obj:= $(obj_cfiles)$(obj_sfiles)$(startup_obj)
# 目标
target_ell:= full_emb_sysram
包括常见的..
---------------------
And my common.mk
#
#makefiles使用的常见变量和谱。
#定义了以下变量:
#CC: C cross-compiler
#CPP: cross-preprocessor
#OBJCOPY: cross-objcopy
#ured_nano:链接标志选择newlib-nano
#ured_semihost:链接标志以启用半主轴
#USE_NOHOST: link flags to disable semihosting
#MAP: link flags to create a map file
#ldscripts:链接标志使用自定义链接脚本,生成$(link_script).s
#
cross_compile = ../toolschain/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-
cc = $(cross_compile)gcc
CPP = $(Cross_compile)CPP
objcopy = $(cross_compile)objcopy
#详细转换
V ?= 0
IFEQ($(v),0)
v_cc = @echo“cc”$ @;
v_cpp = @echo“cpp”$ @;
V_LINK = @echo " LINK " $@;
v_objcopy = @echo“objcpy”$ @;
v_clean = @echo“干净”;
v_sed = @echo“sed”$ @;
v_gawk = @echo“gawk”$ @;
别的
v_opt ='-v'
万一
#使用newlib-nano。要禁用它,请指定dust_nano =
USE_NANO := --specs=nano.specs
#使用半主轴
use_semihost:= --specs = rdimon.specs
use_nohost:= --specs = nosys.specs
#创建地图文件
MAP = -Wl,-Map=$(O)/lst/$(TARGET_ELF).map
ARCH_FLAGS = -MTHUMB -MCPU = Cortex-M $(Cortex_m)
#常规编译标志
cflags + = $(Arch_flags)$(startup_defs)-std = gnu99
IFEQ($(v),2)
cflags + = - 鼠标
LDFLAGS += -Wl,--verbose
万一
rom_symdef:= rom.symdef
rom_symbols:= rom.symbols
LINK_SCRIPT := 580.lds
LDSCRIPTS := -L. -T $(LINK_SCRIPT)
全部:$(o)/ $(target_elf).hex $(o)/ $(target_elf).bin
干净的:
$(v_clean)以$(obj)为文件;do rm -f $(v_opt)“$$文件”;完毕
@rm -rf $(V_OPT) $(O)
@rm -f $(V_OPT) $(ROM_SYMDEF) $(ROM_SYMBOLS) $(LINK_SCRIPT)
@rm -f $(V_OPT) $(OBJ:.o=.d)
运行:$(o)/ $(target_elf).bin
@(CD $(o)&& jlinkexe ../loadbin.txt)
$(o)/:
@mkdir -p $(V_OPT) $(O)/lst
#如何创建主ELF目标
$(o)/ $(target_elf).axf:$()/ $(rom_symbols)$(link_script)$(obj)
$(v_link)$(cc)$(cflags)$(ldflags)$(obj)$(patch_objs)-o $ @
#如何创建最终的十六进制文件
$(O)/$(TARGET_ELF).hex: $(O)/$(TARGET_ELF).axf
$(v_objcopy)$(objcopy)-o ihex $ <$ @
#如何创建最终的二进制文件
$(o)/ $(target_elf).bin:$()/ $(target_elf).axf
$(v_objcopy)$(objcopy)-o二进制$ <$ @
#如何创建链接器脚本
$(link_script):$(link_script).s
$(v_cpp)$(cpp)$(cflags)-i./app -p $ <-o $ @
#how to create a clean, sorted list of known symbols, used by ROM code
$(rom_symdef):$(rom_map_file)
$(v_sed)sed -n -e's / * / / / / g p'$ <|SED -E' / ^ [;#] / d'|\
sort | dos2unix > $@
#how to create a file with the known symbols, to be used in the linker script
$(rom_symbols):$(rom_symdef)
$(v_gawk)gawk'{printf“%s =%s; \ n”,$$ 3,$$ 1}'$ <> $ @
-include $(OBJ:.o=.d)
#如何编译c文件
%.o : %.c
$(v_cc)$(cc)$(cflags)-c $ <-o $ @
@rm -f $ *。天。*
@ $(cc)-mm $(cflags)$ *。C> $ *。D
@mv -f $ *。D $ *。D.TMP
@sed -e's |。*:| $ *。o:|'<$ *。D.TMP> $ *。D
@sed -e's /.*://'e's / \\ $$ //'<$ *。d.tmp |FMT -1 |\
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
#how to compile assembly files
%.o : %.S
$(v_cc)$(cc)$(cflags)-c $ <-o $ @
Hi cverdier,
我还编译了我的Mac上的文件,我认为甚至Ubuntu-version的工具链没有这个--fplugin = tree_switch_shortcut_elf选项(至少在我拥有的版本中)。我确信没有'tree_switch_elf'选项的编译代码将无法运行,因为该选项用于优化由Riviera波实现的FSM。一个疯狂的选项是通过启用Tree_Switch_EFP插件构建我们的ARM-None-GCC版本(在返回的ARM-Linux-GNUEABI的情况下尝试,但它将在调试和编译GCC中采用。会很快更新
Mohit Maheshwari
我设法使用GCC 4.9进行“Tree_Switch_ELF”选项for Mac,https://launchpad.net/gcc-arm-embedded/4.9。我在makefile中进行了这种变化:
#optimisation flags
cflags + = -os -ftree-switch-快捷方式
在我使用cmd-> channel_map时,在模块上没有运气,在模块上相同的崩溃,选择一个广播频道..
如果我正确理解,树切换快捷方式不再是插件,默认情况下会发生这种情况,并且现在是GCC的一个功能。该文件在GCC / GCC文件夹中也是GCC源的一部分,您可以看看
有没有机会拥有an update on this project like having a full configured working project using the radio (including Makefile & updated linker script) using GNU GCC please ?
对这一主题的任何帮助都非常感谢!
谢谢 :)
你好,
Has there been any update yet?
阅读App Note B-024似乎暗示该项目构建和作品,有人有人遇到了与GCC工具链一起使用吗?
谢谢
解决方案是使用它toolchain:
https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update.
并将-fplugin = tree_switch_shortcut_ELF更改为-Ftree-Switch-快捷方式
可能您将获得关于__weak的下一个错误,通过添加-d__weak =“__属性__((弱))”在compar中的cflags来解决。
And an error about __nop(), solve that by adding -D"__nop()"="asm(\"NOP\")"
你能确认你生成的六角文件吗?