Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
12215b4185 Merge "Merge arm branch into master" 2017-01-24 03:01:03 +00:00
Ramesh Thomas
02f327df5d samples: power_mgmt: Convert README to RST format
Changed README to RST and updated the formatting.

Jira: ZEP-1537
Change-Id: I012854daff6883cf462a3cc0246c73a8767dcd66
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-01-23 15:32:41 -08:00
Kumar Gala
4611f37e5a Merge arm branch into master
The following changes since commit 38ca5843cd:

  doc: update MAINTAINERS for .rst files (2017-01-23 18:36:28 +0000)

are available in the git repository at:

  https://github.com/zephyrproject-rtos/zephyr arm

for you to fetch changes up to 098f28983f:

Main changes:

- Added support for STM32F3X SoC
- Added support for ARM AN383 SoC
- Added board support for STM3210C-EVAL, NUCLEO-F334R8, STM32373C-EVAL,
  MPS2 w/AN383
- Start work on replace scs/scb layers with CMSIS
- Converted Kinetis SPI & UART drivers to use MCUX HAL
- Added drivers for ARM CMSDK Dual Timer & Timer

----------------------------------------------------------------
Adam Podogrocki (11):
      soc/stm32: add initial support for STM32F3X series
      clock/stm32: add STM32F3X reset and clock control
      exti/stm32: add support for F334 & F373 MCUs
      flash/stm32: flash driver for STM32F3x series microcontrollers
      gpio/stm32: provide GPIO driver implementation for STM32F3X family
      pinmux/stm32: extend pinmux driver functionality to support STM32F3X series MCUs
      boards: add initial support for Nucleo-64 with Soc STM32F334
      boards: add initial support for STM32373C-EVAL with SoC STM32F373VC
      pinmux/stm32: default pin assignment for STM3210C-EVAL board
      pinmux/stm32: default pin assignment for NUCLEO-F334R8 board
      pinmux/stm32: default pin assignment for STM32373C-EVAL board

Carles Cufi (1):
      arm: cmsis: Convert enable_floating_point to use CMSIS

David Brown (1):
      arm: cortex-m: Implement CONFIG_TEXT_SECTION_OFFSET

Erwan Gouriou (3):
      board: add nucleo_401re board documentation
      license: Replace Apache boilerplate with SPDX tag
      boards:arm: Provide debug option on some boards

Gil Pitney (1):
      cc3200: Added board documentation in RST format.

Jon Medhurst (2):
      arm: soc: Add SoC series for ARM's Cortex-M Prototyping System (MPS2)
      boards: arm: Add board for MPS2 with AN383

Kumar Gala (12):
      arm: kinetis: Remove duplicate & unused defines
      arm: nvic: kill _NvicSwInterruptTrigger
      uart/stm32: add STM32F3X support for uart
      arm: cmsis: Remove unused code from scb/scs layers
      arm: cmsis: Introduce CMSIS layer
      arm: cmsis: Convert DO_REBOOT to use CMSIS
      arm: cmsis: Convert systick to CMSIS
      arm: cmsis: Convert relocate_vector_table to use CMSIS
      timer: nrf_rtc: Use CMSIS NVIC APIs directly
      clock_control: nrf5_power: Use CMSIS NVIC APIs directly
      Bluetooth: Controller: Use CMSIS NVIC APIs directly
      tests: arm_irq_vector_table: Use CMSIS NVIC APIs directly

Maureen Helm (12):
      serial: Introduce new mcux shim driver
      frdm_k64f: hexiwear_k64: Add defaults for the mcux serial driver
      k64: Change the default serial driver to the mcux one
      frdm_k64f: hexiwear_k64: Remove defaults for the uart_k20 driver
      serial: k64: Remove the uart_k20 driver
      gpio: serial: Fix NXP copyright
      spi: Add shared default configs
      spi: Introduce new mcux shim driver
      k64: Change the default spi driver to the mcux shim
      tests: Update spi driver test for mcux
      samples: net: Increase spi log level
      spi: k64: Remove the k64 spi driver

Michael Scott (1):
      drivers: gpio: stm32: fix CONFIG_SOC_SERIES_STM32F4X build break

Ricardo Salveti (4):
      arm: set default vector table address in prep_c when XIP
      arm/nordic_nrf5: enable SOC_FLASH_NRF5 by default if FLASH is enabled
      boards: 96b_nitrogen: Add button and LED definitions
      boards: 96b_carbon: Add LED definitions

