Commit graph

18968 commits

Author SHA1 Message Date
Andrzej Głąbek c84c2eaa82 ext: nordic: Add initial adaptation layer for nrfx
This commit adds a glue layer that adapts nrfx to be usable in Zephyr
as a host environment and files with static configuration of nrfx
drivers for several supported SoCs.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-01-29 03:02:06 +05:30
Andrzej Głąbek f06c000911 ext: nordic: Import relevant files from nrfx 0.8.0
nrfx is an extract from the nRF5 SDK that contains solely the drivers
for peripherals present in Nordic SoCs, for convenience complemented
with the MDK package containing required structures and bitfields
definitions, startup files etc.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v0.8.0
commit: b7cfe970b45ad7cc9c36b62ee620508e9e2c7fb5
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-01-29 03:02:06 +05:30
Jukka Rissanen 37f54c11fa samples: net: perf: Add sample for throughput measurement
Add a simple UDP server application that will receive UDP data
and print various statistics like number of packets received and
dropped, amount of bytes received, and how many packets / sec
we were able to receive.

Currently the sample only provides a config file for FRDM-K64F board.
Note that this sample should not be run in QEMU as the performance
is very bad there because of SLIP link between Linux host and QEMU.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-01-29 01:57:41 +05:30
Michael Hope f9ebe62b3c samples: update the blinky sample to work with the Arduino Zero.
The GPIO unit on the SAM0 is called 'PORT' which conflicts with the
name used in this sample.  Rename to LED_PORT instead.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-29 01:41:41 +05:30
Daniel Wagenknecht 3f2b376cd6 dts: stm32l4: move dts.fixup to soc family level
This moves and merges the existing board-level dts.fixup files
for STM32 L4 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

disco_l475_iot1 boards fixup blocks for devices connected via SPI
and I2C stay in board level dts.fixup file, because they are board
specific.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-01-28 10:35:30 -06:00
Daniel Wagenknecht 080fe4d4cf dts: stm32f3: move dts.fixup to soc family level
This moves and merges the existing board-level dts.fixup files
for STM32 F3 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-01-28 10:35:30 -06:00
Daniel Wagenknecht 285c9506d5 dts: stm32f1: move dts.fixup to soc family level
This moves and merges the existing board-level dts.fixup files
for STM32 F1 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-01-28 10:35:30 -06:00
Daniel Wagenknecht d76858f6ae dts: stm32f4: move dts.fixup to soc family level
This moves and merges the existing board-level dts.fixup files
for STM32 F4 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

96b_carbon boards fixup block for Bluetooth HCI device via SPI
stays in board level dts.fixup file, because it is board specific.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-01-28 10:35:30 -06:00
Daniel Wagenknecht be430a05cb dts: stm32f0: move dts.fixup to soc family level
This moves and merges the existing board-level dts.fixup files
for STM32 F0 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-01-28 10:35:30 -06:00
Kumar Gala 2dfee62a5e drivers: flash: atmel sam0: Convert to use device tree
Convert Atmel SAM0 flash driver to use device tree to get the flash
controller name and base address.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-27 21:09:28 -06:00
Kumar Gala 0d48cbe13e sanitycheck: default to assertions being enabled
Changed the default behavior for when we run sanitycheck to match the -R
flag that turns on assertions.  Introduced a --disable-asserts option if
we desire to explicitly turn of asserts.

This matches behavior that our CI builds have been doing and addresses
part of #5726.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-27 05:18:10 +05:30
Kumar Gala da2f7ddc09 dts: add support for application level dts.fixup
We allow the application to have its own dts.fixup.  The main use for
this right now is for the build all test to define dummy values for
defines we expect to be generated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-26 12:20:38 -06:00
Daniel Wagenknecht d6bedd7c55 boards: arm: add support for STM32F072B-DISCO
Support the ST STM32F072B-DISCO discovery board with
STM32F072RB SoC

Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
2018-01-26 09:57:44 -06:00
Daniel Wagenknecht aacd802fbe pinmux: stm32f0: add additional defines for I2C2
Adds pinmux defines to use I2C2 at PB10/PB11 for
stm32f0-based boards.
Needed for stm32f072b_disco board to use extension
connector

Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
2018-01-26 09:57:44 -06:00
Richard Osterloh da87e159af boards: arm: Add I2C support to nucleo_f411re
Add the required changes to support i2c on the Nucleo F411RE

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2018-01-26 09:30:29 -06:00
Kumar Gala dc98605f4a drivers: flash: stm32: Convert to use device tree
Convert STM32 flash drivers to use device tree to get the flash
controller name and base address.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-26 09:25:57 -06:00
Vinayak Kariappa Chettimada f5d64aafaa Bluetooth: controller: Fix CPR initiation while in Enc. setup
Fixes a bug where in Connection Parameter Request was
initiated by slave role while Encryption Setup had been
started by the peer master.

