2013-10-29 13:14:35 +00:00
|
|
|
ifndef SOURCE_LDSCRIPT
|
|
|
|
SOURCE_LDSCRIPT = $(CONTIKI_CPU)/cc2538.lds
|
|
|
|
endif
|
2013-01-12 22:44:42 +00:00
|
|
|
LDSCRIPT = $(OBJECTDIR)/cc2538.ld
|
|
|
|
|
2017-11-26 21:15:05 +00:00
|
|
|
CFLAGS += -DCMSIS_DEV_HDR=\"cc2538_cm3.h\"
|
2013-01-12 22:44:42 +00:00
|
|
|
|
|
|
|
### If the user-specified a Node ID, pass a define
|
|
|
|
ifdef NODEID
|
|
|
|
CFLAGS += -DIEEE_ADDR_NODE_ID=$(NODEID)
|
|
|
|
endif
|
|
|
|
|
|
|
|
### CPU-dependent directories
|
2017-11-26 21:15:05 +00:00
|
|
|
CONTIKI_CPU_DIRS = . dev usb usb/common usb/common/cdc-acm
|
2013-01-12 22:44:42 +00:00
|
|
|
|
|
|
|
### CPU-dependent source files
|
2016-06-11 21:15:22 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += soc.c clock.c rtimer-arch.c uart.c watchdog.c
|
2018-03-02 19:27:17 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += nvic.c sys-ctrl.c gpio.c ioc.c spi-legacy.c adc.c
|
2018-03-02 19:58:20 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += spi-arch.c
|
2016-01-02 03:20:16 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += crypto.c aes.c ecb.c cbc.c ctr.c cbc-mac.c gcm.c
|
2017-12-17 03:21:13 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += ccm.c sha256.c gpio-hal-arch.c
|
2015-12-25 23:42:39 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += cc2538-aes-128.c cc2538-ccm-star.c
|
2017-11-22 22:51:25 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += cc2538-rf.c udma.c lpm.c int-master.c
|
2015-10-18 18:14:17 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += pka.c bignum-driver.c ecc-driver.c ecc-algorithm.c
|
|
|
|
CONTIKI_CPU_SOURCEFILES += ecc-curve.c
|
2013-01-12 22:44:42 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += dbg.c ieee-addr.c
|
|
|
|
CONTIKI_CPU_SOURCEFILES += slip-arch.c slip.c
|
2015-02-11 16:54:56 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += i2c.c cc2538-temp-sensor.c vdd3-sensor.c
|
2015-11-25 22:44:54 +00:00
|
|
|
CONTIKI_CPU_SOURCEFILES += cfs-coffee.c cfs-coffee-arch.c pwm.c
|
2013-01-12 22:44:42 +00:00
|
|
|
|
2017-10-08 22:47:11 +00:00
|
|
|
USB_SOURCEFILES += usb-core.c cdc-acm.c usb-arch.c usb-serial.c cdc-acm-descriptors.c
|
2013-01-12 22:44:42 +00:00
|
|
|
|
2017-11-26 21:15:05 +00:00
|
|
|
CPU_START_SOURCEFILES = startup-gcc.c
|
2015-02-09 15:23:36 +00:00
|
|
|
|
2018-03-24 21:25:04 +00:00
|
|
|
CONTIKI_SOURCEFILES += $(CONTIKI_CPU_SOURCEFILES) $(USB_SOURCEFILES)
|
2013-01-12 22:44:42 +00:00
|
|
|
|
|
|
|
### Always re-build ieee-addr.o in case the command line passes a new NODEID
|
|
|
|
FORCE:
|
|
|
|
|
2013-06-20 22:45:41 +00:00
|
|
|
$(OBJECTDIR)/ieee-addr.o: ieee-addr.c FORCE | $(OBJECTDIR)
|
2013-08-06 15:46:57 +00:00
|
|
|
$(TRACE_CC)
|
|
|
|
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
2013-01-12 22:44:42 +00:00
|
|
|
|
|
|
|
### This rule is used to generate the correct linker script
|
2016-05-29 21:05:17 +00:00
|
|
|
LDGENFLAGS += $(CFLAGS)
|
2015-06-18 20:31:53 +00:00
|
|
|
LDGENFLAGS += -imacros "contiki-conf.h" -imacros "dev/cc2538-dev.h"
|
2015-07-12 19:48:18 +00:00
|
|
|
LDGENFLAGS += -imacros "dev/flash.h" -imacros "cfs-coffee-arch.h"
|
2013-08-06 15:46:57 +00:00
|
|
|
LDGENFLAGS += -x c -P -E
|
2013-01-12 22:44:42 +00:00
|
|
|
|
2013-06-20 22:45:41 +00:00
|
|
|
# NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR)
|
2013-10-29 13:14:35 +00:00
|
|
|
$(LDSCRIPT): $(SOURCE_LDSCRIPT) FORCE | $(OBJECTDIR)
|
2013-08-06 15:46:57 +00:00
|
|
|
$(TRACE_CC)
|
2016-07-23 21:39:56 +00:00
|
|
|
$(Q)$(CC) $(LDGENFLAGS) $< | grep -v '^\s*#\s*pragma\>' > $@
|
2017-11-26 21:15:05 +00:00
|
|
|
|
2018-11-23 09:35:41 +00:00
|
|
|
include $(ARCH_PATH)/cpu/arm/cortex-m/cm3/Makefile.cm3
|