New make environment for new bootloader

Compatible with old bootloader. Adds an additional section with a copy
of the interrupt vector table to the end of the image. This is needed by
the new bootloader and should be ok for the old bootloader.

Note that for this to work, everybody needs python installed with
the IntelHex python package. On Linux this can be achieved with

pip install IntelHex
This commit is contained in:
Ralf Schlatterbeck 2017-08-20 20:57:17 +02:00
parent d890a492bb
commit edc7a59091
5 changed files with 37 additions and 14 deletions

View file

@ -220,12 +220,12 @@ symbols.c:
cp ${CONTIKI}/tools/empty-symbols.h symbols.h
# Generic rules for .hex, .eep and .sz (size) file:
%.$(TARGET).hex: %.$(TARGET)
%.$(TARGET)$(CUSTOM_SUFFIX).hex: %.$(TARGET)$(CUSTOM_SUFFIX)
$(OBJCOPY) -j .text -j .data -O ihex $< $@
%.$(TARGET).eep: %.$(TARGET)
%.$(TARGET)$(CUSTOM_SUFFIX).eep: %.$(TARGET)$(CUSTOM_SUFFIX)
$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex $< $@
%.$(TARGET).sz: %.$(TARGET)
%.$(TARGET)$(CUSTOM_SUFFIX).sz: %.$(TARGET)$(CUSTOM_SUFFIX)
$(ELF_SIZE) $<