From 69c4f1933645c8bbaaeaddf52460b018277d8cf0 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sun, 10 May 2015 16:20:20 +0100 Subject: [PATCH] Produce ihex files usable with TI's Flash Programmer --- cpu/cc26xx/Makefile.cc26xx | 6 +++++- platform/srf06-cc26xx/README.md | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu/cc26xx/Makefile.cc26xx b/cpu/cc26xx/Makefile.cc26xx index a339bd9f1..f8bf8de9f 100644 --- a/cpu/cc26xx/Makefile.cc26xx +++ b/cpu/cc26xx/Makefile.cc26xx @@ -6,6 +6,7 @@ OBJCOPY = arm-none-eabi-objcopy OBJDUMP = arm-none-eabi-objdump NM = arm-none-eabi-nm SIZE = arm-none-eabi-size +SREC_CAT = srec_cat ### TI CC26xxware out-of-tree ### TI_CC26XXWARE is the home directory of the cc26xxware @@ -106,9 +107,12 @@ CUSTOM_RULE_LINK=1 $(TRACE_LD) $(Q)$(LD) $(LDFLAGS) ${filter-out $(LDSCRIPT) %.a,$^} ${filter %.a,$^} $(TARGET_LIBFILES) -lm -o $@ -%.hex: %.elf +%.i16hex: %.elf $(OBJCOPY) -O ihex $< $@ +%.hex: %.i16hex + $(SREC_CAT) $< -intel -o $@ -intel + %.bin: %.elf $(OBJCOPY) $(OBJCOPY_FLAGS) $< $@ diff --git a/platform/srf06-cc26xx/README.md b/platform/srf06-cc26xx/README.md index 8256d63f1..7d07fb501 100644 --- a/platform/srf06-cc26xx/README.md +++ b/platform/srf06-cc26xx/README.md @@ -69,6 +69,7 @@ To use the port you need: [...] gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278] (GNU Tools for ARM Embedded Processors) +* srecord (http://srecord.sourceforge.net/) * You may also need other drivers so that the SmartRF can communicate with your operating system and so that you can use the chip's UART for I/O. Please read the section ["Drivers" in the CC2538DK readme](https://github.com/contiki-os/contiki/tree/master/platform/cc2538dk#drivers).