diff --git a/CODEOWNERS b/CODEOWNERS index 87711a4af5b..20614bbf58a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -41,6 +41,7 @@ boards/arm/frdm_k64f/* @MaureenHelm boards/arm/frdm_kw41z/* @MaureenHelm boards/arm/hexiwear_k64/* @MaureenHelm boards/arm/mps2_an385/* @fvincenzo +boards/arm/msp_exp432p401r_launchxl/* @Mani-Sadhasivam boards/arm/nrf51_blenano/* @rsalveti boards/arm/nrf52_pca10040/* @carlescufi boards/arm/nucleo_f401re/* @rsalveti @idlethread diff --git a/boards/arm/msp_exp432p401r_launchxl/Kconfig b/boards/arm/msp_exp432p401r_launchxl/Kconfig new file mode 100644 index 00000000000..a4d456604cf --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/Kconfig @@ -0,0 +1,6 @@ +# Kconfig - TI MSP-EXP432P401R LaunchXL configuration +# + +if BOARD_MSP_EXP432P401R_LAUNCHXL + +endif # BOARD_MSP_EXP432P401R_LAUNCHXL diff --git a/boards/arm/msp_exp432p401r_launchxl/Kconfig.board b/boards/arm/msp_exp432p401r_launchxl/Kconfig.board new file mode 100644 index 00000000000..ca651fcd143 --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/Kconfig.board @@ -0,0 +1,6 @@ +# Kconfig - TI SimpleLink MSP-EXP432P401R LaunchXL Development Board +# + +config BOARD_MSP_EXP432P401R_LAUNCHXL + bool "TI MSP-EXP432P401R LAUNCHXL" + depends on SOC_MSP432P401R diff --git a/boards/arm/msp_exp432p401r_launchxl/Kconfig.defconfig b/boards/arm/msp_exp432p401r_launchxl/Kconfig.defconfig new file mode 100644 index 00000000000..ec709121c0e --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Kconfig - TI MSP-EXP432P401R LaunchXL development board configuration +# + +if BOARD_MSP_EXP432P401R_LAUNCHXL + +config BOARD + default msp_exp432p401r_launchxl + +endif # BOARD_MSP_EXP432P401R_LAUNCHXL diff --git a/boards/arm/msp_exp432p401r_launchxl/Makefile b/boards/arm/msp_exp432p401r_launchxl/Makefile new file mode 100644 index 00000000000..c925263c43a --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/Makefile @@ -0,0 +1,2 @@ +# No C files (yet) +obj- += dummy.o diff --git a/boards/arm/msp_exp432p401r_launchxl/board.h b/boards/arm/msp_exp432p401r_launchxl/board.h new file mode 100644 index 00000000000..e81ad18cfc7 --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/board.h @@ -0,0 +1,5 @@ +/* + * Copyright (c) 2017, Linaro Ltd + * + * SPDX-License-Identifier: Apache-2.0 + */ diff --git a/boards/arm/msp_exp432p401r_launchxl/doc/img/msp_exp432p401r_launchxl.jpg b/boards/arm/msp_exp432p401r_launchxl/doc/img/msp_exp432p401r_launchxl.jpg new file mode 100644 index 00000000000..dda6fedd8f5 Binary files /dev/null and b/boards/arm/msp_exp432p401r_launchxl/doc/img/msp_exp432p401r_launchxl.jpg differ diff --git a/boards/arm/msp_exp432p401r_launchxl/doc/msp_exp432p401r_launchxl.rst b/boards/arm/msp_exp432p401r_launchxl/doc/msp_exp432p401r_launchxl.rst new file mode 100644 index 00000000000..de4fa11cfb2 --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/doc/msp_exp432p401r_launchxl.rst @@ -0,0 +1,128 @@ +.. _msp_exp432p401r_launchxl: + +MSP-EXP432P401R LaunchXL +######################## + +Overview +******** + +The SimpleLink MSP‐EXP432P401R LaunchPad development kit is an easy-to-use evaluation +module for the SimpleLink MSP432P401R microcontroller. It contains everything needed to start +developing on the SimpleLink MSP432 low-power + performance ARM |reg| 32-bit Cortex |reg|-M4F +microcontroller (MCU). + +.. figure:: img/msp_exp432p401r_launchxl.jpg + :width: 1032px + :align: center + :height: 1663px + :alt: MSP-EXP432P401R LaunchXL development board + +Features: +========= + +* Low-power ARM Cortex-M4F MSP432P401R +* 40-pin LaunchPad development kit standard that leverages the BoosterPack plug-in module ecosystem +* XDS110-ET, an open-source onboard debug probe featuring EnergyTrace+ technology and application + UART +* Two buttons and two LEDs for user interaction +* Backchannel UART through USB to PC + +Details on the MSP-EXP432P401R LaunchXL development board can be found in the +`MSP-EXP432P401R LaunchXL User's Guide`_. + +Supported Features +================== + +* The on-board 32-kHz crystal allows for lower LPM3 sleep currents and a higher-precision clock source than the + default internal 32-kHz REFOCLK. Therefore, the presence of the crystal allows the full range of low- + power modes to be used. +* The on-board 48-MHz crystal allows the device to run at its maximum operating speed for MCLK and HSMCLK. + +The MSP-EXP432P401R LaunchXL development board configuration supports the following hardware features: + ++-----------+------------+-----------------------+ +| Interface | Controller | Driver/Component | ++===========+============+=======================+ +| NVIC | on-chip | nested vectored | +| | | interrupt controller | ++-----------+------------+-----------------------+ +| SYSTICK | on-chip | system clock | ++-----------+------------+-----------------------+ +| UART | on-chip | serial port | ++-----------+------------+-----------------------+ + +More details about the supported periperals are available in `MSP432P4XX TRM`_ +Other hardware features are not currently supported by the Zephyr kernel. + +Building and Flashing +********************* + +Building +======== + +Follow the :ref:`getting_started` instructions for Zephyr application +development. + +To build for the MSP-EXP432P401R LaunchXL: + +.. code-block:: console + + $ make -C samples/hello_world BOARD=msp_exp432p401r_launchxl + +The resulting ``zephyr.elf`` binary can be flashed onto MSP-EXP432P401R LaunchXL +using the command line utility mentioned below. + +Flashing +======== + +For Linux: +---------- + +`UniFlash`_ command line utility is used to program the flash memory. Only +elf loading is currently supported. + +The following command will flash the ``zephyr.elf`` binary to the MSP-EXP432P401R LaunchXL board: + +.. code-block:: console + + $ ./dslite.sh --config=MSP432P401R.ccxml zephyr.elf + +.. note:: The ccxml configuration file is included in boards/arm/msp_exp432p401r_launchxl/support. + +Debugging +========= + +MSP-EXP432P401R LaunchXL board supports debugging primarily using `CCS IDE`_. More information +on debugging using CCS can be found in `CCS Debug Handbook`_. + +Launchpad also supports debugging using GDB. See section 3.3 of `GCC ARM Toolchain Guide`_. + +References +********** + +TI MSP432 Wiki: + https://en.wikipedia.org/wiki/TI_MSP432 + +TI MSP432P401R Product Page: + http://www.ti.com/product/msp432p401r + +TI MSP432 SDK: + http://www.ti.com/tool/SIMPLELINK-MSP432-SDK + +.. _MSP-EXP432P401R LaunchXL User's Guide: + http://www.ti.com/lit/ug/slau597c/slau597c.pdf + +.. _MSP432P4XX TRM: + http://www.ti.com/lit/ug/slau356f/slau356f.pdf + +.. _UniFlash: + http://processors.wiki.ti.com/index.php/UniFlash_v4_Quick_Guide#Command_Line_Interface + +.. _CCS IDE: + http://www.ti.com/tool/ccstudio + +.. _CCS Debug Handbook: + http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#Cortex_M3.2FM4.2FTiva.2FMSP432 + +.. _GCC ARM Toolchain Guide: + http://www.ti.com/lit/ug/slau688b/slau688b.pdf diff --git a/boards/arm/msp_exp432p401r_launchxl/msp_exp432p401r_launchxl.yaml b/boards/arm/msp_exp432p401r_launchxl/msp_exp432p401r_launchxl.yaml new file mode 100644 index 00000000000..f1acd1a9722 --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/msp_exp432p401r_launchxl.yaml @@ -0,0 +1,7 @@ +identifier: msp_exp432p401r_launchxl +name: MSP-EXP432P401R-LAUNCHXL +type: mcu +arch: arm +toolchain: + - zephyr + - gccarmemb diff --git a/boards/arm/msp_exp432p401r_launchxl/msp_exp432p401r_launchxl_defconfig b/boards/arm/msp_exp432p401r_launchxl/msp_exp432p401r_launchxl_defconfig new file mode 100644 index 00000000000..b6dbaa1e619 --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/msp_exp432p401r_launchxl_defconfig @@ -0,0 +1,21 @@ +CONFIG_ARM=y +CONFIG_BOARD_MSP_EXP432P401R_LAUNCHXL=y +CONFIG_SOC_FAMILY_TISIMPLELINK=y +CONFIG_SOC_SERIES_MSP432P4XX=y +CONFIG_SOC_MSP432P401R=y +CONFIG_CORTEX_M_SYSTICK=y +CONFIG_CPU_HAS_FPU=y +CONFIG_FLASH=y +CONFIG_FLASH_BASE_ADDRESS=0x00000000 + +# enable uart driver +CONFIG_SERIAL=y +CONFIG_SERIAL_HAS_DRIVER=y +CONFIG_UART_MSP432P4XX=y + +# enable console +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y + +# Enable MSP432P4XX SDK driver files +CONFIG_HAS_MSP432P4XXSDK=y diff --git a/boards/arm/msp_exp432p401r_launchxl/support/MSP432P401R.ccxml b/boards/arm/msp_exp432p401r_launchxl/support/MSP432P401R.ccxml new file mode 100644 index 00000000000..331f741ae83 --- /dev/null +++ b/boards/arm/msp_exp432p401r_launchxl/support/MSP432P401R.ccxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/dts/arm/Makefile b/dts/arm/Makefile index 7ba6df3bf13..a4843c7373b 100644 --- a/dts/arm/Makefile +++ b/dts/arm/Makefile @@ -51,6 +51,7 @@ dtb-$(CONFIG_BOARD_OLIMEX_STM32_P405) = olimex_stm32_p405.dts_compiled dtb-$(CONFIG_BOARD_STM32F429I_DISC1) = stm32f429i_disc1.dts_compiled dtb-$(CONFIG_BOARD_EFM32WG_STK3800) = efm32wg_stk3800.dts_compiled dtb-$(CONFIG_BOARD_96B_NEONKEY) = 96b_neonkey.dts_compiled +dtb-$(CONFIG_BOARD_MSP_EXP432P401R_LAUNCHXL) = msp_exp432p401r_launchxl.dts_compiled always := $(dtb-y) endif diff --git a/dts/arm/msp_exp432p401r_launchxl.dts b/dts/arm/msp_exp432p401r_launchxl.dts new file mode 100644 index 00000000000..3fba0f4b994 --- /dev/null +++ b/dts/arm/msp_exp432p401r_launchxl.dts @@ -0,0 +1,25 @@ +/dts-v1/; + +#include + +/ { + model = "TI MSP-EXP432P401R LaunchXL"; + compatible = "ti,msp-exp432p401r-launchxl","ti,msp432p401r", + "ti,msp432p4xx"; + + aliases { + uart_0 = &uart0; + }; + + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &uart0; + }; +}; + +&uart0 { + status = "ok"; + current-speed = <115200>; +}; + diff --git a/dts/arm/msp_exp432p401r_launchxl.fixup b/dts/arm/msp_exp432p401r_launchxl.fixup new file mode 100644 index 00000000000..f9f367fdd71 --- /dev/null +++ b/dts/arm/msp_exp432p401r_launchxl.fixup @@ -0,0 +1,12 @@ +/* This file is a temporary workaround for mapping of the generated information + * to the current driver definitions. This will be removed when the drivers + * are modified to handle the generated information, or the mapping of + * generated data matches the driver definitions. + */ + +#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS + +#define CONFIG_UART_MSP432P4XX_NAME TI_MSP432P4XX_UART_40001000_LABEL +#define CONFIG_UART_MSP432P4XX_BASE_ADDRESS TI_MSP432P4XX_UART_40001000_BASE_ADDRESS +#define CONFIG_UART_MSP432P4XX_BAUD_RATE TI_MSP432P4XX_UART_40001000_CURRENT_SPEED +