Vincenzo Frascino (7):
      counter: cmsdk: Add common interface
      soc: arm: beetle: Add Timers IRQ map
      counter: cmsdk: Add clock control to TMR Counters.
      counter: cmsdk: Add Timer 0 and 1 as Timers
      counter: cmsdk: Add DualTimer as Counter
      counter: cmsdk: Add Dualtimer as a Timer
      board: v2m_beetle: Update defconfig

 MAINTAINERS                                        |    7 +
 arch/arm/core/Kconfig                              |    1 +
 arch/arm/core/cortex_m/Makefile                    |    1 +
 arch/arm/core/cortex_m/prep_c.c                    |   24 +-
 arch/arm/core/cortex_m/scb.c                       |   69 +-
 arch/arm/soc/arm/beetle/soc_irq.h                  |    7 +
 arch/arm/soc/arm/mps2/Kconfig.defconfig.mps2_an385 |   16 +
 arch/arm/soc/arm/mps2/Kconfig.defconfig.series     |   34 +
 arch/arm/soc/arm/mps2/Kconfig.series               |   14 +
 arch/arm/soc/arm/mps2/Kconfig.soc                  |   15 +
 arch/arm/soc/arm/mps2/Makefile                     |    7 +
 arch/arm/soc/arm/mps2/linker.ld                    |    9 +
 arch/arm/soc/arm/mps2/soc.c                        |   31 +
 arch/arm/soc/arm/mps2/soc.h                        |   12 +
 arch/arm/soc/arm/mps2/soc_devices.h                |   31 +
 arch/arm/soc/arm/mps2/soc_irq.h                    |   38 +
 arch/arm/soc/arm/mps2/soc_memory_map.h             |   16 +
 arch/arm/soc/atmel_sam3/soc.c                      |    5 -
 arch/arm/soc/nordic_nrf5/Kconfig.defconfig         |    7 +
 arch/arm/soc/nordic_nrf5/nrf52/soc.c               |    5 -
 .../soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12  |    9 +-
 arch/arm/soc/nxp_kinetis/k6x/Makefile              |    1 -
 arch/arm/soc/nxp_kinetis/k6x/soc.c                 |    3 +-
 arch/arm/soc/nxp_kinetis/k6x/soc.h                 |   57 +-
 arch/arm/soc/nxp_kinetis/k6x/soc_config.c          |   73 --
 arch/arm/soc/st_stm32/stm32f1/soc.c                |    5 -
 arch/arm/soc/st_stm32/stm32f1/soc.h                |    7 +-
 .../soc/st_stm32/stm32f3/Kconfig.defconfig.series  |   32 +
 .../st_stm32/stm32f3/Kconfig.defconfig.stm32f303xc |   28 +
 .../st_stm32/stm32f3/Kconfig.defconfig.stm32f334x8 |   28 +
 .../st_stm32/stm32f3/Kconfig.defconfig.stm32f373xc |   28 +
 arch/arm/soc/st_stm32/stm32f3/Kconfig.series       |   18 +
 arch/arm/soc/st_stm32/stm32f3/Kconfig.soc          |   21 +
 arch/arm/soc/st_stm32/stm32f3/Makefile             |   11 +
 arch/arm/soc/st_stm32/stm32f3/flash_registers.h    |   60 ++
 arch/arm/soc/st_stm32/stm32f3/gpio_registers.h     |  102 ++
 arch/arm/soc/st_stm32/stm32f3/linker.ld            |    9 +
 arch/arm/soc/st_stm32/stm32f3/rcc_registers.h      |   89 ++
 arch/arm/soc/st_stm32/stm32f3/soc.c                |   54 +
 arch/arm/soc/st_stm32/stm32f3/soc.h                |   57 +
 arch/arm/soc/st_stm32/stm32f3/soc_config.c         |   53 +
 arch/arm/soc/st_stm32/stm32f3/soc_gpio.c           |  209 ++++
 arch/arm/soc/st_stm32/stm32f3/soc_irq.h            |  118 ++
 arch/arm/soc/st_stm32/stm32f3/soc_registers.h      |   15 +
 arch/arm/soc/st_stm32/stm32f4/soc.c                |    5 -
 arch/arm/soc/st_stm32/stm32l4/soc.c                |    5 -
 boards/arm/96b_carbon/board.h                      |   20 +
 boards/arm/96b_nitrogen/board.h                    |   21 +
 boards/arm/cc3200_launchxl/doc/cc3200_launchxl.rst |  244 +++++
 boards/arm/frdm_k64f/Kconfig.defconfig             |   51 +-
 boards/arm/frdm_k64f/frdm_k64f_defconfig           |    1 -
 boards/arm/frdm_k64f/pinmux.c                      |    4 +-
 boards/arm/hexiwear_k64/Kconfig.defconfig          |   55 +-
 boards/arm/hexiwear_k64/hexiwear_k64_defconfig     |    1 -
 boards/arm/hexiwear_k64/pinmux.c                   |    4 +-
 boards/arm/mps2_an385/Kconfig.board                |    9 +
 boards/arm/mps2_an385/Kconfig.defconfig            |   39 +
 boards/arm/mps2_an385/Makefile                     |    9 +
 boards/arm/mps2_an385/board.h                      |   12 +
 boards/arm/mps2_an385/doc/img/mps2.png             |  Bin 0 -> 771962 bytes
 boards/arm/mps2_an385/doc/mps2_an385.rst           |  188 ++++
 boards/arm/mps2_an385/mps2_an385_defconfig         |   19 +
 boards/arm/nucleo_f334r8/Kconfig.board             |   10 +
 boards/arm/nucleo_f334r8/Kconfig.defconfig         |   13 +
 boards/arm/nucleo_f334r8/Makefile                  |    2 +
 boards/arm/nucleo_f334r8/Makefile.board            |    7 +
 boards/arm/nucleo_f334r8/board.h                   |   26 +
 boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig   |   53 +
 boards/arm/nucleo_f334r8/support/openocd.cfg       |   12 +
 boards/arm/nucleo_f401re/Makefile.board            |    1 +
 .../doc/img/nucleo64_perf_logo_1024.png            |  Bin 0 -> 780528 bytes
 .../doc/img/nucleo_f401re_arduino.png              |  Bin 0 -> 575018 bytes
 .../nucleo_f401re/doc/img/nucleo_f401re_morpho.png |  Bin 0 -> 481267 bytes
 boards/arm/nucleo_f401re/doc/nucleof401re.rst      |  190 ++++
 boards/arm/stm3210c_eval/Makefile.board            |    1 +
 boards/arm/stm32373c_eval/Kconfig.board            |   10 +
 boards/arm/stm32373c_eval/Kconfig.defconfig        |   13 +
 boards/arm/stm32373c_eval/Makefile                 |    2 +
 boards/arm/stm32373c_eval/Makefile.board           |    7 +
 boards/arm/stm32373c_eval/board.h                  |   32 +
 boards/arm/stm32373c_eval/stm32373c_eval_defconfig |   62 ++
 boards/arm/stm32373c_eval/support/openocd.cfg      |   12 +
 boards/arm/v2m_beetle/Kconfig.defconfig            |   29 +-
 drivers/clock_control/Kconfig                      |    2 +
 drivers/clock_control/Kconfig.stm32f3x             |  115 ++
 drivers/clock_control/Makefile                     |    1 +
 drivers/clock_control/nrf5_power_clock.c           |    9 +-
 drivers/clock_control/stm32f3x_clock.c             |  398 +++++++
 drivers/counter/Kconfig                            |    2 +
 drivers/counter/Kconfig.dtmr_cmsdk_apb             |   75 ++
 drivers/counter/Kconfig.tmr_cmsdk_apb              |   62 +-
 drivers/counter/Makefile                           |    3 +
 drivers/counter/counter_dtmr_cmsdk_apb.c           |  120 +++
 drivers/counter/counter_tmr_cmsdk_apb.c            |   55 +-
 drivers/counter/dualtimer_cmsdk_apb.h              |   68 ++
 drivers/counter/timer_cmsdk_apb.h                  |   40 +
 drivers/counter/timer_dtmr_cmsdk_apb.c             |  206 ++++
 drivers/counter/timer_tmr_cmsdk_apb.c              |  241 +++++
 drivers/flash/Kconfig                              |   16 +-
 drivers/flash/Kconfig.stm32f3x                     |   25 +
 drivers/flash/Makefile                             |    5 +
 drivers/flash/flash_stm32f3x.c                     |  149 +++
 drivers/flash/flash_stm32f3x.h                     |   66 ++
 drivers/flash/flash_stm32f3x_priv.c                |  206 ++++
 drivers/gpio/Kconfig.mcux                          |    2 +-
 drivers/gpio/gpio_mcux.c                           |    2 +-
 drivers/gpio/gpio_stm32.c                          |   45 +-
 drivers/gpio/gpio_stm32.h                          |    7 +-
 drivers/interrupt_controller/exti_stm32.c          |   45 +-
 drivers/pinmux/Makefile                            |    3 +
 drivers/pinmux/stm32/pinmux_board_nucleo_f334r8.c  |   45 +
 drivers/pinmux/stm32/pinmux_board_stm3210c_eval.c  |   34 +
 drivers/pinmux/stm32/pinmux_board_stm32373c_eval.c |   34 +
 drivers/pinmux/stm32/pinmux_stm32.c                |   12 +-
 drivers/pinmux/stm32/pinmux_stm32.h                |   40 +-
 drivers/pinmux/stm32/pinmux_stm32f1.h              |    3 +
 drivers/pinmux/stm32/pinmux_stm32f3.h              |   39 +
 drivers/serial/Kconfig                             |    2 +-
 drivers/serial/Kconfig.k20                         |  178 ---
 drivers/serial/Kconfig.mcux                        |  150 +++
 drivers/serial/Makefile                            |    2 +-
 drivers/serial/uart_k20.c                          |  584 ----------
 drivers/serial/uart_k20.h                          |   16 -
 drivers/serial/uart_k20_priv.h                     |  252 -----
 drivers/serial/uart_mcux.c                         |  508 +++++++++
 drivers/serial/uart_stm32.c                        |   16 +-
 drivers/serial/uart_stm32.h                        |    4 +-
 drivers/spi/Kconfig                                |   40 +-
 drivers/spi/Kconfig.mcux                           |   36 +
 drivers/spi/Makefile                               |    2 +-
 drivers/spi/spi_k64.c                              | 1138 --------------------
 drivers/spi/spi_k64_priv.h                         |  166 ---
 drivers/spi/spi_mcux.c                             |  321 ++++++
 drivers/timer/cortex_m_systick.c                   |   50 +-
 drivers/timer/nrf_rtc_timer.c                      |    3 +-
 ext/hal/nxp/mcux/drivers/Makefile                  |    3 +-
 ext/hal/st/stm32cube/Kbuild                        |    2 +
 include/arch/arm/cortex_m/cmsis.h                  |   96 ++
 include/arch/arm/cortex_m/nvic.h                   |   26 -
 include/arch/arm/cortex_m/scb.h                    |  561 ----------
 include/arch/arm/cortex_m/scripts/linker.ld        |    1 +
 include/arch/arm/cortex_m/scs.h                    |  142 ---
 .../drivers/clock_control/stm32_clock_control.h    |    3 +
 .../drivers/clock_control/stm32f3_clock_control.h  |  114 ++
 include/drivers/k20_sim.h                          |   10 -
 include/drivers/spi/spi_k64.h                      |   68 --
 include/gpio.h                                     |   14 +
 samples/net/echo_client/prj_frdm_k64f_cc2520.conf  |    2 +
 samples/net/echo_server/prj_frdm_k64f_cc2520.conf  |    2 +
 scripts/sanity_chk/arches/arm.ini                  |    2 +-
 subsys/bluetooth/controller/hal/nrf5/ecb.c         |    3 +-
 subsys/bluetooth/controller/hal/nrf5/radio.c       |    7 +-
 subsys/bluetooth/controller/hci/hci_driver.c       |    6 +-
 tests/drivers/spi_test/src/spi.c                   |    7 +-
 tests/drivers/spi_test/testcase.ini                |    4 +-
 tests/kernel/arm_irq_vector_table/src/main.c       |    8 +-
 .../kernel/test_arm_irq_vector_table/src/main.c    |    8 +-
 157 files changed, 5744 insertions(+), 3593 deletions(-)
 create mode 100644 arch/arm/soc/arm/mps2/Kconfig.defconfig.mps2_an385
 create mode 100644 arch/arm/soc/arm/mps2/Kconfig.defconfig.series
 create mode 100644 arch/arm/soc/arm/mps2/Kconfig.series
 create mode 100644 arch/arm/soc/arm/mps2/Kconfig.soc
 create mode 100644 arch/arm/soc/arm/mps2/Makefile
 create mode 100644 arch/arm/soc/arm/mps2/linker.ld
 create mode 100644 arch/arm/soc/arm/mps2/soc.c
 create mode 100644 arch/arm/soc/arm/mps2/soc.h
 create mode 100644 arch/arm/soc/arm/mps2/soc_devices.h
 create mode 100644 arch/arm/soc/arm/mps2/soc_irq.h
 create mode 100644 arch/arm/soc/arm/mps2/soc_memory_map.h
 delete mode 100644 arch/arm/soc/nxp_kinetis/k6x/soc_config.c
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.series
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f303xc
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f334x8
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f373xc
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Kconfig.series
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Kconfig.soc
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/Makefile
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/flash_registers.h
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/gpio_registers.h
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/linker.ld
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/rcc_registers.h
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/soc.c
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/soc.h
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/soc_config.c
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/soc_gpio.c
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/soc_irq.h
 create mode 100644 arch/arm/soc/st_stm32/stm32f3/soc_registers.h
 create mode 100644 boards/arm/cc3200_launchxl/doc/cc3200_launchxl.rst
 create mode 100644 boards/arm/mps2_an385/Kconfig.board
 create mode 100644 boards/arm/mps2_an385/Kconfig.defconfig
 create mode 100644 boards/arm/mps2_an385/Makefile
 create mode 100644 boards/arm/mps2_an385/board.h
 create mode 100644 boards/arm/mps2_an385/doc/img/mps2.png
 create mode 100644 boards/arm/mps2_an385/doc/mps2_an385.rst
 create mode 100644 boards/arm/mps2_an385/mps2_an385_defconfig
 create mode 100644 boards/arm/nucleo_f334r8/Kconfig.board
 create mode 100644 boards/arm/nucleo_f334r8/Kconfig.defconfig
 create mode 100644 boards/arm/nucleo_f334r8/Makefile
 create mode 100644 boards/arm/nucleo_f334r8/Makefile.board
 create mode 100644 boards/arm/nucleo_f334r8/board.h
 create mode 100644 boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig
 create mode 100644 boards/arm/nucleo_f334r8/support/openocd.cfg
 create mode 100644 boards/arm/nucleo_f401re/doc/img/nucleo64_perf_logo_1024.png
 create mode 100644 boards/arm/nucleo_f401re/doc/img/nucleo_f401re_arduino.png
 create mode 100644 boards/arm/nucleo_f401re/doc/img/nucleo_f401re_morpho.png
 create mode 100644 boards/arm/nucleo_f401re/doc/nucleof401re.rst
 create mode 100644 boards/arm/stm32373c_eval/Kconfig.board
 create mode 100644 boards/arm/stm32373c_eval/Kconfig.defconfig
 create mode 100644 boards/arm/stm32373c_eval/Makefile
 create mode 100644 boards/arm/stm32373c_eval/Makefile.board
 create mode 100644 boards/arm/stm32373c_eval/board.h
 create mode 100644 boards/arm/stm32373c_eval/stm32373c_eval_defconfig
 create mode 100644 boards/arm/stm32373c_eval/support/openocd.cfg
 create mode 100644 drivers/clock_control/Kconfig.stm32f3x
 create mode 100644 drivers/clock_control/stm32f3x_clock.c
 create mode 100644 drivers/counter/Kconfig.dtmr_cmsdk_apb
 create mode 100644 drivers/counter/counter_dtmr_cmsdk_apb.c
 create mode 100644 drivers/counter/dualtimer_cmsdk_apb.h
 create mode 100644 drivers/counter/timer_cmsdk_apb.h
 create mode 100644 drivers/counter/timer_dtmr_cmsdk_apb.c
 create mode 100644 drivers/counter/timer_tmr_cmsdk_apb.c
 create mode 100644 drivers/flash/Kconfig.stm32f3x
 create mode 100644 drivers/flash/flash_stm32f3x.c
 create mode 100644 drivers/flash/flash_stm32f3x.h
 create mode 100644 drivers/flash/flash_stm32f3x_priv.c
 create mode 100644 drivers/pinmux/stm32/pinmux_board_nucleo_f334r8.c
 create mode 100644 drivers/pinmux/stm32/pinmux_board_stm3210c_eval.c
 create mode 100644 drivers/pinmux/stm32/pinmux_board_stm32373c_eval.c
 create mode 100644 drivers/pinmux/stm32/pinmux_stm32f3.h
 delete mode 100644 drivers/serial/Kconfig.k20
 create mode 100644 drivers/serial/Kconfig.mcux
 delete mode 100644 drivers/serial/uart_k20.c
 delete mode 100644 drivers/serial/uart_k20.h
 delete mode 100644 drivers/serial/uart_k20_priv.h
 create mode 100644 drivers/serial/uart_mcux.c
 create mode 100644 drivers/spi/Kconfig.mcux
 delete mode 100644 drivers/spi/spi_k64.c
 delete mode 100644 drivers/spi/spi_k64_priv.h
 create mode 100644 drivers/spi/spi_mcux.c
 create mode 100644 include/arch/arm/cortex_m/cmsis.h
 create mode 100644 include/drivers/clock_control/stm32f3_clock_control.h
 delete mode 100644 include/drivers/spi/spi_k64.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

