Commit graph

18396 commits

Author SHA1 Message Date
Anas Nashif
fdd0cb70ed samples: remove legacy applications
Change-Id: I790d66f2ab14b40dd6c6fe25c59ccd97850602e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:32 +00:00
Lee Jones
bbcbd0e228 dma: Expand on documentation for data_size AKA data_width
"number of bytes" could mean anything.

Change-Id: Ib098b5d249365cae2fc00f14d1977296a4d469d7
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-03-29 14:54:31 +00:00
Lee Jones
860f6abccd dma: stm32f4x: Obtain controller names from Kconfig
Change-Id: I730b3ad7c44f1bdb2f4dc5d4178a924aca59aa86
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-03-29 14:54:30 +00:00
Lee Jones
8c5b54e8b8 dma: stm32f4x: Obtain IRQ priority from Kconfig
Change-Id: I8f4cb8c8d95536e84fcb842d1f84d6c9256dfd88
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-03-29 14:54:30 +00:00
Lee Jones
bb36c0af86 dma: Add possibility for up to 3 DMA Controllers
Currently only 1 is allowed.  While we're at it, let's generify the
existing entries, since they could be used by all controllers, not
just QMSI.

Change-Id: Iec5d195fff239931b21a7584eb4b642b40f95be5
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-03-29 14:54:29 +00:00
Lee Jones
b15693d0e5 dma: Group devices together in Kconfig
Change-Id: Idbbd1d1fc73b1599ce8c3384776b949d16f87cb2
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-03-29 14:54:28 +00:00
David B. Kinder
9d0c020a9b doc: clean up blank lines in getting started docs
code blocks had unnecessary blank lines

Change-Id: I7fae271db0e7e975d717ccf7b0f7b686251405c0
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-27 15:34:07 -07:00
Michał Kruszewski
5c642e8bdb device: Fix DEVICE_DECLARE macro to be usable inside drivers source code.
Fix an issue where declaring a device in order to use DEVICE_GET macro
resulted in error: 'static declaration follows non-static declaration'.

Change-Id: I3e851e4d34e905601672e60ded50ed888c4d2a3c
Signed-off-by: Michał Kruszewski <mkru@protonmail.com>
2017-03-27 19:07:19 +00:00
Kumar Gala
023f2ce94d dts/extract_dts_includes.py: Fix IRQ define name creation
We were missing the cell name in how we create the IRQ define.  This was
working fine because the only name we had been using with IRQ which we
would shorten down.

Change-Id: I8449c8ced1a9284982d3d5b07c6acdcf26e965e2
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-03-27 18:26:22 +00:00
Anas Nashif
8eea1d78d8 tinytile: support flashing
Now both flashing over DFU and JTAG are supported, however JTAG needs a
special connection, so DFU is the current out of the box supported
method for flashing.

Jira: ZEP-1785
Change-Id: I47ffce3b332b99ef6c6afdce2214709a4fa5b946
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-27 16:53:08 +00:00
Kumar Gala
a432cc52f8 Merge "Merge arm branch into master" 2017-03-27 15:55:32 +00:00
Andy Gross
c65c6a9029 build: Don't remove dts/ directory on clean
This patch fixes an issue where any make target executing the the clean
from the root source directory would remove the dts directory.  This is
not necessary and can cause build issues on following make commands.

ZEP-1968

Change-Id: I2cc751d8fd24bd77e425860686b66644ade44eeb
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-27 10:27:01 -05:00
Kumar Gala
48d6596f57 Merge arm branch into master
- Fix for floating point stack corruption issue
- Update of NXP MCUX HAL to v2.2
- Various cleanups on STM SoCs
- Cleans & prep for supporting NXP MKL25Z SoC
- Board docs for 96b_carbon & 96b_nitrogen

