Adds sreg concat

pull/337/head
Juan Carlos Ferrer 2014-06-02 22:33:00 -05:00
parent 7716e927b9
commit 1624a5f2b6
1 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,7 @@ INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %}
LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %}
LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %}
LINKER_SCRIPT = {{linker_script}}
SOFTDEVICE = mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_NRF51822/Lib/s110_nrf51822_6_0_0/s110_nrf51822_6.0.0_softdevice.hex
###############################################################################
AS = $(GCC_BIN)arm-none-eabi-as
@ -16,6 +17,7 @@ CC = $(GCC_BIN)arm-none-eabi-gcc
CPP = $(GCC_BIN)arm-none-eabi-g++
LD = $(GCC_BIN)arm-none-eabi-gcc
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
SREC_CAT = srec_cat
CPU = -mcpu=cortex-m0 -mthumb
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
@ -30,7 +32,7 @@ else
CC_FLAGS += -DNDEBUG -Os
endif
all: $(PROJECT).hex
all: $(PROJECT).hex merge
clean:
rm -f $(PROJECT).hex $(PROJECT).elf $(OBJECTS)
@ -50,3 +52,6 @@ $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
$(PROJECT).hex: $(PROJECT).elf
$(OBJCOPY) -O ihex $< $@
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -binary --offset 0x14000 -o combined.hex -intel --line-length=46