From 42b7e5d83c4ff6f898dc3b09da16f3f1c8362a40 Mon Sep 17 00:00:00 2001 From: Gil Pitney Date: Thu, 27 Apr 2017 17:06:47 -0700 Subject: [PATCH] ext: simplelink: Restructure CC3220SDK as SimpleLink SDK The SimpleLink SDK actually encapsulates a family of devices, of which cc32xx is just one device. Other devices can fit under this SDK directory structure. This expansion will also allow the import of the WiFi host driver and its driver porting layer in the future, inserted at the correct levels in the SimpleLink SDK directory heirarchy. Follow the URL (ending in "#directory-structure") referenced in ext/hal/ti/simplelink/README which explains the SDK structure, and where devices fit in. Jira: ZEP-1958 Change-Id: I16515d3e3779de0d55d3b1b8e25029609d1f66c3 Signed-off-by: Gil Pitney --- .../cc3220sf_launchxl_defconfig | 2 +- ext/hal/Kbuild | 2 +- ext/hal/Kconfig | 2 +- ext/hal/Makefile | 2 +- ext/hal/README | 4 ++-- ext/hal/ti/cc3220sdk/Kbuild | 4 ---- ext/hal/ti/cc3220sdk/Makefile | 6 ------ ext/hal/ti/simplelink/Kbuild | 4 ++++ ext/hal/ti/{cc3220sdk => simplelink}/Kconfig | 0 ext/hal/ti/simplelink/Makefile | 6 ++++++ ext/hal/ti/{cc3220sdk => simplelink}/README | 18 +++++++++++------- .../source/ti/devices/cc32xx}/driverlib/cpu.h | 0 .../ti/devices/cc32xx}/driverlib/flash.h | 0 .../source/ti/devices/cc32xx}/driverlib/gpio.h | 0 .../ti/devices/cc32xx}/driverlib/interrupt.h | 0 .../source/ti/devices/cc32xx}/driverlib/pin.h | 0 .../source/ti/devices/cc32xx}/driverlib/prcm.c | 0 .../source/ti/devices/cc32xx}/driverlib/prcm.h | 0 .../source/ti/devices/cc32xx}/driverlib/rom.h | 0 .../ti/devices/cc32xx}/driverlib/rom_map.h | 0 .../ti/devices/cc32xx}/driverlib/rom_patch.h | 0 .../source/ti/devices/cc32xx}/driverlib/uart.h | 0 .../ti/devices/cc32xx}/driverlib/utils.c | 0 .../ti/devices/cc32xx}/driverlib/utils.h | 0 .../ti/devices/cc32xx}/inc/hw_apps_rcm.h | 0 .../ti/devices/cc32xx}/inc/hw_common_reg.h | 0 .../source/ti/devices/cc32xx}/inc/hw_gpio.h | 0 .../source/ti/devices/cc32xx}/inc/hw_gprcm.h | 0 .../source/ti/devices/cc32xx}/inc/hw_hib1p2.h | 0 .../source/ti/devices/cc32xx}/inc/hw_hib3p3.h | 0 .../source/ti/devices/cc32xx}/inc/hw_ints.h | 0 .../source/ti/devices/cc32xx}/inc/hw_memmap.h | 0 .../ti/devices/cc32xx}/inc/hw_ocp_shared.h | 0 .../source/ti/devices/cc32xx}/inc/hw_types.h | 0 34 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 ext/hal/ti/cc3220sdk/Kbuild delete mode 100644 ext/hal/ti/cc3220sdk/Makefile create mode 100644 ext/hal/ti/simplelink/Kbuild rename ext/hal/ti/{cc3220sdk => simplelink}/Kconfig (100%) create mode 100644 ext/hal/ti/simplelink/Makefile rename ext/hal/ti/{cc3220sdk => simplelink}/README (50%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/cpu.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/flash.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/gpio.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/interrupt.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/pin.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/prcm.c (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/prcm.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/rom.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/rom_map.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/rom_patch.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/uart.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/utils.c (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/driverlib/utils.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_apps_rcm.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_common_reg.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_gpio.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_gprcm.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_hib1p2.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_hib3p3.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_ints.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_memmap.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_ocp_shared.h (100%) rename ext/hal/ti/{cc3220sdk => simplelink/source/ti/devices/cc32xx}/inc/hw_types.h (100%) diff --git a/boards/arm/cc3220sf_launchxl/cc3220sf_launchxl_defconfig b/boards/arm/cc3220sf_launchxl/cc3220sf_launchxl_defconfig index f9a705b6a2e210..40325663744e72 100644 --- a/boards/arm/cc3220sf_launchxl/cc3220sf_launchxl_defconfig +++ b/boards/arm/cc3220sf_launchxl/cc3220sf_launchxl_defconfig @@ -21,7 +21,7 @@ CONFIG_UART_CC32XX=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable CC3220 SDK +# Enable SimpleLink CC3220 SDK CONFIG_HAS_CC3220SDK=y # Enable DTS parsing diff --git a/ext/hal/Kbuild b/ext/hal/Kbuild index 64c9dc3c0dfbb4..a402fcfdcc5901 100644 --- a/ext/hal/Kbuild +++ b/ext/hal/Kbuild @@ -2,6 +2,6 @@ obj-$(CONFIG_HAS_MCUX) += nxp/mcux/ obj-$(CONFIG_QMSI_BUILTIN) += qmsi/ obj-$(CONFIG_HAS_STM32CUBE) += st/stm32cube/ obj-$(CONFIG_HAS_CC3200SDK) += ti/cc3200sdk/ -obj-$(CONFIG_HAS_CC3220SDK) += ti/cc3220sdk/ +obj-$(CONFIG_HAS_CC3220SDK) += ti/simplelink/ obj-$(CONFIG_HAS_NORDIC_HAL) += nordic/ obj-$(CONFIG_HAS_NORDIC_DRIVERS) += nordic/drivers/ diff --git a/ext/hal/Kconfig b/ext/hal/Kconfig index 522844eb72b3b8..b9fe5917cee0df 100644 --- a/ext/hal/Kconfig +++ b/ext/hal/Kconfig @@ -24,6 +24,6 @@ source "ext/hal/st/stm32cube/Kconfig" source "ext/hal/ti/cc3200sdk/Kconfig" -source "ext/hal/ti/cc3220sdk/Kconfig" +source "ext/hal/ti/simplelink/Kconfig" endmenu diff --git a/ext/hal/Makefile b/ext/hal/Makefile index 3eb248f3cbf4ad..0bac9cc16bf90c 100644 --- a/ext/hal/Makefile +++ b/ext/hal/Makefile @@ -15,4 +15,4 @@ include $(srctree)/ext/hal/st/stm32cube/Makefile include $(srctree)/ext/hal/ti/cc3200sdk/Makefile -include $(srctree)/ext/hal/ti/cc3220sdk/Makefile +include $(srctree)/ext/hal/ti/simplelink/Makefile diff --git a/ext/hal/README b/ext/hal/README index 8fac8075d8be6f..e706a3c0d54f52 100644 --- a/ext/hal/README +++ b/ext/hal/README @@ -45,5 +45,5 @@ http://www.st.com/en/ecosystems/stm32cube.html ti ------- -Texas Instruments CC3200 SDK provides a peripheral driver library for -the SimpleLink WiFi family of SoCs. +Texas Instruments SimpleLink SDKs provide peripheral and WiFi driver libraries +for the SimpleLink family of SoCs. diff --git a/ext/hal/ti/cc3220sdk/Kbuild b/ext/hal/ti/cc3220sdk/Kbuild deleted file mode 100644 index 6298bf608cdd0b..00000000000000 --- a/ext/hal/ti/cc3220sdk/Kbuild +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-$(CONFIG_HAS_CC3220SDK) += -D$(COMPILER) -# Need to build prcm and utils for PRCMCC3220MCUInit, which is not in ROM -obj-$(CONFIG_HAS_CC3220SDK) += driverlib/utils.o -obj-$(CONFIG_HAS_CC3220SDK) += driverlib/prcm.o diff --git a/ext/hal/ti/cc3220sdk/Makefile b/ext/hal/ti/cc3220sdk/Makefile deleted file mode 100644 index 64a41fc30d3b8c..00000000000000 --- a/ext/hal/ti/cc3220sdk/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -ifdef CONFIG_HAS_CC3220SDK -ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/cc3220sdk -ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/cc3220sdk/inc -ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/cc3220sdk/driverlib -KBUILD_CFLAGS += -DUSE_CC3200_ROM_DRV_API -endif # CONFIG_HAS_CC3220SDK diff --git a/ext/hal/ti/simplelink/Kbuild b/ext/hal/ti/simplelink/Kbuild new file mode 100644 index 00000000000000..7ebc5355ee72b6 --- /dev/null +++ b/ext/hal/ti/simplelink/Kbuild @@ -0,0 +1,4 @@ +ccflags-$(CONFIG_HAS_CC3220SDK) += -D$(COMPILER) +# Need to build prcm and utils for PRCMCC3220MCUInit, which is 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 diff --git a/ext/hal/ti/cc3220sdk/Kconfig b/ext/hal/ti/simplelink/Kconfig similarity index 100% rename from ext/hal/ti/cc3220sdk/Kconfig rename to ext/hal/ti/simplelink/Kconfig diff --git a/ext/hal/ti/simplelink/Makefile b/ext/hal/ti/simplelink/Makefile new file mode 100644 index 00000000000000..6dc111fe4bc050 --- /dev/null +++ b/ext/hal/ti/simplelink/Makefile @@ -0,0 +1,6 @@ +ifdef CONFIG_HAS_CC3220SDK +ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/ti/simplelink/source/ti/devices/cc32xx +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 diff --git a/ext/hal/ti/cc3220sdk/README b/ext/hal/ti/simplelink/README similarity index 50% rename from ext/hal/ti/cc3220sdk/README rename to ext/hal/ti/simplelink/README index 669684eef2b491..7c03c85e976da7 100644 --- a/ext/hal/ti/cc3220sdk/README +++ b/ext/hal/ti/simplelink/README @@ -1,14 +1,18 @@ -The CC3220 SDK provides a peripheral driver library and hardware -register access header files for the Texas Instruments SimpleLink -CC3220S and CC3220SF SoCs. +The SimpleLink SDKs provide peripheral driver and WiFi libraries +and hardware register access header files for the Texas Instruments +SimpleLink SoCs. -The current version supported in Zephyr is CC3220 SDK 1.30.01.03, -downloaded from: +For an explanation of the SimpleLink family SDK directory structure, see: +http://dev.ti.com/tirex/content/simplelink_cc13x0_sdk_1_30_00_06/docs/simplelink_mcu_sdk/Users_Guide.html#directory-structure + +The current version supported in Zephyr is the SimpleLink CC3220 SDK +1.30.01.03, downloaded from: http://www.ti.com/tool/download/SIMPLELINK-CC3220-SDK -A subset of the files in driverlib/ and inc/ are copied from a -Linux CC3220 SDK installation without modification. +A subset of the files in the source/ti/devices/cc32xx/driverlib/ and inc/ +directories are copied from a Linux CC3220 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. diff --git a/ext/hal/ti/cc3220sdk/driverlib/cpu.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/cpu.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/cpu.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/cpu.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/flash.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/flash.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/flash.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/flash.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/gpio.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/gpio.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/gpio.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/gpio.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/interrupt.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/interrupt.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/interrupt.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/interrupt.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/pin.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/pin.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/pin.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/pin.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/prcm.c b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/prcm.c similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/prcm.c rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/prcm.c diff --git a/ext/hal/ti/cc3220sdk/driverlib/prcm.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/prcm.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/prcm.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/prcm.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/rom.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/rom.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/rom.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/rom.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/rom_map.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/rom_map.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/rom_map.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/rom_map.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/rom_patch.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/rom_patch.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/rom_patch.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/rom_patch.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/uart.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/uart.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/uart.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/uart.h diff --git a/ext/hal/ti/cc3220sdk/driverlib/utils.c b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/utils.c similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/utils.c rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/utils.c diff --git a/ext/hal/ti/cc3220sdk/driverlib/utils.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/utils.h similarity index 100% rename from ext/hal/ti/cc3220sdk/driverlib/utils.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/driverlib/utils.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_apps_rcm.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_apps_rcm.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_apps_rcm.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_apps_rcm.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_common_reg.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_common_reg.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_common_reg.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_common_reg.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_gpio.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_gpio.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_gpio.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_gpio.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_gprcm.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_gprcm.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_gprcm.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_gprcm.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_hib1p2.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_hib1p2.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_hib1p2.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_hib1p2.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_hib3p3.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_hib3p3.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_hib3p3.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_hib3p3.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_ints.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_ints.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_ints.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_ints.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_memmap.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_memmap.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_memmap.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_memmap.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_ocp_shared.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_ocp_shared.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_ocp_shared.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_ocp_shared.h diff --git a/ext/hal/ti/cc3220sdk/inc/hw_types.h b/ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_types.h similarity index 100% rename from ext/hal/ti/cc3220sdk/inc/hw_types.h rename to ext/hal/ti/simplelink/source/ti/devices/cc32xx/inc/hw_types.h