----------------------------------------------------------------
Florian Vaussard (10):
      kernel: arm: Increase idle stack size to fix corruption by FP_SHARING
      gpio: stm32: Use atomic set/reset in stm32_gpio_set()
      arm: stm32f4: Fix comment in Kconfig
      arm: stm32f4: Add FPU support
      clock: stm32f4: Fix range of CLOCK_STM32F4X_PLLN_MULTIPLIER config
      clock: stm32f4: Fix wrong BKPSRAM and CCMDATARAM clocks
      clock: stm32f4: Add some missing clocks
      gpio: stm32: Use macro to simplify registration
      gpio: stm32: Add support for ports I to K
      serial: stm32: Properly put Kconfig options in their own submenu

Gustavo Denardin (2):
      arm: IRQ number correction in the soc configuration
      arm: UART driver modifications for MKL25Z soc support

Kumar Gala (1):
      spi: mcux: Rename spi driver to DSPI to match naming convention

Maureen Helm (2):
      ext: mcux: Update to mcux 2.1 for k64
      ext: mcux: Update to mcux 2.2 for k64

Ricardo Salveti (3):
      boards: add 96b_carbon board documentation
      boards: add 96b_nitrogen board documentation
      nrf_rtc_timer: clear events and counter when disabling sys_clock

