Skip to content

Commit 5ca1f5f

Browse files
committed
cc3200: Get compiling with CC3100 driver from drivers/ directory.
1 parent 49c2ad4 commit 5ca1f5f

3 files changed

Lines changed: 33 additions & 27 deletions

File tree

cc3200/application.mk

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ APP_INC += -Ihal
1010
APP_INC += -Ihal/inc
1111
APP_INC += -Imisc
1212
APP_INC += -Imods
13+
APP_INC += -I../drivers/cc3100/inc
1314
APP_INC += -Isimplelink
14-
APP_INC += -Isimplelink/include
1515
APP_INC += -Isimplelink/oslib
1616
APP_INC += -Itelnet
1717
APP_INC += -Iutil
@@ -98,15 +98,18 @@ APP_MODS_SRC_C = $(addprefix mods/,\
9898
pybuart.c \
9999
)
100100

101+
APP_CC3100_SRC_C = $(addprefix drivers/cc3100/src/,\
102+
device.c \
103+
driver.c \
104+
flowcont.c \
105+
fs.c \
106+
netapp.c \
107+
netcfg.c \
108+
socket.c \
109+
wlan.c \
110+
)
111+
101112
APP_SL_SRC_C = $(addprefix simplelink/,\
102-
source/device.c \
103-
source/driver.c \
104-
source/flowcont.c \
105-
source/fs.c \
106-
source/netapp.c \
107-
source/netcfg.c \
108-
source/socket.c \
109-
source/wlan.c \
110113
oslib/osi_freertos.c \
111114
cc_pal.c \
112115
)
@@ -151,7 +154,7 @@ APP_STM_SRC_C = $(addprefix stmhal/,\
151154
)
152155

153156
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))
154-
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))
157+
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))
155158
OBJ += $(addprefix $(BUILD)/, $(APP_MAIN_SRC_C:.c=.o) $(APP_LIB_SRC_C:.c=.o) $(APP_STM_SRC_C:.c=.o))
156159
OBJ += $(BUILD)/pins.o
157160

@@ -163,7 +166,7 @@ LDFLAGS += -T $(LINKER_SCRIPT)
163166
CFLAGS += $(APP_CPPDEFINES) $(APP_INC)
164167

165168
# Disable strict aliasing for the simplelink driver
166-
$(BUILD)/simplelink/source/driver.o: CFLAGS += -fno-strict-aliasing
169+
$(BUILD)/drivers/cc3100/src/driver.o: CFLAGS += -fno-strict-aliasing
167170

168171
# Check if we would like to debug the port code
169172
ifeq ($(BTYPE), release)

cc3200/bootmgr/bootloader.mk

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ BOOT_INC = -Ibootmgr
44
BOOT_INC += -Ibootmgr/sl
55
BOOT_INC += -Ihal
66
BOOT_INC += -Ihal/inc
7+
BOOT_INC += -I../drivers/cc3100/inc
78
BOOT_INC += -Isimplelink
8-
BOOT_INC += -Isimplelink/include
99
BOOT_INC += -Isimplelink/oslib
1010
BOOT_INC += -Iutil
1111
BOOT_INC += -I..
@@ -25,17 +25,20 @@ BOOT_HAL_SRC_C = $(addprefix hal/,\
2525
utils.c \
2626
)
2727

28+
BOOT_CC3100_SRC_C = $(addprefix drivers/cc3100/,\
29+
src/device.c \
30+
src/driver.c \
31+
src/flowcont.c \
32+
src/fs.c \
33+
src/netapp.c \
34+
src/netcfg.c \
35+
src/nonos.c \
36+
src/socket.c \
37+
src/spawn.c \
38+
src/wlan.c \
39+
)
40+
2841
BOOT_SL_SRC_C = $(addprefix simplelink/,\
29-
source/device.c \
30-
source/driver.c \
31-
source/flowcont.c \
32-
source/fs.c \
33-
source/netapp.c \
34-
source/netcfg.c \
35-
source/nonos.c \
36-
source/socket.c \
37-
source/spawn.c \
38-
source/wlan.c \
3942
cc_pal.c \
4043
)
4144

@@ -59,7 +62,7 @@ BOOT_STM_SRC_C = $(addprefix stmhal/,\
5962
string0.c \
6063
)
6164

62-
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))
65+
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))
6366
OBJ += $(addprefix $(BUILD)/, $(BOOT_MAIN_SRC_S:.s=.o) $(BOOT_PY_SRC_C:.c=.o) $(BOOT_STM_SRC_C:.c=.o))
6467

6568
# Add the linker script
@@ -73,7 +76,7 @@ CFLAGS += $(BOOT_CPPDEFINES) $(BOOT_INC)
7376

7477

7578
# Disable strict aliasing for the simplelink driver
76-
$(BUILD)/simplelink/source/driver.o: CFLAGS += -fno-strict-aliasing
79+
$(BUILD)/drivers/cc3100/src/driver.o: CFLAGS += -fno-strict-aliasing
7780

7881
# Check if we would like to debug the port code
7982
ifeq ($(BTYPE), release)

drivers/cc3100/inc/simplelink.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ typedef _i16 _SlReturnVal_t;
367367
/*****************************************************************************/
368368

369369
#ifdef SL_PLATFORM_MULTI_THREADED
370-
#include "../source/spawn.h"
370+
#include "spawn.h"
371371
#else
372-
#include "../source/nonos.h"
372+
#include "nonos.h"
373373
#endif
374374

375375

@@ -378,7 +378,7 @@ typedef _i16 _SlReturnVal_t;
378378
objInclusion.h must be the last arrangement just before including the API header files
379379
since it based on the other configurations to decide which object should be included
380380
*/
381-
#include "../source/objInclusion.h"
381+
#include "objInclusion.h"
382382
#include "trace.h"
383383
#include "fs.h"
384384
#include "socket.h"

0 commit comments

Comments
 (0)