ext: simplelink: Build files for the SimpleLink host driver and DPL.
This patch adds files to build the SimpleLink host driver and its DPL port to Zephyr. It disables the host driver build by default. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This commit is contained in:
parent
d3b7e80ab5
commit
e1f0abdba9
|
@ -1,5 +1,37 @@
|
|||
ccflags-$(CONFIG_HAS_CC3220SDK) += -D$(COMPILER)
|
||||
# Need to build prcm and utils for PRCMCC3220MCUInit, which is not in ROM
|
||||
# Need to build prcm, utils and pin, which are not in ROM
|
||||
obj-$(CONFIG_HAS_CC3220SDK) += source/ti/devices/cc32xx/driverlib/utils.o
|
||||
obj-$(CONFIG_HAS_CC3220SDK) += source/ti/devices/cc32xx/driverlib/prcm.o
|
||||
obj-$(CONFIG_HAS_CC3220SDK) += source/ti/devices/cc32xx/driverlib/pin.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/SPI.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/spi/SPICC32XXDMA.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/dma/UDMACC32XX.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/power/PowerCC32XX.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/utils/List.o
|
||||
CFLAGS_driver.o += -D__LINUX_ERRNO_EXTENSIONS__
|
||||
# driver.c warns on strict-aliasing
|
||||
CFLAGS_driver.o += -Wno-strict-aliasing
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/driver.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/device.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/flowcont.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/fs.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/netapp.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/netcfg.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/netutil.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/nonos.o
|
||||
# sl_socket warns on missing braces:
|
||||
CFLAGS_sl_socket.o += -Wno-missing-braces
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/sl_socket.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/spawn.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/wlan.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/porting/CC3220SF_LAUNCHXL.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/porting/cc_pal.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/eventreg.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/drivers/net/wifi/source/socket.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/devices/cc32xx/driverlib/timer.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += source/ti/devices/cc32xx/driverlib/udma.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += kernel/zephyr/dpl/dpl.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += kernel/zephyr/dpl/MutexP_zephyr.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += kernel/zephyr/dpl/SemaphoreP_zephyr.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += kernel/zephyr/dpl/ClockP_zephyr.o
|
||||
obj-$(CONFIG_SIMPLELINK_HOST_DRIVER) += kernel/zephyr/dpl/HwiP_zephyr.o
|
||||
|
|
|
@ -3,9 +3,15 @@
|
|||
config HAS_CC3220SDK
|
||||
bool
|
||||
|
||||
menuconfig CC3220SDK
|
||||
bool "TI CC3220 SDK support"
|
||||
# Notes:
|
||||
# SimpleLink drivers require types (stdint.h) from NEWLIB_LIBC
|
||||
# Selecting ERRNO lets host driver use Zephyr's __errno
|
||||
config SIMPLELINK_HOST_DRIVER
|
||||
bool "Build the SimpleLink WiFi Host Driver"
|
||||
default n
|
||||
depends on HAS_CC3220SDK
|
||||
depends on MULTITHREADING
|
||||
depends on NEWLIB_LIBC
|
||||
select ERRNO
|
||||
help
|
||||
Build required peripheral driverlib files from the CC3220 SDK
|
||||
Build the SimpleLink host driver
|
||||
|
|
|
@ -4,3 +4,9 @@ ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc
|
|||
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib
|
||||
KBUILD_CFLAGS += -DUSE_CC3220_ROM_DRV_API
|
||||
endif # CONFIG_HAS_CC3220SDK
|
||||
ifdef CONFIG_SIMPLELINK_HOST_DRIVER
|
||||
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/simplelink/source
|
||||
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/simplelink/kernel/zephyr/dpl
|
||||
KBUILD_CFLAGS += -DSL_SUPPORT_IPV6
|
||||
KBUILD_CFLAGS += -DSL_PLATFORM_MULTI_THREADED
|
||||
endif # CONFIG_SIMPLELINK_HOST_DRIVER
|
||||
|
|
|
@ -35,3 +35,7 @@ compiled in the Kbuild file:
|
|||
- driverlib/pin.c
|
||||
- driverlib/utils.c
|
||||
- driverlib/prcm.c
|
||||
|
||||
Setting CONFIG_SIMPLELINK_HOST_DRIVER=y builds the SimpleLink Host
|
||||
Driver, which communicates over dedicated SPI to the
|
||||
network coprocessor.
|
||||
|
|
|
@ -174,7 +174,9 @@ typedef signed int _SlFd_t;
|
|||
(Once errno has been read, the driver assumes it can be allocated to another thread).
|
||||
*/
|
||||
|
||||
/* Zephyr Port: use Zephyr's errno mechanism:
|
||||
#define SL_INC_INTERNAL_ERRNO
|
||||
*/
|
||||
|
||||
/*!
|
||||
\brief Defines whether to include extended API in SimpleLink driver
|
||||
|
@ -686,7 +688,19 @@ typedef signed int _SlFd_t;
|
|||
\warning
|
||||
*/
|
||||
#ifndef SL_INC_INTERNAL_ERRNO
|
||||
#define slcb_SetErrno
|
||||
/*
|
||||
* Zephyr Port: use Zephyr SDK's errno.h definitions, and supply those missing
|
||||
* to allow the SimpleLink driver.c to compile
|
||||
* Also, supply the external errno setter function.
|
||||
*/
|
||||
#include <errno.h>
|
||||
#define ERROR EIO
|
||||
#define INEXE EALREADY
|
||||
#define ENSOCK ENFILE
|
||||
|
||||
#include <dpl.h>
|
||||
#define slcb_SetErrno dpl_set_errno
|
||||
|
||||
#endif
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in a new issue