Yannis Damigos (2):
      dts: arm: Add base DTS support for Olimexino STM32 board
      olimexino_stm32: Enable DT usage for OLIMEXINO STM32

 .../soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12  |    2 +-
 arch/arm/soc/nxp_kinetis/k6x/soc.c                 |    8 +-
 .../soc/st_stm32/stm32f1/Kconfig.defconfig.series  |    2 +
 .../st_stm32/stm32f1/Kconfig.defconfig.stm32f103xb |    3 +
 .../st_stm32/stm32f4/Kconfig.defconfig.stm32f407xx |    2 +-
 .../st_stm32/stm32f4/Kconfig.defconfig.stm32f429xx |    2 +-
 arch/arm/soc/st_stm32/stm32f4/Kconfig.series       |    3 +-
 arch/arm/soc/st_stm32/stm32f4/soc_gpio.c           |    8 +-
 boards/arm/96b_carbon/doc/96b_carbon.rst           |  279 ++++
 boards/arm/96b_carbon/doc/img/96b-carbon-front.png |  Bin 0 -> 1120451 bytes
 boards/arm/96b_nitrogen/doc/96b_nitrogen.rst       |  350 +++++
 .../96b_nitrogen/doc/img/96b-nitrogen-front.png    |  Bin 0 -> 335901 bytes
 .../arm/olimexino_stm32/olimexino_stm32_defconfig  |    3 +
 drivers/clock_control/Kconfig.stm32f4x             |    8 +-
 drivers/ethernet/eth_mcux.c                        |    4 +-
 drivers/gpio/Kconfig.stm32                         |   12 +
 drivers/gpio/gpio_stm32.c                          |  130 +-
 drivers/serial/Kconfig.stm32                       |    4 +
 drivers/serial/uart_mcux.c                         |   12 +
 drivers/spi/Kconfig                                |    2 +-
 drivers/spi/{Kconfig.mcux => Kconfig.mcux_dspi}    |    6 +-
 drivers/spi/Makefile                               |    2 +-
 drivers/spi/{spi_mcux.c => spi_mcux_dspi.c}        |    0
 drivers/timer/nrf_rtc_timer.c                      |   14 +
 dts/arm/Makefile                                   |    1 +
 dts/arm/olimexino_stm32.dts                        |   37 +
 dts/arm/olimexino_stm32.fixup                      |   24 +
 dts/arm/stm32f103xb.dtsi                           |  101 ++
 ext/hal/nxp/mcux/README                            |    2 +-
 ext/hal/nxp/mcux/devices/MK64F12/MK64F12.h         |  548 ++++---
 .../nxp/mcux/devices/MK64F12/MK64F12_features.h    |  996 +++++-------
 ext/hal/nxp/mcux/devices/MK64F12/clock_config.c    |  369 +++--
 ext/hal/nxp/mcux/devices/MK64F12/clock_config.h    |   73 +-
 ext/hal/nxp/mcux/devices/MK64F12/fsl_clock.c       |  120 +-
 ext/hal/nxp/mcux/devices/MK64F12/fsl_clock.h       |  536 ++++---
 ext/hal/nxp/mcux/devices/MK64F12/system_MK64F12.c  |   26 +-
 ext/hal/nxp/mcux/devices/MK64F12/system_MK64F12.h  |   28 +-
 ext/hal/nxp/mcux/drivers/Makefile                  |    2 +-
 ext/hal/nxp/mcux/drivers/fsl_adc16.c               |   14 +-
 ext/hal/nxp/mcux/drivers/fsl_adc16.h               |   76 +-
 ext/hal/nxp/mcux/drivers/fsl_cmp.c                 |   14 +-
 ext/hal/nxp/mcux/drivers/fsl_cmp.h                 |   69 +-
 ext/hal/nxp/mcux/drivers/fsl_cmt.c                 |   33 +-
 ext/hal/nxp/mcux/drivers/fsl_cmt.h                 |   47 +-
 ext/hal/nxp/mcux/drivers/fsl_common.c              |  142 +-
 ext/hal/nxp/mcux/drivers/fsl_common.h              |  115 +-
 ext/hal/nxp/mcux/drivers/fsl_crc.c                 |   42 +-
 ext/hal/nxp/mcux/drivers/fsl_crc.h                 |   66 +-
 ext/hal/nxp/mcux/drivers/fsl_dac.c                 |   17 +-
 ext/hal/nxp/mcux/drivers/fsl_dac.h                 |   49 +-
 ext/hal/nxp/mcux/drivers/fsl_dmamux.c              |   14 +-
 ext/hal/nxp/mcux/drivers/fsl_dmamux.h              |   68 +-
 ext/hal/nxp/mcux/drivers/fsl_dspi.c                |  216 +--
 ext/hal/nxp/mcux/drivers/fsl_dspi.h                |  352 +++--
 ext/hal/nxp/mcux/drivers/fsl_dspi_edma.c           |  594 ++++---
 ext/hal/nxp/mcux/drivers/fsl_dspi_edma.h           |  112 +-
 ext/hal/nxp/mcux/drivers/fsl_edma.c                |  603 +++++++-
 ext/hal/nxp/mcux/drivers/fsl_edma.h                |  349 +++--
 ext/hal/nxp/mcux/drivers/fsl_enet.c                |  445 ++++--
 ext/hal/nxp/mcux/drivers/fsl_enet.h                |  283 +++-
 ext/hal/nxp/mcux/drivers/fsl_ewm.c                 |   14 +-
 ext/hal/nxp/mcux/drivers/fsl_ewm.h                 |   59 +-
 ext/hal/nxp/mcux/drivers/fsl_flash.c               | 1620 +++++++++++++++-----
 ext/hal/nxp/mcux/drivers/fsl_flash.h               |  965 +++++++-----
 ext/hal/nxp/mcux/drivers/fsl_flexbus.c             |   16 +-
 ext/hal/nxp/mcux/drivers/fsl_flexbus.h             |   17 +-
 ext/hal/nxp/mcux/drivers/fsl_flexcan.c             |  317 ++--
 ext/hal/nxp/mcux/drivers/fsl_flexcan.h             |  129 +-
 ext/hal/nxp/mcux/drivers/fsl_ftm.c                 |   74 +-
 ext/hal/nxp/mcux/drivers/fsl_ftm.h                 |  157 +-
 ext/hal/nxp/mcux/drivers/fsl_gpio.c                |   28 +-
 ext/hal/nxp/mcux/drivers/fsl_gpio.h                |  194 ++-
 ext/hal/nxp/mcux/drivers/fsl_i2c.c                 |  503 ++++--
 ext/hal/nxp/mcux/drivers/fsl_i2c.h                 |  187 +--
 ext/hal/nxp/mcux/drivers/fsl_i2c_edma.c            |  138 +-
 ext/hal/nxp/mcux/drivers/fsl_i2c_edma.h            |   55 +-
 ext/hal/nxp/mcux/drivers/fsl_llwu.c                |    4 +-
 ext/hal/nxp/mcux/drivers/fsl_llwu.h                |   87 +-
 ext/hal/nxp/mcux/drivers/fsl_lptmr.c               |   38 +-
 ext/hal/nxp/mcux/drivers/fsl_lptmr.h               |   89 +-
 ext/hal/nxp/mcux/drivers/fsl_mpu.c                 |  232 ---
 ext/hal/nxp/mcux/drivers/fsl_mpu.h                 |  495 ------
 ext/hal/nxp/mcux/drivers/fsl_pdb.c                 |   16 +-
 ext/hal/nxp/mcux/drivers/fsl_pdb.h                 |  126 +-
 ext/hal/nxp/mcux/drivers/fsl_pit.c                 |   14 +-
 ext/hal/nxp/mcux/drivers/fsl_pit.h                 |   39 +-
 ext/hal/nxp/mcux/drivers/fsl_pmc.c                 |    4 +-
 ext/hal/nxp/mcux/drivers/fsl_pmc.h                 |  124 +-
 ext/hal/nxp/mcux/drivers/fsl_port.h                |  159 +-
 ext/hal/nxp/mcux/drivers/fsl_rcm.c                 |    6 +-
 ext/hal/nxp/mcux/drivers/fsl_rcm.h                 |   35 +-
 ext/hal/nxp/mcux/drivers/fsl_rnga.c                |   10 +-
 ext/hal/nxp/mcux/drivers/fsl_rnga.h                |    7 +-
 ext/hal/nxp/mcux/drivers/fsl_rtc.c                 |   19 +-
 ext/hal/nxp/mcux/drivers/fsl_rtc.h                 |   47 +-
 ext/hal/nxp/mcux/drivers/fsl_sai.c                 |  196 ++-
 ext/hal/nxp/mcux/drivers/fsl_sai.h                 |  146 +-
 ext/hal/nxp/mcux/drivers/fsl_sai_edma.c            |   46 +-
 ext/hal/nxp/mcux/drivers/fsl_sai_edma.h            |    7 +-
 ext/hal/nxp/mcux/drivers/fsl_sdhc.c                |  502 +++---
 ext/hal/nxp/mcux/drivers/fsl_sdhc.h                |  219 +--
 ext/hal/nxp/mcux/drivers/fsl_sim.c                 |   56 +-
 ext/hal/nxp/mcux/drivers/fsl_sim.h                 |   69 +-
 ext/hal/nxp/mcux/drivers/fsl_smc.c                 |   56 +-
 ext/hal/nxp/mcux/drivers/fsl_smc.h                 |  113 +-
 ext/hal/nxp/mcux/drivers/fsl_sysmpu.c              |  249 +++
 ext/hal/nxp/mcux/drivers/fsl_sysmpu.h              |  435 ++++++
 ext/hal/nxp/mcux/drivers/fsl_uart.c                |  378 +++--
 ext/hal/nxp/mcux/drivers/fsl_uart.h                |  138 +-
 ext/hal/nxp/mcux/drivers/fsl_uart_edma.c           |   68 +-
 ext/hal/nxp/mcux/drivers/fsl_uart_edma.h           |   46 +-
 ext/hal/nxp/mcux/drivers/fsl_vref.c                |   70 +-
 ext/hal/nxp/mcux/drivers/fsl_vref.h                |   62 +-
 ext/hal/nxp/mcux/drivers/fsl_wdog.c                |    4 +-
 ext/hal/nxp/mcux/drivers/fsl_wdog.h                |   97 +-
 .../drivers/clock_control/stm32f4_clock_control.h  |   25 +-
 kernel/Kconfig                                     |    2 +-
 117 files changed, 10345 insertions(+), 6102 deletions(-)
 create mode 100644 boards/arm/96b_carbon/doc/96b_carbon.rst
 create mode 100644 boards/arm/96b_carbon/doc/img/96b-carbon-front.png
 create mode 100644 boards/arm/96b_nitrogen/doc/96b_nitrogen.rst
 create mode 100644 boards/arm/96b_nitrogen/doc/img/96b-nitrogen-front.png
 rename drivers/spi/{Kconfig.mcux => Kconfig.mcux_dspi} (92%)
 rename drivers/spi/{spi_mcux.c => spi_mcux_dspi.c} (100%)
 create mode 100644 dts/arm/olimexino_stm32.dts
 create mode 100644 dts/arm/olimexino_stm32.fixup
 create mode 100644 dts/arm/stm32f103xb.dtsi
 delete mode 100644 ext/hal/nxp/mcux/drivers/fsl_mpu.c
 delete mode 100644 ext/hal/nxp/mcux/drivers/fsl_mpu.h
 create mode 100644 ext/hal/nxp/mcux/drivers/fsl_sysmpu.c
 create mode 100644 ext/hal/nxp/mcux/drivers/fsl_sysmpu.h