Fixes: #5823

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-01-26 11:35:17 +01:00
Johann Fischer daa83f8823 usb: mass_storage: rework and cleanup logging
This patch reworked logging so that the logging levels are more
finely graded and the locations with non-critical error handling
(below usb_ep_set_stall's) are logged with SYS_LOG_WRN.
Also cleanup, add log domain and fix indents.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-01-26 08:35:08 +05:30
Ding Tao bbd307edfd arch: arm: vector_table: Support vector table soft relay
For SoCs that don't support vector table relocation in hardware, may not
support bootloader like mcuboot.

We introduce a way to relocate vector table in software by forwarding
the control of incoming IRQs to a new vector table which address is save
at fixed SRAM address.

User can change the data in that fixed SRAM address in order to relocate
vector table in software way.

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-01-26 06:57:28 +05:30
Ding Tao bf949b0647 arch: arm: Add SW_VECTOR_RELAY Kconfig flag
Eanble soft relay IRQ handler for Cortex-M0 target if this flag set
true.

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-01-26 06:57:28 +05:30
Ding Tao e28db91acf arch: arm: stm32f0: Enable CONFIG_CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP
Enable this flag for all stm32f0 series in order to support hardware
vector table relocation feature.

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-01-26 06:57:28 +05:30
Ding Tao 0be502e68f arch: arm: Add CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP Kconfig flag
Cortex-M0 do not have the Vector Table Base Address Offset Register, so
Cortex-M0 vector table address can not be changed.

But in some Cortex-M0 SoCs like STM32F0 series, they have some mechanism
that can remap the vector table address to the start address of SRAM.

Use this flag to indicates whether current Cortex-M0 SoC support such a
remap or not.

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-01-26 06:57:28 +05:30
Kumar Gala b0768ec66a arm: nordic: remove last references to CONFIG_SOC_FLASH_NRF5_DEV_NAME
We use FLASH_DEV_NAME everywhere now so we can remove the use of
CONFIG_SOC_FLASH_NRF5_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Kumar Gala 44141f6939 arm: nordic: Refactor dts.fixup files to SoC vs board
Refactor common dts.fixup for the SoC into the SOC_SERIES dts.fixup
file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Kumar Gala 26e4da52cf arm: nordic: flash: Use FLASH_DEV_NAME define
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic.  So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Neil Armstrong 7474ad6286 boards: arm: Add stm32f072-eval board support
Add the STM32F072-EVAL Board minimal support.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-25 15:13:53 -06:00
Neil Armstrong c406b95c40 drivers: clock_control: simplify CLOCK_STM32_PLL_PREDIV1 config
Remove SoCs part dependency of CLOCK_STM32_PLL_PREDIV1 config since
it will only be used on parts having an HSE oscillator, ignored
otherwise.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-25 15:13:53 -06:00
Neil Armstrong d9c00b4e68 arch: arm: soc: provide support for stm32f072
Support the ST STM32F072xB SoC.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-25 15:13:53 -06:00
Vinayak Kariappa Chettimada 4d7d9de342 Bluetooth: controller: Refactor LL up and downstream interface
Rename some legacy upstream and downstream interfaces in
radio_* namespace to ll_* namespace for consistency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-01-25 22:09:17 +01:00
Kumar Gala 4ddb81f803 dts: arm: st: Add Flash Controller Nodes for STM32{F0,F3,F4,L4}
Introduce flash controller nodes for STM32 SoCs that are supported in
the flash driver.  This is a precusor to converting the flash driver on
stm32 over to using device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 09:02:52 -06:00
Carles Cufi 90a45d2eca soc: nrf51: Define flash driver name for nRF51
In order to be able to build MCUboot for nRF51 we require the flash
driver name in the nRF51 soc.h header.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-25 14:41:22 +01:00
Alberto Escolar Piedras cf81893344 native: Corrected board name in config short description
Corrected the board name in the configuration short
description string. It was the old Simple_process name which was
replaced with native_posix

Corrected also the comment/title in the "Board Options" menu

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-01-25 18:54:26 +05:30
Alberto Escolar Piedras dd968b97ea native: fixed configuration warning
The native SOC Kconfig file was still referring to the old
configuration option SOC_INF_CLOCK which was replaced with
SOC_POSIX.
This produced a warning on configuration which is now fixed

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-01-25 18:54:26 +05:30
Vinayak Kariappa Chettimada 5b0cd2c69b Bluetooth: controller: Conditional compile BT_LL_SW variant
Refactor Kconfig and CMakelists.txt to be able to
conditionally compile in BT_LL_SW variant in the controller
subsystem. This is done to support future controller with
vendor specific variant implementations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-01-25 11:51:10 +01:00
Vinayak Kariappa Chettimada ae9f5b38d0 Bluetooth: controller: Add missing CPR and DLE cond. compilation
Add missing conditional compilation in controller's HCI
implementation, removing redundant code being compiled in.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-01-25 11:16:45 +01:00
Vinayak Kariappa Chettimada 5f4a7ea119 Bluetooth: shell: Support a non-connectable build
Add conditional compilation and move code to support
building a non-connectable Bluetooth shell application.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-01-25 10:51:54 +02:00
Kumar Gala 1502092802 boards: 96b_nitrogen: Fix building of bluetooth/init/test_controller
When we updated the Nordic SoCs for getting flash controller label/name
from dts, we missed updating the 96b_nitrogen/dts.fixup file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 01:52:42 -06:00
Kumar Gala 9a87b8535e tests: benchmarks: latency_measure: Fix build issue with abs()
We now have a define for abs() in stdlib, so we can remove the version
implemented in the test.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 01:27:22 -06:00
Kumar Gala b452e1bbbb dts: add support for soc family level fixups
We duplicate a lot of fixup info per board which could be done at the
SoC family level.  So introduce the concept of DTS_SOC_FIXUP_FILE which
we default to arch/<ARCH>/soc/<SOC_FAMILY>/<SOC_SERIES>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 01:06:27 -06:00
Jimmy Huang 4a243ffce9 arch: arc: use default optimization flag
The work-around previously setting ARC builds to use -O2 to fix an
ADC bug #3797 is no longer needed, we should this patch and revert
to the default -Os flag to optimize for smaller size.

Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2018-01-25 07:56:58 +05:30
Anas Nashif 39caff5ca1 sanitycheck: use re.search to match output
Account for cases where there is a prefix to the output where exact
matching does not work.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 2fd36fac81 native_posix: enable coverage by default
To get coverage data from all samples and tests, enable this by default.
Right now we only get coverage data from tests, however many samples we
currently have can run natively and can generate more coverage and
testing.

This should be removed once we have tests provide better coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 1a67aed51f samples: crypto: remove DEBUG/ASSERT from prj.conf
Those are added by sanitycheck, no need to have them enabled in the
project by default.

CONFIG_DEBUG is causing issues on qemu_nios2, see #5743.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 2eb443f2d8 samples: philosophers: test different configurations
The demo can be configured to use different object types for its
synchronization, so test all of them.

The demo can also be configured to work with static objects or dynamic
objects, byt default the demo uses dynamic objects, add a test for
static objects.

Also, the demo can be configured to work with threads of the same
priority or not, so enable both options for testing

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 6de0dfad51 samples: event_logger: match more lines during sanitycheck
Have the test run for long by matching more lines in the output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 3a0a592583 samples: hello_world: disbale asserts on single thread (REVERTME)
For some reason, single thread is stuck when asserts are enabled.

This is tracked in #5733.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 40188a8449 samples: exclude some platforms due to bug [REVERTME]
Do not build for some unsupported architecture and exclude ARM qemu
platform due to bug #5735.

STACK_ALIGN 0x8
MPU STACK GUARD Test
Canary Initial Value = 0xf0cacc1a threads 0x200010e0
Canary = 0x20000240    Test not passed.
***** BUS FAULT *****
  Executing thread ID (thread): 0x200010e0
  Faulting instruction address:  0x209c
  Imprecise data bus error
Fatal fault in thread 0x200010e0! Aborting.
***** HARD FAULT *****
  Fault escalation (see below)
***** BUS FAULT *****
  Executing thread ID (thread): 0x200010e0
  Faulting instruction address:  0x1f4
  Imprecise data bus error
Fatal fault in ISR! Spinning...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 5124711d87 native: ignore format-truncation warnings (REVERTME)
This is enabled by default in GCC 7, disable for now. Tracked in
issue #5732

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif e76de53202 test: mbedtls: remove while loop
Remove useless while loop from test, it serves no purpose.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 04035d19bc tests: nfc_hello: remove filter and support harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30