Commit Graph

532 Commits

Author SHA1 Message Date
Sebastian Bøe 1b86fb9da3 cmake: Use variables for target names
There is an effort underway to make most of the Zephyr build script's
reentrant. Meaning, the build scripts can be executed multiple times
during the same CMake invocation.

Reentrancy enables several use-cases, the motivating one is the
ability to build several Zephyr executables, or images, for instance a
bootloader and an application.

For build scripts to be reentrant they cannot be directly referencing
global variables, like target names, but must instead reference
variables, which can vary from entry to entry.

Therefore, in this patch, we replace global targets with variables.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-01-19 07:21:55 -05:00
Anas Nashif 15a5fedca7 qmsi: remove handling of qmsi library
Use built-in by default. We do not use external library of QMSI anymore
and rely on integrated HAL. Remove this option and simplify HAL
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 06:50:04 -05:00
Maureen Helm d7dfa21391 drivers: i2c: Introduce mcux lpi2c shim driver
Adds a shim layer around the mcux lpi2c driver to adapt it to the zephyr
i2c interface. This shim driver leverages heavily from the mcux i2c shim
driver because the MCUXpresso SDK provides similar APIs for the i2c and
lpi2c peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Ioannis Glaropoulos 2ae3b04c53 ext: hal: nordic: add nrfx misc for nRF9160
This commit introduces compile definitions for nrfx, and
lets the build compile in system_nrf9160.c, when building
for nrf9160 SoCs.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-16 12:30:19 +01:00
Aurelien Jarno 074f8a0a26 soc: nxp_imx: Add support for TRNG
Add support for the TRNG device contained in the i.MX RT SoCs. It uses
the existing MCUX driver, and mostly consists in adding the Kconfig and
DTS entries.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-01-10 21:22:15 -06:00
Maureen Helm a9389da038 soc: nxp_imx: Add support for device configuration data (DCD)
Adds support for the device configuration data (DCD), which provides a
sequence of commands to the imx rt boot ROM to initialize components
such as an SDRAM.

It is now possible to use the external SDRAM instead of the internal
DTCM on the mimxrt1020_evk, mimxrt1050_evk, and mimxrt1060_evk. Note,
however, that the default board configurations still link data into
internal DTCM, therefore you must use a device tree overlay to override
"zephyr,sram = &sdram0"

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-09 16:01:25 -06:00
Maureen Helm 8e3004953d soc: nxp_imx: Add support for external xip flash boot header
Adds support for the boot data, image vector table, and FlexSPI NOR
config structures used by the imx rt boot ROM to boot an application
from an external xip flash device.

It is now possible to build and flash a bootable zephyr image to the
external xip flash on the mimxrt1020_evk, mimxrt1050_evk, and
mimxrt1060_evk boards via the 'ninja flash' build target and jlink
runner. Note, however, that the default board configurations still link
code into internal ITCM, therefore you must set CONFIG_CODE_HYPERFLASH=y
or CONFIG_CODE_QSPI=y explicitly to override the default. You must also
set CONFIG_NXP_IMX_RT_BOOT_HEADER=y to build the boot header into the
image.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-09 16:01:25 -06:00
Maureen Helm 7bc187e428 ext: mcux: Import SDK 2.5.0 evkmimxrt1020 board support
Imports board-level support for external xip flash and sdram from
MCUXpresso SDK 2.5.0.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-09 16:01:25 -06:00
Ryan QIAN 7cd79d8207 ext: hal: nxp: mcux: add device files for RT1020
Add mcux 2.5.0 soc drivers and header files for mimxrt1021.

Origins: NXP MCUxpresso SDK 2.5.0
URL: mcuxpresso.nxp.com
Maintained-by: External

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
2019-01-09 11:39:31 -06:00
Piotr Mienkowski 3369a9639b ext: same70: Add missing PMC_SR_PCKRDY3 define
PMC_SR_PCKRDY3 is required to enable PCK3 clock used by the ETM/TPIU
module.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-01-09 15:30:59 +01:00
Andrei Gansari f6d3f6b92b mimix1050rt: gPTP build fix
Sets iMX RT's cmake and fixup to enable gPTP in MCUX_ETH.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2019-01-09 07:57:18 -06:00
Piotr Mienkowski aa2c27d007 soc: silabs_exx32: Add independent Kconfig options for HAL libraries
Zephyr gecko drivers depend on libraries provided by the vendor. The
same libraries may also be used directly by the application code or
RAIL library. To facilitate the latter use case scenario this commit
adds Kconfig options to independently enable compilation of vendor
HAL library modules.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-01-08 13:31:42 -06:00
Maureen Helm 011a88c744 ext: mcux: Update to MCUXpresso SDK 2.5.0
Updates the MCUXpresso SDK to version 2.5.0 for applicable SoCs.
Wireless (KW*) and legacy (KL25) SoCs were not included in this
MCUXpresso SDK release and are therefore not updated here.