Change-Id: I7e209c3e655e3ef9615ef2d1ae8075116a1ac53a
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-03-27 09:08:01 -05:00
Maureen Helm
aa9c14667b ext: mcux: Update to mcux 2.2 for k64
Updates the mcux drivers and device header files for the k64 from mcux
2.1 to mcux 2.2. Updates the k6x soc init and ethernet shim driver to
reflect mcux interface changes.

Origin: NXP MCUXpresso SDK 2.2
URL: mcux.nxp.com
Maintained-by: External

Change-Id: Icb578dddbe84c190e990b756193bef621010a898
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-27 09:05:58 -05:00
Maureen Helm
e0b56a7076 ext: mcux: Update to mcux 2.1 for k64
Updates the mcux drivers and device header files for the k64 from mcux
2.0 to mcux 2.1.

Origin: NXP MCUXpresso SDK 2.1
URL: mcux.nxp.com
Maintained-by: External

Change-Id: Ic83acfa91b575550c92ccc124d94ecd8fdac1f57
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-27 09:05:58 -05:00
Florian Vaussard
a57df869b4 serial: stm32: Properly put Kconfig options in their own submenu
Currently the entries for STM32 UART ports are at the same level than
the top menuconfig UART_STM32. As a result they are mixed with other
configs in the "Serial Drivers" menu.

