mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-09 23:54:32 +00:00
Merge pull request #413 from ADVANSEE/cc2538-build
cc2538: Various build improvements
This commit is contained in:
commit
f87e4df936
@ -5,6 +5,9 @@ AR = arm-none-eabi-ar
|
|||||||
OBJCOPY = arm-none-eabi-objcopy
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
NM = arm-none-eabi-nm
|
NM = arm-none-eabi-nm
|
||||||
|
|
||||||
|
ifndef SOURCE_LDSCRIPT
|
||||||
|
SOURCE_LDSCRIPT = $(CONTIKI_CPU)/cc2538.lds
|
||||||
|
endif
|
||||||
LDSCRIPT = $(OBJECTDIR)/cc2538.ld
|
LDSCRIPT = $(OBJECTDIR)/cc2538.ld
|
||||||
|
|
||||||
CFLAGS += -O2 -mcpu=cortex-m3 -mthumb -mlittle-endian
|
CFLAGS += -O2 -mcpu=cortex-m3 -mthumb -mlittle-endian
|
||||||
@ -27,7 +30,7 @@ ifdef NODEID
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
### CPU-dependent cleanup files
|
### CPU-dependent cleanup files
|
||||||
CLEAN += symbols.c symbols.h *.d *.elf
|
CLEAN += symbols.c symbols.h *.d *.elf *.hex
|
||||||
|
|
||||||
### CPU-dependent directories
|
### CPU-dependent directories
|
||||||
CONTIKI_CPU_DIRS = . dev usb
|
CONTIKI_CPU_DIRS = . dev usb
|
||||||
@ -54,7 +57,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_CPU_SOURCEFILES) $(DEBUG_IO_SOURCEFILES)
|
|||||||
CONTIKI_SOURCEFILES += $(USB_CORE_SOURCEFILES) $(USB_ARCH_SOURCEFILES)
|
CONTIKI_SOURCEFILES += $(USB_CORE_SOURCEFILES) $(USB_ARCH_SOURCEFILES)
|
||||||
|
|
||||||
### Don't treat the .elf as intermediate
|
### Don't treat the .elf as intermediate
|
||||||
.PRECIOUS: %.elf %.bin
|
.PRECIOUS: %.elf %.hex %.bin
|
||||||
|
|
||||||
### Always re-build ieee-addr.o in case the command line passes a new NODEID
|
### Always re-build ieee-addr.o in case the command line passes a new NODEID
|
||||||
FORCE:
|
FORCE:
|
||||||
@ -70,12 +73,15 @@ CUSTOM_RULE_LINK=1
|
|||||||
$(TRACE_LD)
|
$(TRACE_LD)
|
||||||
$(Q)$(LD) $(LDFLAGS) ${filter-out $(LDSCRIPT) %.a,$^} ${filter %.a,$^} -o $@
|
$(Q)$(LD) $(LDFLAGS) ${filter-out $(LDSCRIPT) %.a,$^} ${filter %.a,$^} -o $@
|
||||||
|
|
||||||
|
%.hex: %.elf
|
||||||
|
$(OBJCOPY) -O ihex $< $@
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(OBJCOPY) $(OBJCOPY_FLAGS) $< $@
|
$(OBJCOPY) $(OBJCOPY_FLAGS) $< $@
|
||||||
|
|
||||||
### We don't really need the .bin for the .$(TARGET) but let's make sure it
|
### We don't really need the .hex and .bin for the .$(TARGET) but let's make
|
||||||
### gets built
|
### sure they get built
|
||||||
%.$(TARGET): %.elf %.bin
|
%.$(TARGET): %.elf %.hex %.bin
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
### This rule is used to generate the correct linker script
|
### This rule is used to generate the correct linker script
|
||||||
@ -85,6 +91,6 @@ LDGENFLAGS += -imacros "contiki-conf.h"
|
|||||||
LDGENFLAGS += -x c -P -E
|
LDGENFLAGS += -x c -P -E
|
||||||
|
|
||||||
# NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR)
|
# NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR)
|
||||||
$(LDSCRIPT): $(CONTIKI_CPU)/cc2538.lds FORCE | $(OBJECTDIR)
|
$(LDSCRIPT): $(SOURCE_LDSCRIPT) FORCE | $(OBJECTDIR)
|
||||||
$(TRACE_CC)
|
$(TRACE_CC)
|
||||||
$(Q)$(CC) $(LDGENFLAGS) $< -o $@
|
$(Q)$(CC) $(LDGENFLAGS) $< -o $@
|
||||||
|
@ -318,7 +318,9 @@ typedef uint32_t rtimer_clock_t;
|
|||||||
#ifndef UIP_CONF_TCP
|
#ifndef UIP_CONF_TCP
|
||||||
#define UIP_CONF_TCP 1
|
#define UIP_CONF_TCP 1
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef UIP_CONF_TCP_MSS
|
||||||
#define UIP_CONF_TCP_MSS 64
|
#define UIP_CONF_TCP_MSS 64
|
||||||
|
#endif
|
||||||
#define UIP_CONF_UDP 1
|
#define UIP_CONF_UDP 1
|
||||||
#define UIP_CONF_UDP_CHECKSUMS 1
|
#define UIP_CONF_UDP_CHECKSUMS 1
|
||||||
#define UIP_CONF_ICMP6 1
|
#define UIP_CONF_ICMP6 1
|
||||||
|
Loading…
Reference in New Issue
Block a user