mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
4181179985
This patch adds support for IO pinmuxing and GPIO on first generation Intel Galileo boards.
44 lines
1.3 KiB
Makefile
44 lines
1.3 KiB
Makefile
BSP_PATH=$(CONTIKI)/platform/galileo/bsp
|
|
LIBC_PATH=$(BSP_PATH)/libc
|
|
LIBC=$(LIBC_PATH)/i586-elf
|
|
LIBGCC_PATH = /usr/lib/gcc/$(shell gcc -dumpmachine)/$(shell gcc -dumpversion)
|
|
|
|
CONTIKI_TARGET_DIRS = . core/sys/ drivers/ net/
|
|
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
|
CONTIKI_SOURCEFILES += contiki-main.c clock.c rtimer-arch.c eth-proc.c eth-conf.c galileo-gpio.c
|
|
|
|
GALILEO_GEN ?= 2
|
|
CFLAGS += -DGALILEO_GEN=$(GALILEO_GEN)
|
|
CONTIKI_SOURCEFILES += galileo-gen$(GALILEO_GEN)-pinmux.c
|
|
|
|
ifeq ($(GALILEO_GEN),2)
|
|
CONTIKI_SOURCEFILES += gpio-pcal9535a.c pwm-pca9685.c
|
|
else
|
|
CONTIKI_SOURCEFILES += cy8c9540a.c
|
|
endif
|
|
|
|
ifeq ($(CONTIKI_WITH_IPV6),1)
|
|
CONTIKI_SOURCEFILES += nbr-table.c packetbuf.c linkaddr.c link-stats.c
|
|
endif
|
|
|
|
PROJECT_SOURCEFILES += newlib-syscalls.c
|
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
|
include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000
|
|
|
|
CFLAGS += -fno-stack-protector -I$(LIBC)/include
|
|
ifeq (clang,$(findstring clang,$(CC)))
|
|
CFLAGS += -nostdlibinc
|
|
else
|
|
CFLAGS += -nostdinc -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed
|
|
endif
|
|
LDFLAGS += -nostdlib -L$(LIBC)/lib -L$(LIBGCC_PATH)/32
|
|
|
|
TARGET_LIBFILES += -lm -lc -lgcc
|
|
|
|
-include $(LIBC_PATH)/Makefile.libc
|
|
|
|
ifndef BUILT_LIBC
|
|
$(error Build the C library by executing $(LIBC_PATH)/build_newlib.sh)
|
|
endif
|