Use if/endif grammar to put these entries under a dedicated STM32
submenu.

Change-Id: If28945204b801578d29f8cce7c2370ca3c2737a1
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
87960944d2 gpio: stm32: Add support for ports I to K
Add support for GPIO banks I to K that can be found on some high-density
STM32F4 products.

Change-Id: I2cb65ed4d4a2282f7d17478cb1fcdd65dffe71b0
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
52d663d49d gpio: stm32: Use macro to simplify registration
The registration of each GPIO bank differs by only few details. These
differences can be factorized in order to create a generic registration
macro.

This has several advantages:
- Less code
- Easier to add new banks
- Less work to add support for new STM32 families

The diff stat speaks for it-self: 26 insertions(+), 92 deletions(-)

Change-Id: I674752fda5ee3caefb815ccf070a1b636b16cf85
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
85b4ecabe8 clock: stm32f4: Add some missing clocks
Add several missing clocks that are used by other members of the STM32F4
family. This is needed to add support for various hardware, like UART9
and UART10 on STM32F413.

Change-Id: I6f1a04ddece90a04e31a1710065545179b0e530d
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
2304e0facf clock: stm32f4: Fix wrong BKPSRAM and CCMDATARAM clocks
It appears that enable bits for BKPSRAM and CCMDATARAM are incorrectly
defined as bit 14 and 16 on AHB1 respectively (when these IPs are present),
where we should use bit 18 and 20 according to the various reference
manuals (STM32F415 for instance).

