From 5ca1f5f9d958d2222e439ca6a34cb8f014ce98d3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 21 Feb 2015 19:55:57 +0000 Subject: [PATCH] cc3200: Get compiling with CC3100 driver from drivers/ directory. --- cc3200/application.mk | 25 ++++++++++++++----------- cc3200/bootmgr/bootloader.mk | 29 ++++++++++++++++------------- drivers/cc3100/inc/simplelink.h | 6 +++--- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/cc3200/application.mk b/cc3200/application.mk index 25139ecf7f..78c50b4990 100644 --- a/cc3200/application.mk +++ b/cc3200/application.mk @@ -10,8 +10,8 @@ APP_INC += -Ihal APP_INC += -Ihal/inc APP_INC += -Imisc APP_INC += -Imods +APP_INC += -I../drivers/cc3100/inc APP_INC += -Isimplelink -APP_INC += -Isimplelink/include APP_INC += -Isimplelink/oslib APP_INC += -Itelnet APP_INC += -Iutil @@ -98,15 +98,18 @@ APP_MODS_SRC_C = $(addprefix mods/,\ pybuart.c \ ) +APP_CC3100_SRC_C = $(addprefix drivers/cc3100/src/,\ + device.c \ + driver.c \ + flowcont.c \ + fs.c \ + netapp.c \ + netcfg.c \ + socket.c \ + wlan.c \ + ) + APP_SL_SRC_C = $(addprefix simplelink/,\ - source/device.c \ - source/driver.c \ - source/flowcont.c \ - source/fs.c \ - source/netapp.c \ - source/netcfg.c \ - source/socket.c \ - source/wlan.c \ oslib/osi_freertos.c \ cc_pal.c \ ) @@ -151,7 +154,7 @@ APP_STM_SRC_C = $(addprefix stmhal/,\ ) OBJ = $(PY_O) $(addprefix $(BUILD)/, $(APP_FATFS_SRC_C:.c=.o) $(APP_RTOS_SRC_C:.c=.o) $(APP_FTP_SRC_C:.c=.o) $(APP_HAL_SRC_C:.c=.o) $(APP_MISC_SRC_C:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(APP_MODS_SRC_C:.c=.o) $(APP_SL_SRC_C:.c=.o) $(APP_TELNET_SRC_C:.c=.o) $(APP_UTIL_SRC_C:.c=.o) $(APP_UTIL_SRC_S:.s=.o)) +OBJ += $(addprefix $(BUILD)/, $(APP_MODS_SRC_C:.c=.o) $(APP_CC3100_SRC_C:.c=.o) $(APP_SL_SRC_C:.c=.o) $(APP_TELNET_SRC_C:.c=.o) $(APP_UTIL_SRC_C:.c=.o) $(APP_UTIL_SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(APP_MAIN_SRC_C:.c=.o) $(APP_LIB_SRC_C:.c=.o) $(APP_STM_SRC_C:.c=.o)) OBJ += $(BUILD)/pins.o @@ -163,7 +166,7 @@ LDFLAGS += -T $(LINKER_SCRIPT) CFLAGS += $(APP_CPPDEFINES) $(APP_INC) # Disable strict aliasing for the simplelink driver -$(BUILD)/simplelink/source/driver.o: CFLAGS += -fno-strict-aliasing +$(BUILD)/drivers/cc3100/src/driver.o: CFLAGS += -fno-strict-aliasing # Check if we would like to debug the port code ifeq ($(BTYPE), release) diff --git a/cc3200/bootmgr/bootloader.mk b/cc3200/bootmgr/bootloader.mk index b3e12c14bb..51eebafad0 100644 --- a/cc3200/bootmgr/bootloader.mk +++ b/cc3200/bootmgr/bootloader.mk @@ -4,8 +4,8 @@ BOOT_INC = -Ibootmgr BOOT_INC += -Ibootmgr/sl BOOT_INC += -Ihal BOOT_INC += -Ihal/inc +BOOT_INC += -I../drivers/cc3100/inc BOOT_INC += -Isimplelink -BOOT_INC += -Isimplelink/include BOOT_INC += -Isimplelink/oslib BOOT_INC += -Iutil BOOT_INC += -I.. @@ -25,17 +25,20 @@ BOOT_HAL_SRC_C = $(addprefix hal/,\ utils.c \ ) +BOOT_CC3100_SRC_C = $(addprefix drivers/cc3100/,\ + src/device.c \ + src/driver.c \ + src/flowcont.c \ + src/fs.c \ + src/netapp.c \ + src/netcfg.c \ + src/nonos.c \ + src/socket.c \ + src/spawn.c \ + src/wlan.c \ + ) + BOOT_SL_SRC_C = $(addprefix simplelink/,\ - source/device.c \ - source/driver.c \ - source/flowcont.c \ - source/fs.c \ - source/netapp.c \ - source/netcfg.c \ - source/nonos.c \ - source/socket.c \ - source/spawn.c \ - source/wlan.c \ cc_pal.c \ ) @@ -59,7 +62,7 @@ BOOT_STM_SRC_C = $(addprefix stmhal/,\ string0.c \ ) -OBJ = $(addprefix $(BUILD)/, $(BOOT_HAL_SRC_C:.c=.o) $(BOOT_SL_SRC_C:.c=.o) $(BOOT_UTIL_SRC_C:.c=.o) $(BOOT_MAIN_SRC_C:.c=.o)) +OBJ = $(addprefix $(BUILD)/, $(BOOT_HAL_SRC_C:.c=.o) $(BOOT_SL_SRC_C:.c=.o) $(BOOT_CC3100_SRC_C:.c=.o) $(BOOT_UTIL_SRC_C:.c=.o) $(BOOT_MAIN_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(BOOT_MAIN_SRC_S:.s=.o) $(BOOT_PY_SRC_C:.c=.o) $(BOOT_STM_SRC_C:.c=.o)) # Add the linker script @@ -73,7 +76,7 @@ CFLAGS += $(BOOT_CPPDEFINES) $(BOOT_INC) # Disable strict aliasing for the simplelink driver -$(BUILD)/simplelink/source/driver.o: CFLAGS += -fno-strict-aliasing +$(BUILD)/drivers/cc3100/src/driver.o: CFLAGS += -fno-strict-aliasing # Check if we would like to debug the port code ifeq ($(BTYPE), release) diff --git a/drivers/cc3100/inc/simplelink.h b/drivers/cc3100/inc/simplelink.h index 412d6242cb..67db6f36bc 100644 --- a/drivers/cc3100/inc/simplelink.h +++ b/drivers/cc3100/inc/simplelink.h @@ -367,9 +367,9 @@ typedef _i16 _SlReturnVal_t; /*****************************************************************************/ #ifdef SL_PLATFORM_MULTI_THREADED - #include "../source/spawn.h" + #include "spawn.h" #else - #include "../source/nonos.h" + #include "nonos.h" #endif @@ -378,7 +378,7 @@ typedef _i16 _SlReturnVal_t; objInclusion.h must be the last arrangement just before including the API header files since it based on the other configurations to decide which object should be included */ -#include "../source/objInclusion.h" +#include "objInclusion.h" #include "trace.h" #include "fs.h" #include "socket.h"