Change-Id: I5890c34d63b0d0f0bc8bf443f6ccacae68a53e93
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:45:28 -06:00
Kumar Gala
098f28983f tests: arm_irq_vector_table: Use CMSIS NVIC APIs directly
Convert testcases to use the CMSIS NVIC APIs or direct NVIC register
access rather than the internal ones so we can remove them in the future.

Change-Id: I2a5a3eae713e66944cf105e7fffa603b88522681
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Kumar Gala
8d4c1787bf Bluetooth: Controller: Use CMSIS NVIC APIs directly
Convert driver to use the CMSIS NVIC APIs rather than the internal
ones so we can remove them in the future.

Change-Id: Ib9fe696e8d5e55f60865d3fd958a035135ce517a
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Kumar Gala
043b006c0f clock_control: nrf5_power: Use CMSIS NVIC APIs directly
Convert driver to use the CMSIS NVIC APIs rather than the internal ones
so we can remove them in the future.

Change-Id: I7bf3024ea4baf61f1e42bbbd5e4b0abfc6c04e6b
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Kumar Gala
8c75d79a15 timer: nrf_rtc: Use CMSIS NVIC APIs directly
Convert driver to use the CMSIS NVIC APIs rather than the internal ones
so we can remove them in the future.

Change-Id: I31c2f37bc0aa35668a441f4ef2821b768dd7b817
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Kumar Gala
6782c3ea23 arm: cmsis: Convert relocate_vector_table to use CMSIS
Replace _scs_relocate_vector_table with direct CMSIS register access and
use of __ISB/__DSB routinues.  We also cleanup the code a little bit to
just have one implentation of relocate_vector_table() on ARMv7-M.