New in this release is SoC-level and board-level support for external
xip flash in the i.MX RT family.

For RT1050, we are now using the MCUXpresso SDK for the EVKB version of
the board, which correponds to an upgrade from A0 to A1 silicon.
However, we don't yet have Kconfigs in place to support A1 silicon part
numbers, and therefore add a simple cmake hack to convert A0 part
numbers to A1 part numbers.

The SDK flash driver interface also changed slightly in this release,
and thus the zephyr flash shim driver is updated accordingly.

Origin: MCUXpresso SDK
License: BSD 3-Clause
URL: mcux.nxp.com
Purpose: Provide device header files and bare metal peripheral drivers
for Kinetis, LPC, and i.MX SoCs.
Maintained-by: External

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-03 17:25:28 -05:00
Maureen Helm 1ad71108fc ext: mcux: Enhance import script to include external xip flash support
Devices with external xip flash like the rt1050 and rt1060 have
additional support files in the MCUXpresso SDK. Enhance the mcux import
script to pick up these files.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-03 17:25:28 -05:00
Maureen Helm 1870910797 ext: mcux: Update import script for fsl_iomuxc
Updates the mcux import script to place fsl_iomuxc.* files into the
device-specific folder rather than the shared driver folder.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-03 17:25:28 -05:00
Maureen Helm fb55f00a9a ext: mcux: Refactor import script
Refactors the mcux import script to streamline some repetitious code.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-03 17:25:28 -05:00
Maureen Helm 36669e5d82 ext: mcux: Remove duplicate fsl_iomuxc.h
This file was moved into a device-specific folder in commit
282d95f655 but inadvertantly added back to
the imx driver folder in commit
a4633da9f5.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-03 17:25:28 -05:00
Anas Nashif 52b23a3b08 ext: fix path to source files with new cmake
New cmake does not like source files not relative to current directory.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-03 11:51:29 -05:00
Sebastian Bøe 2f85b2fca8 kconfig: libmetal: Have LIBMETAL_SRC_PATH depend on LIBMETAL
Kconfig options are often either of the type 'feature' or
'configuration'. Meaning, either an option controls whether a feature
is enabled, or it adjusts/configures an already enabled feature.

Configuration of features should depend on the feature they are
configuring or else noise is created both in the Kconfig output and in
the Kconfig menu.

In this commit we add a dependency from a configuration option to it's
feature option.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-30 16:24:50 -05:00
Aurelien Jarno ef9361fca0 ext: lib: crypto: Update mbedTLS 2.16.0
Since 2.14.1 release mbedTLS has a few API changes and deprecation which
do not affect the Zephyr code and a new MBEDTLS_CHECK_PARAMS option that
enables validation of parameters in the API. A list with all changes can
be found in:

  ./ext/lib/crypto/mbedtls/ChangeLog

Note that this version will become the basis of the next LTS (Long Term
Support) branch that will be maintained for the next 3 years until at
least the end of 2021.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-12-30 15:55:01 -05:00
Aurelien Jarno 68086c09ad ext: lib: crypto: Update mbedTLS 2.14.1
Since 2.12.0 release mbedTLS has an important security fix concerning
RSA PKCS#1 v1.5 decryption (CVE-2018-19608). Besides that it has very
few API changes, and the usual set of functional improvements, security
fixes and bug fixes. A list with all changes can be found in:

  ./ext/lib/crypto/mbedtls/ChangeLog