Change-Id: I44ce59a29c57e306f6a945e46043efbcfce7a92f
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
33579adef9 clock: stm32f4: Fix range of CLOCK_STM32F4X_PLLN_MULTIPLIER config
The PLLN multiplier can range between 50 and 432 on all STM32F4, except
on the STM32F401 where the lower bound is restricted to 192.

Fix the range property and the help text to reflect this reality.

Change-Id: I7b93e84b321f7869aaf611287344cd3e25c893c8
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
9b6140eafc arm: stm32f4: Add FPU support
The Cortex-M4 of the STM32F4 family has an FPU. Enable the FPU support
by selecting CPU_HAS_FPU.

Change-Id: Iddae9c547df6e010562649eb0997dc61563c8fc4
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
0601d8ad2b arm: stm32f4: Fix comment in Kconfig
The comment refers to STM32F1 instead of STM32F4.

Change-Id: Ide116b712146f87a6f4d2aaafea8bd181c4d9397
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
632a07d987 gpio: stm32: Use atomic set/reset in stm32_gpio_set()
The current implementation of stm32_gpio_set() uses the GPIO output data
register to change the state of individual GPIOs. The generated
assembler needs at least 3 instructions: load / modify / store.

This opens a small race window, for example if a thread and an
interrupt both try to change the state of the same GPIO bank.

Use the GPIO bit set/reset register to perform the atomic change without
locking.

This also has the benefit of a more optimised implementation, which can
be useful for GPIO-intensive work. Compare the new version:

08000c98 <stm32_gpio_set>:
 8000c98:       f001 010f       and.w   r1, r1, #15
 8000c9c:       2301            movs    r3, #1
 8000c9e:       b902            cbnz    r2, 8000ca2 <stm32_gpio_set+0xa>
 8000ca0:       3110            adds    r1, #16
 8000ca2:       408b            lsls    r3, r1
 8000ca4:       6183            str     r3, [r0, #24]
 8000ca6:       2000            movs    r0, #0
 8000ca8:       4770            bx      lr

and the old one:

08000c98 <stm32_gpio_set>:
 8000c98:       2301            movs    r3, #1
 8000c9a:       f001 010f       and.w   r1, r1, #15
 8000c9e:       fa03 f101       lsl.w   r1, r3, r1
 8000ca2:       6943            ldr     r3, [r0, #20]
 8000ca4:       b10a            cbz     r2, 8000caa <stm32_gpio_set+0x12>
 8000ca6:       4319            orrs    r1, r3
 8000ca8:       e001            b.n     8000cae <stm32_gpio_set+0x16>
 8000caa:       ea23 0101       bic.w   r1, r3, r1
 8000cae:       6141            str     r1, [r0, #20]
 8000cb0:       2000            movs    r0, #0
 8000cb2:       4770            bx      lr

Change-Id: Ie5800d1c345016028d1b9a099f5d74cac35f592a
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Florian Vaussard
8fcb780034 kernel: arm: Increase idle stack size to fix corruption by FP_SHARING
When enabling CONFIG_FP_SHARING on ARM, 64 extra bytes are necessary
on the stack of each task in order to save FPU registers S16 to S31.

In the case of the idle stack, the default value of 256 bytes is too
small. As described in ZEP-1470, when the idle task is scheduled out,
floating point registers are saved, which corrupts the stack frame
(especially the saved PC value). When scheduling the idle task, the
restored PC will jump to nowhere, leading to a Usage Fault.

Increase the size of the idle stack by 64 bytes to fix this issue.

JIRA: ZEP-1470

Change-Id: Ib800cd51e5189dda8bf59332db661c21399db3e3
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-03-27 09:05:57 -05:00
Gustavo Denardin
ad235dc24b arm: UART driver modifications for MKL25Z soc support
Since all interrupts come in on the status line,
we only connect it for the KL2X.

Change-Id: Ia9e0d483fe68464a0eeab08c95a043260e5793b0
Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
2017-03-27 09:05:57 -05:00
Ricardo Salveti
51036ca5f4 nrf_rtc_timer: clear events and counter when disabling sys_clock
Clear pending IRQ when starting and restore back the RTC1 state when
disabling sys_clock, to avoid issues when soft rebooting the device or
chainloading another Zephyr image (e.g. mcuboot).

Change-Id: I693d9168196ad2cfb8475ecfa2051eac043b1fbd
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-03-27 09:05:57 -05:00
Ricardo Salveti
67f488b8f1 boards: add 96b_nitrogen board documentation
This patch adds documentation for 96b_nitrogen board.

Change-Id: I3e50d61cb9dd3e3a1afd242e53c74aae969ffdf0
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-03-27 09:05:57 -05:00
Ricardo Salveti
2df2790448 boards: add 96b_carbon board documentation
This patch adds documentation for 96b_carbon board.

Change-Id: I2ffa8dc0dab579306474887023275d85d9a168da
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-03-27 09:05:57 -05:00
Kumar Gala
83d8ffb2a0 spi: mcux: Rename spi driver to DSPI to match naming convention
In prep for supporting the older KL2x SoCs that use a different SPI
block, rename the current SPI driver to DSPI to match what the MCUX HAL
defines it as.

Change-Id: I9097580df5fca649ab6fd9a38212fced0b1ea6ed
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-03-27 09:05:57 -05:00
Yannis Damigos
fedf497b03 olimexino_stm32: Enable DT usage for OLIMEXINO STM32
This patch adds the necessary changes to enable use of DTS for
generating required build information.

Change-Id: I0d7aa15488339a425ffe57b6354992851212f7f3
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-03-27 09:05:57 -05:00
Yannis Damigos
a7b6d769d4 dts: arm: Add base DTS support for Olimexino STM32 board
This patch adds the base DTS files required to support DTS for the
STM32F103xB based Olimexino STM32 board.

Origin: Original

Change-Id: I2a20d3f3ce8b1d3c20fe92b2ffa584c69fbd96a5
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-03-27 09:05:57 -05:00
Gustavo Denardin
5295191b28 arm: IRQ number correction in the soc configuration
The previous file contained erroneous values of the number of IRQs
in these socs.

Change-Id: Ie7d2c19d86e247599f4924b95d9330175140d894
Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
2017-03-27 09:05:57 -05:00
Anas Nashif
f475d2cde9 samples: grove: remove duplicate config
Duplicate Kconfig variable in prj.conf causes warning

Jira: ZEP-1880
Change-Id: I941b36a17c550d7e64759ea3266da6957ec3e82c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-26 02:10:24 +00:00
Flavio Santes
c3f79e1d46 test/crypto: Update ECC DSA test case
The ECC DSA test case was updated in TinyCrypt 0.2.6.

Fix the length of the random vector.

Change-Id: I7545a51c6855959afdefe00a1e0b53e5c3001a7c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-25 15:42:13 +00:00
Flavio Santes
3692aed6a8 test/crypto: Update ECC DH test case
The ECC DH test case was updated in TinyCrypt 0.2.6.

This patch adds two helper arrays for the Monte Carlo routine.

Change-Id: If28292512b351feffc3fe470942cd97b18851a57
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-25 15:42:13 +00:00
Leandro Pereira
a50c1d0620 test: Add test for JSON library
This adds a test suite for the JSON library, testing both encoding and
decoding of all supported data types, including arrays, nested objects,
and basic types such as booleans, numbers, and strings.

Jira: ZEP-1607
Change-Id: I4f6ad7e2859a142e06d405e0760e91751e01a31f
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:55 +00:00
Leandro Pereira
262365c727 lib: json: Fix parsing of boolean values
Boolean values were being decoded using the descriptor type rather than
the value type.

Jira: ZEP-1607
Change-Id: I0c9324ee705af973ccf738e92785820c3a5fb692
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:55 +00:00
Leandro Pereira
4c7803b59f lib: json: Ignore spaces while scanning for tokens
The function to ignore spaces was not being called, so some tokens had
whitespace in the beginning.  They were correctly lexed, but parsing
could eventually fail.

Jira: ZEP-1607
Change-Id: I796596143895fa0fa652641f56af9a03e7a65b7a
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:54 +00:00
Leandro Pereira
844ef6744e lib: json: Fix number parsing
Comparing *endptr with '\0' will always be true before replacing
*token->end with prev_end.

Jira: ZEP-1607
Change-Id: I224129586e15380d3919bfba3db4fcf38c28cb07
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:53 +00:00
Leandro Pereira
122cdb3956 lib: json: Do not use translation tables to encode characters
It has been suggested in a review to use a simple function with a
switch statement instead of the table trick.

Jira: ZEP-1607
Change-Id: I5290de175021bfa8642334548ece8266d4c137f0
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:52 +00:00
Leandro Pereira
95ec49cb70 lib: json: Simplify lexing of "true", "false", and "null" tokens
Roll the loop in an accept_run() function and use it to match "rue" and
"alse" depending on the first character of the token.  Use that to lex
"ull" after finding "n" as well.  This reduces the code slightly.

Jira: ZEP-1607
Change-Id: Iec8ff6ae2fb79e7fe65d476d1574c5943d23e14f
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:52 +00:00
Leandro Pereira
b9b1c18cd7 lib: json: Add encoding support
Serializing an object in JSON is quite tricky to do by hand, and with
an array of descriptor structs, there's enough information to do that
programatically.

The encoder takes a callback function, so that one can be written to
write bytes to, for instance, a struct net_buf.  This way, there's no
guesswork to determine the buffer size, reducing the possibility of
overflowing the stack.

Jira: ZEP-1607
Change-Id: I5ccf1012e46c1db32fcfdf2ecee4a1ef44c927d5
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:51 +00:00
Leandro Pereira
67ac6f6701 lib: json: Parse nested objects and arrays
Parse arrays and nested objects.

Array parsing is limited to items of the same type, and requires an array
with fixed number of elements.  Elements can be of any type supported by
the parser, including arrays and objects.

The return value of json_obj_parse() won't be that helpful: the nth bit
will only be set if the object has been fully decoded.

Jira: ZEP-1607
Change-Id: I472e402ae3f36a1bd1505decc0313f74cbfa2e07
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-25 13:11:50 +00:00
Anas Nashif
0505c9c881 benchmarks: convert latency_measure to unified kernel
Change-Id: If92833d699b95f5a7e813d0577f5467b06d3a1b6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-25 12:38:50 +00:00
David B. Kinder
c096453f34 doc: fix installation on windows instructions
Add more installation details for building zephyr on Windows
including what to do with the ISSM tar.gz file that's
downloaded, proxy settings if behind a firewall, adding tar
to the dependencies (needed to extract the ISSM tar.gz file),
linking to the downloads page for the ARM toolchain, and
fixing command lines to correctly use `make BOARD=`. Verified
instructions work on a Windows 10 system.

Change-Id: I04e5f8e46df7630868568b90388dc65bb9baa4c9
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-25 12:36:14 +00:00
Anas Nashif
25aa9e8e36 tests: enable syslog for sensors
Change-Id: If866083d5707a83b1df0a3411f3a848fdf40dbcb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-25 12:00:30 +00:00
Anas Nashif
a53bc0eef0 sensors: sx9500: varables undeclared when in debug mode
Change-Id: I1625fffbe4c1d24b7976fe5b82dafc29e8ec8350
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-25 12:00:29 +00:00
Anas Nashif
2c04055970 Merge "Merge bluetooth branch into master" 2017-03-25 11:25:43 +00:00
Anas Nashif
8ec959a041 Merge "Merge net branch into master" 2017-03-25 11:25:33 +00:00