Jira: ZEP-1568

Change-Id: I088c30e680a7ba198c1527a5822114b70f10c510
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Kumar Gala
7f5dc1ab30 arm: cmsis: Convert systick to CMSIS
Remove use of __scs structures and defines in place of CMSIS defined
ones.  Also, use __ISB() instead of inline asm.

Jira: ZEP-1568

Change-Id: I8798206a12680f6c50105c7c28112632ac9dde50
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Kumar Gala
82027c68f9 arm: cmsis: Convert DO_REBOOT to use CMSIS
CMSIS provides a complete implentation for reboot, we can utilize it
directly and reduce zephyr specific code.

Jira: ZEP-1568

Change-Id: Ia9d1abd5c1e02e724423b94867ea452bc806ef79
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:55 -06:00
Carles Cufi
88bbd6ccb1 arm: cmsis: Convert enable_floating_point to use CMSIS
As a first step towards removing the custom ARM Cortex-M Core code
present in Zephyr in benefit of using CMSIS, this change replaces
the use of the custom core code with CMSIS macros in
enable_floating_point().

Jira: ZEP-1568

Change-id: I544a712bf169358c826a3b2acd032c6b30b2801b
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:54 -06:00
Kumar Gala
457a5988c4 arm: cmsis: Introduce CMSIS layer
Support using CMSIS defines and functions, we either pull the expect
defines/enum from the SoC HAL layers via <soc.h> for the SoC or we
provide a default set based on __NVIC_PRIO_BITS is defined.