It should also be noted that the small change concerning _POSIX_C_SOURCE
applied to x509.c has been moved to platform_util.c, this time with a
proper define guard.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-12-28 11:39:18 -05:00
Robert Lubos e8620e2cca ext: mbedtls: Unify mbedTLS Kconfig prefixes
Currently there is a mixed approach in prefixes from mbedTLS
configuration (MBEDTLS_ and TLS_). The latter was used in generic config
file and could bring up confusion that it can only be used with TLS
subsystem. Hence unify the approach to MBEDTLS_ prefix to avoid such
confusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-12-17 11:27:02 +01:00
Robert Lubos 41d57db4ac ext: mbedtls: Extend generic config file
Extend generic mbedTLS config file with additional algorithms. Add
separate RNG section. Add switches to enable all algorithms in specific
group.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-12-17 11:27:02 +01:00
Simen Tinderholt 8f56e8e681 ext: nordic: mdk: Set UICR HFXOCNT value to 0x20 if erased
This is a temporary fix in one of the MDK files that is a part of nrfx
and it is expected to be replaced with the final solution in the next
update of nrfx.

Signed-off-by: Simen Tinderholt <Simen.Tinderholt@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-13 07:35:28 -06:00
Andrzej Głąbek d3154768f1 ext: hal: nordic: Update nrfx to version 1.5.0
Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.5.0/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.5.0
commit: 2f4572bd2ae640a6140959f39de282e9f58c739c
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-13 07:35:28 -06:00
Endre Karlson 91c4d20214 arm: silabs: Enable DCDC before setting up clk
This enables DCDC for Silabs devices before initializing the
clock.

Signed-off-by: Endre Karlson <endre.karslon@gmail.com>
2018-12-07 13:55:31 -06:00
Pawel Dunaj e344e5752c ext: debug: segger: Fix SEGGER header inclusion
Fix issue caused by 3fc497ac9a

This change removes `rtt` and `systemview` from header includes
as these are already placed in the path.

Also `SEGGER_SYSVIEW_ConfDefaults.h` header included from
`SEGGER_SYSVIEW_Int.h` is placed higher to make sure `INLINE`
definition is properly visible.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2018-12-05 14:35:42 +01:00
Sigvart M. Hovland 3fc497ac9a ext: debug: segger: Add missing include directories
Fix #11812 by adding include paths to the `CMakeLists.txt`

Signed-off-by: Sigvart M. Hovland <sigvart.hovland@nordicsemi.no>
2018-12-04 13:46:27 +01:00
Håkon Øye Amundsen bd2edd0eac ext: segger: Use system include directive for configuration header.
By using system include directive, we allow
the user to place external SEGGER_RTT_conf.h files to the
include path in order to override the zephyr version.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 13:45:49 +01:00
Andrzej Głąbek b7b6e65885 ext: hal: nordic: Update nrfx to version 1.4.0
Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.4.0/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.4.0
commit: 595e79f63f21224f6a42325095be9940a4a62ffb
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-03 17:56:15 +01:00
Andrzej Głąbek dc7e8a9898 ext: hal: nrfx: Import soc/nrfx_coredep.h from nrfx 1.3.1
This is a follow-up to commit b45fcc6b9e.
The nrfx import is complemented with the file containing
a core-dependent delay function. The intention is to allow it
to be used in a custom k_busy_wait() implementation.

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

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-26 15:47:09 +01:00
Christian Taedcke 90473af3cb ext: gecko: Update Silabs Gecko HAL to v5.6.1
Origin: Silicon Labs Gecko SDK
URL: https://www.silabs.com/products/development-tools/software/simplicity-studio
Version: v5.6.1
Purpose: Add support for Silicon Labs EXX32 SoCs
License: Zlib
Maintained-by: External

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-11-22 07:57:19 -06:00
Christian Taedcke 4466460be4 ext: gecko: Add workaround in em_emu.h
For the EFM32PG12B, the define _EMU_EM23PERNORETAINCTRL_VDAC0DIS_MASK
is not availabe. This commit guards its usage with ifdefs.
This might be a bug in the gecko SDK or some version incompatibility
in the used files.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-11-21 13:42:26 -06:00
Gil Benkö 655251ec4f ext: Integrate Silicon Labs Gecko SDK for EFM32PG12B into Zephyr
This adds the paths of the necessary parts of the SDK to the
build infrastructure files.

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
2018-11-21 13:42:26 -06:00
Gil Benkö f0c7695348 ext: gecko: Add Silabs Gecko HAL for EFM32PG12B SoCs
This includes the Gecko HAL files for the EFM32PG12B SoCs

