zephyr/ext/hal/ti/simplelink
Vincent Wan ec33d24017 ext: simplelink: add workarounds when using POSIX headers
Adding additional workarounds to cc_pal.h that are necessary due to the
fact that the POSIX subsys does not integrate well with other parts of
Zephyr, as per discussion in #13444. These workarounds are needed when
fcntl.h is included, to avoid symbols from being redefined in POSIX
headers. They disable some POSIX headers and define what is necessary
for the code to compile.

We should aim to remove these when the integration story has improved.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-20 11:36:18 -05:00
..
kernel/zephyr/dpl all: Update reserved function names 2019-03-11 13:48:42 -04:00
source/ti ext: simplelink: add workarounds when using POSIX headers 2019-03-20 11:36:18 -05:00
CMakeLists.txt ext: simplelink: Remove build warnings 2019-03-05 11:37:10 -05:00
Kconfig ext: simplelink: Add posix api and pthread support to Kconfig 2019-03-05 11:37:10 -05:00
README ext: simplelink: Update the README 2019-03-05 11:37:10 -05:00

The SimpleLink SDKs provide peripheral driver and WiFi libraries
and hardware register access header files for the Texas Instruments
SimpleLink SoCs.

For an explanation of the SimpleLink family SDK directory structure, see:
http://dev.ti.com/tirex/content/simplelink_cc32xx_sdk_2_40_01_01/docs/simplelink_mcu_sdk/Users_Guide.html#directory-structure

1. CC32xx SDK

The current version supported in Zephyr is the SimpleLink CC32xx SDK
2.40.01.01, downloaded from:

	http://www.ti.com/tool/download/simplelink-cc32xx-sdk

Source files from select subdirectories are copied from the
source/ti/ subdirectory of the SDK installation, as follows:

	EXT_DIR=$ZEPHYR_BASE/ext/hal/ti/simplelink/source/ti
	find devices -not -path '*/\.*' -name '*.[c|h]' | \
		cpio -pdm $EXT_DIR
	find drivers -name '*.[c|h]' | \
		cpio -pdm $EXT_DIR
	find net -maxdepth 1 -name '*.[c|h]' | cpio -pdm $EXT_DIR
	cd $EXT_DIR
	find . -name '*.[c|h]' -exec chmod 664 {} \;

In addition, some files in the drivers/net/wifi/porting directory
may need to be updated: notably user.h, cc_pal.h, and CC3220SF_LAUNCHXL.c.

Note: TI provides the driver library functions burned into ROM at the factory,
or updated via a service pack patch, thus saving application code space.

Calling driverlib APIs prefixed by "MAP_" will vector to those functions
already existing in ROM.

After setting CONFIG_HAS_CC3220SDK=y in Kconfig, most of the
peripheral driver library functions will be accessible from ROM,
except for some functions in the following modules, which are
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.

2. MSP432 SDK

The current version supported in Zephyr is MSP432 SDK V1.50.00.12, downloaded
from:

        http://www.ti.com/tool/simplelink-msp432-sdk

Files in source/ti/devices/msp432p4xx/driverlib/ and inc/ are copied from
a Linux SDK installation (without modification).

TI provides the driver library functions burned into ROM at the factory,
or updated via a service pack patch, thus saving application code space.

Calling driverlib APIs prefixed by "MAP_" will vector to those functions
already existing in ROM.

After setting CONFIG_HAS_MSP432P4XXSDK=y in Kconfig, most of the
peripheral driver library functions will be accessible from ROM.