We provide defaults in the case for:
	IRQn_Type enum
	*_REV define (set to 0)
	__MPU_PRESENT define (set to 0 - no MPU)
	__NVIC_PRIO_BITS define (set to CONFIG_NUM_IRQ_PRIO_BITS)
	__Vendor_SysTickConfig (set to 0 - standard SysTick)

Jira: ZEP-1568

Change-Id: Ibc203de79f4697b14849b69c0e8c5c43677b5c6e
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:54 -06:00
Kumar Gala
375a0ef393 arm: cmsis: Remove unused code from scb/scs layers
In preperation for removing the scb/scs layers and using CMSIS directly
lets remove all the _Scb* and _Scs* functions that are not currently
used.

Jira: ZEP-1568

Change-Id: If4641fb9a6de616b4b8793d4678aaaed48e794bc
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:54 -06:00
Jon Medhurst
ac4bfe49d1 boards: arm: Add board for MPS2 with AN383
ARM's Cortex-M Prototyping System (MPS2) is a board with an FPGA that
can be programmed with different 'SoCs'. To use these in Zephyr we need
a set of board files for each variant.

This adds a board for a variant which implements a Cortex-M3 CPU; the
naming of this matches that used for the Zephyr SoC (which is itself
based on ARM's documentation nomenclature).

Change-Id: Ie02a67a03016b8aeee31e3694f0edbcc37f9ee64
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Jon Medhurst
cd8fd42de9 arm: soc: Add SoC series for ARM's Cortex-M Prototyping System (MPS2)
ARM's Cortex-M Prototyping System (or MPS2) [1] is a board containing
devices such as RAM, ethernet and display, and at its heart there is an
FPGA which can be programmed with various 'SoCs' which implement the
CPU, SRAM, UARTs, SPI, DMA, etc. There are also software simulations of
systems based on this hardware which are part of ARM's Fixed Virtual
Platforms (FVPs).

All of the above could be regarded SoCs in the same series so we will
treat them as such in Zephyr.

In this initial patch we add SoC support for the public FPGA image
which implements a Cortex-M3 CPU, and includes definitions to support
use of the UARTs on this.

ARM's documentation for MPS2 images are titled 'Application Note ANnnn'
where the number nnn is different for each 'SoC'. E.g. Application Note
AN385 is for "ARM Cortex-M3 SMM on V2M-MPS2" [2]. The files ARM supply
for programming the board firmware also make extensive use of the ANnnn
nomenclature, so we will use this for the SoC name in Zephyr. E.g. the
Cortex-M3 SoC will be called 'mps2_an385'. Note, it is not possible to
use the CPU type (e.g. M3) for the name as there are multiple FPGA
images for some CPU types (e.g. there are three Cortex M7 images
with differing FPU and MPU support).

[1] https://www.arm.com/products/tools/development-boards/versatile-express/cortex-m-prototyping-system.php
[2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0385c/index.html

Change-Id: Ice54f2d2cde7669582337f256c878526139daedd
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Maureen Helm
8769cd585e spi: k64: Remove the k64 spi driver
Now that we have a more generic mcux spi driver that can be used across
multiple Kinetis SoCs, remove the specific k64 spi driver.

Jira: ZEP-1374
Change-Id: Ifc324374f305837f5e3d2cfd7ad30d3608865b5b
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:54 -06:00
Maureen Helm
4279bf1c03 samples: net: Increase spi log level
Change-Id: Ic067a93c1e24c12c7e531b1df590be252cd2531b
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:54 -06:00
Maureen Helm
06bd605da3 tests: Update spi driver test for mcux
Jira: ZEP-1374
Change-Id: Ibd66df42919d085666cfd7e98bea5c808d8d54e0
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:54 -06:00
Maureen Helm
e1c9dfcee5 k64: Change the default spi driver to the mcux shim
Jira: ZEP-1374
Change-Id: I8ae160e32b0f46120138025e373724ad97cb0cd6
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:54 -06:00
Maureen Helm
d138a4fad1 spi: Introduce new mcux shim driver
Adds a shim layer around the mcux dspi driver to adapt it to the Zephyr
spi interface. Unlike the existing k64 spi driver, this driver can be
used for other Kinetis SoCs that contain the dspi module.

Jira: ZEP-1374
Change-Id: I9417c1513565dfcc47ccda098492f60e840f4f84
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:54 -06:00
Maureen Helm
bd562921e8 spi: Add shared default configs
Adds default configurations for baud rate, transfer word size, clock
polarity and phase. These default configurations can be shared across
multiple spi drivers.

Change-Id: I221b402c075003014991b38f6342a89e55c3bec9
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:54 -06:00
Ricardo Salveti
18d4c13bda boards: 96b_carbon: Add LED definitions
Add the GPIO pin and port definitions for the LEDs available on the
board.

Change-Id: I586a0ebfbbe8fa6e50dd1f91c1437665dd8ec677
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-01-23 15:15:54 -06:00
Ricardo Salveti
6c3446dfcd boards: 96b_nitrogen: Add button and LED definitions
Add the GPIO pin and port definitions for the button and LEDs available
on the board.

Change-Id: If74cf9d780227346c7c8816e6eadca00b16953b2
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-01-23 15:15:54 -06:00
Vincenzo Frascino
59d1025e62 board: v2m_beetle: Update defconfig
This patch updates the default defconfig in order to support the new
Timers implementation.

Jira: ZEP-1300
Change-Id: I749042bcf41c6b4cb11614315c3c2ce09cdb2aa8
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Vincenzo Frascino
a93b88789b counter: cmsdk: Add Dualtimer as a Timer
This patch adds Dualtimer support to be used as a Timer.

Jira: ZEP-1300
Change-Id: If13143c8a8bdb07210daca66deca44710a18406f
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Vincenzo Frascino
b1e02a594a counter: cmsdk: Add DualTimer as Counter
This patch adds Dualtimer to be used as a counter.

Jira: ZEP-1300
Change-Id: Ic4a2d89ec7fc0c0c2a0bc7f6d32d97637049faaf
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Vincenzo Frascino
b11242d11f counter: cmsdk: Add Timer 0 and 1 as Timers
This patch adds Timer 0 and 1 to be used as timers.

Jira: ZEP-1300
Change-Id: I57112a8ed6f5daa22345e8807e9ebe87bb09e782
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Vincenzo Frascino
d36543828b counter: cmsdk: Add clock control to TMR Counters.
This patch adds clock control to the counters based on Timer 0 and 1.

Jira: ZEP-1300
Change-Id: I14499a833fe9720496ab7905bc1466e9b03bb316
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Vincenzo Frascino
8971da0375 soc: arm: beetle: Add Timers IRQ map
This patch adds the timers IRQ map to the ARM Beetle SoC platform.

Jira: ZEP-1300
Change-Id: If38a197210f71ae90c7ee6274395f064116faf72
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:53 -06:00
Vincenzo Frascino
06f6d3837b counter: cmsdk: Add common interface
This patch adds a common interface for timers and counters based on
CMSDK APB timers.

Jira: ZEP-1300
Change-Id: I1f89f674d31410f19b651cd904c79f8d173a5357
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:53 -06:00
David Brown
dee8ef6f4f arm: cortex-m: Implement CONFIG_TEXT_SECTION_OFFSET
On other targets, CONFIG_TEXT_SECTION_OFFSET allows the entire image to
be moved in memory to allow space for some type of header.  The Mynewt
project bootloader prepends a small header, and this config needs to be
supported for this to work.

The specific alignment requirements of the vector table are chip
specific, and generally will be a power of two larger than the size of
the vector table.

Change-Id: I631a42ff64fb8ab86bd177659f2eac5208527653
Signed-off-by: David Brown <david.brown@linaro.org>
2017-01-23 15:15:53 -06:00
Erwan Gouriou
81a85341db boards:arm: Provide debug option on some boards
Since commit "build: use target 'debugserver' for Qemu debugging",
DEBUG_SCRIPT should be used to enable make debug option
This commit provide debug option to following boards:
nucleo_f334r8
nucleo_f401re
stm3210c_eval
stm32373c_eval


Change-Id: I92eb36257b6e05125440b0e83985d59bcda27aa8
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-01-23 15:15:53 -06:00
Maureen Helm
82eaa7cd5b gpio: serial: Fix NXP copyright
The NXP copyright should not have 'Semiconductors, Inc' in it.

Change-Id: I6e290146d49bf22d1d40b7fa764bb53b6b122303
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:53 -06:00
Michael Scott
fe99cfe630 drivers: gpio: stm32: fix CONFIG_SOC_SERIES_STM32F4X build break
The commit c90e4d063be0ff5f47df45ca8500eff8518c5d25 changed
line 216 in drivers/gpio/gpio_stm32.c:
-elif CONFIG_SOC_SERIES_STM32F4X
+#elif /* CONFIG_SOC_SERIES_STM32F4X */

This causes the following compiler error:
zephyr/drivers/gpio/gpio_stm32.c:218:39: error: #elif with no expression
 #elif /* CONFIG_SOC_SERIES_STM32F4X */
                                       ^

Change-Id: Ie8b124931e333aa7860e6db22f5c259670e29833
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-01-23 15:15:53 -06:00
Maureen Helm
294fdab7bd serial: k64: Remove the uart_k20 driver
Now that we have a more generic mcux serial driver, remove the uart_k20
driver.

Jira: ZEP-719
Change-Id: I51a3237454140feabbfe18ac2c8ee451e572c7be
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:53 -06:00
Maureen Helm
bb45fd526e frdm_k64f: hexiwear_k64: Remove defaults for the uart_k20 driver
Jira: ZEP-719
Change-Id: If1d3e1d450f582d6d3d500385e7fc15afe00b79f
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:53 -06:00
Maureen Helm
8c3d4f770a k64: Change the default serial driver to the mcux one
Stop using the specific uart_k20 driver by default and start using the
more generic mcux uart driver instead.

Jira: ZEP-719
Change-Id: I7b107ea7118887591362159283ebb5413b45595a
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:53 -06:00
Maureen Helm
2e205e69d1 frdm_k64f: hexiwear_k64: Add defaults for the mcux serial driver
Jira: ZEP-719
Change-Id: I4e325df0d91b93ec832a50a24a8f3c34778281e8
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:53 -06:00
Maureen Helm
38f812828e serial: Introduce new mcux shim driver
Adds a shim layer around the mcux uart driver to adapt it to the Zephyr
serial interface. Unlike the existing (and confusingly-named) uart_k20
driver, this driver can be used for k64 and other Kinetis SoCs.

Implements polling and interrupt-driven serial interface functions that
are logically equivalent to the uart_k20 driver. Adds an extra instance,
irq_tx_empty(), and err_check() that aren't implemented in the uart_k20
driver.

Jira: ZEP-719
Change-Id: Iab99542e7ec921ef4f361437768113fee01e5fe8
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-23 15:15:53 -06:00
Gil Pitney
efb978da1a cc3200: Added board documentation in RST format.
This follows the board.rst template in the RFC
for board documentation:
https://gerrit.zephyrproject.org/r/#/c/9703/

This RST file was validated visually by rendering
using the online tool: http://rst.ninjs.org/

JIRA: ZEP-1541

Change-Id: Ibe6e1c7f8eb3c7862b4087a78b469693927280a2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-01-23 15:15:53 -06:00
Erwan Gouriou
8890b73b6e license: Replace Apache boilerplate with SPDX tag
Apply JIRA: ZEP-1457 to STM32F3X family porting patchset.

Change-Id: I352267a47847143e557a4016de12bb9a14a20067
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:53 -06:00
Adam Podogrocki
a0dcfcce97 pinmux/stm32: default pin assignment for STM32373C-EVAL board
Change-Id: Id4b04749e1d707d12aa78cabd8d103701b6d55b6
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Adam Podogrocki
7d6c139082 pinmux/stm32: default pin assignment for NUCLEO-F334R8 board
Change-Id: Ib70471ceb2e4444d5826a5a17cbfc42161df78d2
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Adam Podogrocki
2ce996695a pinmux/stm32: default pin assignment for STM3210C-EVAL board
Change-Id: I87c3806b2fad649c67e8d66981ff6a99168fda72
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Adam Podogrocki
d8992f576e boards: add initial support for STM32373C-EVAL with SoC STM32F373VC
Change-Id: Iec92b0c7e2c244bd82ee9c318f6f2cb3ed2d7397
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Adam Podogrocki
5f2fa051a6 boards: add initial support for Nucleo-64 with Soc STM32F334
Change-Id: I0b9992e26353cea3b0415aa57ab3b983d84cef05
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Kumar Gala
05f717e71b uart/stm32: add STM32F3X support for uart
Change-Id: I9796c6a2841c972eeab15894a6d7f38ae93606d1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-23 15:15:53 -06:00
Adam Podogrocki
726d11a5a2 pinmux/stm32: extend pinmux driver functionality to support STM32F3X series MCUs
Change-Id: Ifc4c93e03b6593f1b6c7e664fdf719f9344fe1ee
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:52 -06:00
Adam Podogrocki
f23492a059 gpio/stm32: provide GPIO driver implementation for STM32F3X family
Implementation includes adding some defines in the pinmux,
adjusting gpio driver to specific defines for STM32F3X family,
adding specific functionality in the F3X SoC definition.

Change-Id: I465c66eb93e7afb43166c4585c852e284b0d6e67
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:52 -06:00
Adam Podogrocki
61cc74c425 flash/stm32: flash driver for STM32F3x series microcontrollers
Change-Id: I0b41a50507a09a513a67d13374323d831a0ec86a
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:52 -06:00