Origin: Silicon Labs Gecko SDK
URL: https://github.com/SiliconLabs/Gecko_SDK
Version: v5.1.2 (SHA: 938464c68e6c3b2237388a692f767bb0767ec010)
Purpose: Add support for Silicon Labs EXX32 SoCs
License: Zlib
Maintained-by: External

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
2018-11-21 13:42:26 -06:00
Ioannis Glaropoulos 78c0d98967 ext: hal: cmsis: Update ARM CMSIS headers to version 5.4.0
Origin: ARM CMSIS v5.4.0
License: Apache-2.0
URL: https://github.com/ARM-software/CMSIS_5.git
commit: 0b521765067ac87b142cd96b5f578ffb399090cc
Purpose: CMSIS Headers update.
Maintained-by: External

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-11-21 12:31:56 -05:00
Andrei Gansari a5174be648 mimxrt1050_evk: enabling networking hardware
Enables Networking hardware on i.MX-RT 1050-EVKB board.
Pinout enabled board specific etherenet connection, also pin
initialization was moved later to PRE_KERNEL_2 in order to have
sysclock initialized before.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-11-20 09:54:25 -06:00
Stanislav Poboril ba3ed24f3d imx: Add IMX IPM driver for i.MX socs
Add driver for i.MX Messaging Unit peripheral which can be used for
i.MX6SoloX, i.MX7D and other i.MX socs.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2018-11-19 08:38:38 -06:00
Andrzej Głąbek 20202902f2 dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script  created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Kumar Gala a3d869c7ef ext: qmsi: Remove dead code related to undefined Kconfig symbols
CONFIG_ADC_QMSI and CONFIG_ADC_QMSI_SS aren't defined anywhere so
remove the dead CMake references to them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-10 15:18:24 -05:00
Piotr Mienkowski d9e2171aa9 drivers: flash_gecko: Add flash driver for SiLabs Gecko SoCs
Tested with SLWSTK6061A / BRD4250B wireless starter kit.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-11-08 17:56:44 -05:00
Christopher Métrailler 9b39be1147 ext: hal: nordic: Add missing peripherals in Kconfig
Peripheral drivers are already available but cannot be enabled trough
Kconfig. This allow project to use nrfx drivers.

Signed-off-by: Christopher Métrailler <christopher.metrailler@nordicsemi.no>
2018-11-06 16:12:55 -05:00
Jonas Norling ac960bf91b ext: hal: nordic: Make it possible to build NRFX GPIOTE and PPI
This makes it possible for the application to enable building of the
GPIOTE and PPI subsystems in NRFX.

Signed-off-by: Jonas Norling <jonas.norling@greeneggs.se>
2018-11-06 17:18:20 +01:00
Pavel Kral 564f02ec0e drivers: rtt: fix no return statement in rtt_init
Add missing return statement to rtt_init function.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-11-06 11:47:15 +01:00
Sebastian Bøe c4266a8cd2 cmake: Move MDK-defines from 'soc' to the MDK build script
The build script ext/hal/nordic/CMakeLists.txt manages the MDK
dependency. The MDK is not aware of Zephyr and uses it's own defines
to indicate what HW we are building for.

This commit moves these MDK-specific defines out of the 'soc' build
scripts and into the MDK build script where they belong.

This is expected to be a pure refactoring without side-effects.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-04 22:03:01 +01:00
Szymon Janc 18d9cd8831 ext: lib: mgmt: mcumgr: update to latest master
This patch introduce version which add two new features:
 - ability to resume partial upload
 - option to not compile taskstat and echo commands

Origin: mcumgr
License: Apache 2.0
URL: https://github.com/apache/mynewt-mcumgr
Commit: 6251689367fcfe92898b90978b877a242b6e4b24
Purpose: New features
Maintained-by: External

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-11-04 22:01:56 +01:00
Kumar Gala 501283e9bf ext: hal: nxp: lpc: Remove board.h include
The lpc startup HAL ext code doesn't need anything from board.h so
lets remove the include.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-01 13:15:18 +01:00
Diego Sueiro 4ce6555c1d drivers: Introduce Silabs i2c shim driver
Adds the I2C shim driver for Silabs Gecko Devices.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-31 09:00:38 -05:00
Diego Sueiro 3b0260939c drivers: Introduce Silabs leuart shim serial driver
Adds the Low Energy UART shim serial driver for Silabs Gecko Devices.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-31 09:00:38 -05:00
Pavel Kral a19726ee1e logger: console: init rtt only once
As RTT is used by more subsystem in Zephyr, initialization is moved
from RTT console and RTT logger backend to common kernel init phase.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00