Commit graph

41120 commits

Author SHA1 Message Date
Carles Cufi
7480f17d50 doc: Change Makefile and doc for building docs to CMake
Now that CMake is supported for building the docs, adapt the
instructions to build the documentation to the new mechanism and also
adapt the root-level Makefile to support building using CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
ae69934cb9 doc: Support building with CMake
Add a new CMakeLists.txt that is capable of building the documentation.
Note that the error checkin currently only works on Unix platforms since
it's tied to a shell script.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
033f10d272 scripts: Print results from filter-known-issues.py
In order to get rid of doc/scripts/filter-doc-log.sh to make building
the documentation cross-platform, include the functionality in there in
the already existing filter-known-issues.py.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
b8dd6ac741 cmake: util: Add fmerge.cmake script
In order to merge multiple files into a single one, this convenience
script is provided to be able to do so at build time in a manner
compatible with all operating systems.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
ff5452ef5c cmake: util: Add process.cmake script
In order to be able to execute a process at build time (and not at
configure time) in a cross-platform manner while at the same time
redirecting stdout and stderr to files, add a script that wraps CMake's
execute_process() command.

The script can be invoked with identical parameters to execute_process()
but at build time, allowing CMake users to store stdout and stderr in
files in a way that works on all operating systems.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Ioannis Glaropoulos
2663147783 boards: arm: nrf: enable UARTE on nrf52810_pca10040
This commit enables the use of UARTE on Nordic nrf52810_pca10040
development kit. It also instruct console to use UARTE (instead
of RTT).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-12 00:41:50 +02:00
Aurelien Jarno
a32b66289a boards: arm: stm32f723e_disco: enable USB FS OTG
Enable the USB FS OTG at the DTS and pinmux level. Update the
documentation accordingly.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 16:28:10 -05:00
Aurelien Jarno
9107e3dac8 drivers: usb: add support for USB OTG FS on STM32F7
The STM32F7 uses the same USB OTG FS controller than the STM32F4 series.
It is therefore trivial to add support for it, by adding the DT fixup
and pinmux macros, and the DT entries in stm32f7.dtsi. Keep it disabled,
it should be enabled at the board level.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 16:28:10 -05:00
Ulf Magnusson
f6bf897780 kconfiglib: Add preprocessor and two warnings
Update Kconfiglib to upstream revision 547fced630611 to get a new
Kconfig preprocessor in, documented in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-macro-language.txt.

The preprocessor allows shell functions to be run directly from Kconfig.
Things like 'default "prefix-$(shell,some-cmd)' and
'depends on (success,some-cmd)' are supported.

The preprocessor might come in handy for Kconfig/DTS integration. I'm
thinking of extending it so that Python functions can be called as well.

There's also two new warnings:

 - Trying to use an int/hex symbol like a bool symbol in an expression
   (where it will always evaluate to n)

 - Having a 'default' on an int/hex symbol that lies outside an active
   'range'.

The parser is more strict now as well (due to dropping some hacks for 3+
year old kernel versions).

A related fix for scripts/kconfig.py is also included:

The comment above the whitelist lies. I accidentally changed the warning
text for the select-with-unsatisfied-dependencies warning while
generalizing it (for m-valued dependencies, which you'd never get in
Zephyr).

Update the whitelist to detect the new warning text.

Last-minute piggyback:

Include a change that improved the parse time for U-Boot from 4 seconds
to about 0.6 seconds, related to symbols defined in multiple locations.
It might be helpful for Zephyr as well, as it also uses a lot of symbols
defined in multiple locations.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-11 17:02:22 +02:00
Krzysztof Chruscinski
77b44df86a logging: Ensure constant side effects of log API
When log API is used it should give the same side effect when enabled
or disabled e.g. LOG_INF(%d,cnt++) should always increment cnt.
Before this change cnt would be incremented twice when log enabled
and never incremented when log was disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-11 10:56:36 -04:00
Krzysztof Chruscinski
d731e539ce logging: Handle 0 Hz frequency in log_output
It is possible that user provides 0 hz frquency to the log_output
(if CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=0). In that case timestamp
must not be formatted to avoid division by 0.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-11 10:56:07 -04:00
Aurelien Jarno
8d1664c2f7 arch: arm: mpu: enable WBWA caching on per thread user RAM
Update _get_region_attr_by_type used to set up the user regions
on a per thread basis to match the REGION_USER_RAM_ATTR macro. Caching
attributes were set "Outer and inner write-through. No write allocate.",
this patch changes it to "Outer and inner write-back. Write and read
allocate.".

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 10:55:31 -04:00
Aurelien Jarno
15d3dfa9b0 arch: arm: mpu: enable WT caching on Flash
Change the REGION_FLASH_ATTR macros to set the cache attributes on Flash
regions to "Outer and inner write-through. No write allocate.". This
matches the cache attributes used when the MPU is disabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 10:55:31 -04:00
Aurelien Jarno
06bb05533d arch: arm: mpu: enable WBWA caching on RAM
Change the REGION_RAM_ATTR macro to set the cache attributes on RAM
regions to "Outer and inner write-back. Write and read allocate". This
matches the cache attributes used when the MPU is disabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 10:55:31 -04:00
Aurelien Jarno
f5b00ff60e arch: arm: mpu: fix outer inner WBWA non-shareable macro
Fix NORMAL_OUTER_INNER_WRITE_BACK_WRITE_READ_ALLOCATE_NONSHAREABLE, the
bufferable bit should be set, while the shareable one should not be set.

At the same time, rename it from ..._NONSHAREABLE to _NON_SHAREABLE to
keep the same naming convention for all macro. Given it's not (yet)
used, it should not be an issue.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 10:55:31 -04:00
Aurelien Jarno
747b90c3da arch: arm: mpu: remove REGION_USER_RAM_ATTR macro
This is currently unused, and all the user regions are set up at runtime
on a per thread basis.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-07-11 10:55:31 -04:00
Florian Gärtner
793c254ecc boards: Add support for nRF52 Adafruit Feather
The Adafruit Feather nRF52 is based on an Nordic Semidconductor nRF52832
based development board with UART, SPI, LED and onboard lithium polymer
battery charger.

Signed-off-by: Florian Gärtner <florian.gaertner@ledcity.ch>
2018-07-11 16:51:10 +02:00
Krzysztof Chruscinski
67d6987324 logging: Fix fail when log locally disabled
When log is locally disabled then structures associated with the module
are not created. Logger API macros were evaluating those structues even
when log was disabled for given module. That resulted in compilation
error. Macros has been improved to not touch those structures when
log is disabled for given module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-11 10:31:59 -04:00
Spoorthi K
c6c811072f tests: kernel: Add description and group tests for doxygen
Updated test description for tickless test cases, grouped test cases
as per doxygen requirements and some uncrustify's cosmetic changes.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-07-11 10:20:53 -04:00
Spoorthi K
3e1c0bd386 tests: kernel: Add description and doxygen groups for workq
Update and rearrange doxygen groups and test description
for workq tests

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-07-11 10:18:04 -04:00
Spoorthi K
22ea79db70 tests: pending: Add description and RTM links
Add test description, doxygen and RTM links to tests
in pending

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-07-11 10:17:04 -04:00
Robert Lubos
ff0950a940 samples: net: Fix echo_client/echo_server TLS config files
Current config files for TLS qemu_x86 contain unrecognized
`CONFIG_RAM_SIZE`, which causes cmake to fail during project generation.
They  should not be needed anyway, as qemu_x86 defaults to 8 MB of RAM.
Additionaly, echo_client crashes in this configuration with default main
stack size, hence increase it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-07-11 15:44:46 +03:00
Jakub Rzeszutko
f733da8ded drivers: serial: nrf: Adopting define for UART driver.
Change define used to select interrupt driven functions
from CONFIG_UART_INTERRUPT_DRIVEN to CONFIG_UART_0_INTERRUPT_DRIVEN.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-07-11 10:03:03 +02:00
Jakub Rzeszutko
7449657e72 drivers: serial: nrf: Adding UARTE driver for the nRFx family
1. Added support for two instances of UARTE.

2. Kconfig.nrfx is capable to configure UART and UARTE driver.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-07-11 10:03:03 +02:00
Wayne Ren
1952c56e7d scripts: west: add nsim runner
add nsim runner in west

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-10 19:05:13 -04:00
Wayne Ren
8a528a797f drivers: serial: add virtual uart driver for nsim
In nsim, 'nsim_mem-dev=uart0,base=0xf0000000,irq=24'
is used to enable a virtual uart.

This uart is only used to output now, so only poll output
is implemented.

If required, input and interrupt driven are possible.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-10 19:05:13 -04:00
Wayne Ren
b6e41e715c boards: arc: add virtual board based on nsim
two configs are contained in this board

* nsim_em: em with arc MPUv2
* nsim_sem: em with arc SecureShield and MPUv3

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-10 19:05:13 -04:00
Wayne Ren
d27aadf941 arch: arc: add nsim support in soc
add nsim soc support, two configs are contained

* em with arc MPUv2
* em with arc SecureShield and MPUv3

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-10 19:05:13 -04:00
Kumar Gala
d76e39f8d3 arch: atmel_sam0: Fix Kconfig warnings
We were missing a few SOC_PART_NUMBER.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-10 15:28:32 -05:00
Sean Nyekjaer
4d3e13d1e0 boards: add board and DTS definitions for the SAMD20 Xplained Pro Board
Complete board specifications for the SAMD20 Xplained Board.

Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
2018-07-10 12:56:44 -05:00
Sean Nyekjaer
781a2f0275 arch: add support SAMD20 used in the SAMD20 Xplained Pro Board
This add basic support the SAMD20 inkl. SPI and UART

Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
2018-07-10 12:56:44 -05:00
Sean Nyekjaer
5a1bcc756c dts: arm: sam0: move contents samd21 to samd
samd21.dtsi includes now the same content need for SAMD20,
move it to samd.dtsi and include it from samd21.dtsi.
Then later USB support can be added to the samd21.dtsi seperatly
from the samd20 etc.

Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
2018-07-10 12:56:44 -05:00
Sean Nyekjaer
31aaf07719 arch: atmel_sam0: move clk config options to common Kconfig
The SAMD0 Family have almost the same clock options.
The samd20 and samd21 only clocks is not implemented yet.

Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-10 12:56:44 -05:00
Sean Nyekjaer
cee31be6ff ext: Import Atmel SAMD20 header files from ASF library
Atmel Software Framework (ASF) provides a set of low-level header
files that give access to different hardware peripherals of Atmel's
ICs.

Origin: Atmel SAMD20 Series Device Support (1.2.91)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAMD20_DFP.1.2.91.atpack
Purpose: Introduction of ASF for the SAM0 series.
Maintained-by: External

Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
2018-07-10 12:56:44 -05:00
Christian Taedcke
899bdb1371 boards: arm: Add support for Silabs EFR32 SLWSTK6061A board
The EFR32 Flex Gecko Wireless Starter Kit contains sensors and
peripherals demonstarting the usage of the EFR32FG1P SoC
family. This patch add basic support for this board.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Christian Taedcke
e9e8bce91b drivers: serial: Adapt gecko uart driver for Silabs EFR32
The gecko usart driver can now also handle the usart peripheral.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Christian Taedcke
9ac99a28c5 drivers: gpio_gecko: Adapt driver for Silabs EFR32 MCUs
The EFR32 does not have DOUTSET and DOUTCLR registeres.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Christian Taedcke
6d5206e7b0 arm: exx32: Add additional include to efm32wg soc.h
This keeps the efm32wg soc.h in sync with the efr32fg1p soc.h.
This include is currently not necessary, but will be for further
peripheral drivers.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Christian Taedcke
496b799474 arm: exx32: Add Silabs EFR32FG1P soc files
The Silicon Labs EFR32FG1 Flex Gecko MCU includes:
	* Cortex-M4F core at 40MHz
	* up to 256KB of flash and 32KB of RAM
	* integrated Sub-GHz and/or 2.4GHz radio
	* multiple low power peripherals

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Christian Taedcke
7689e9dc3e ext: Integrate Silabs EFR32FG1P Gecko SDK into Zephyr
This patch integrates EFR32FG1P support into the build
infrastructure of Zephyr.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Christian Taedcke
e634b25f20 ext: gecko: Add Silabs Gecko SDK for EFR32FG1P SoCs
This includes:
* the Gecko SDK files for the EFR32FG1P 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

To update the Gecko SDK, download the current version from the given URL
and replace the following folders:
* Gecko_SDK/platform/Device/ should replace ext/hal/silabs/gecko/Device/
* Gecko_SDK/platform/emlib/ should replace ext/hal/silabs/gecko/emlib/

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00
Adithya Baglody
e67720bbf2 syscalls: Scan multiple folders to build complete syscall list
Previously the syscall list was generated only from the include
folder. This is a limitation when the application tries to create
system calls. This patch create a simple way to include these
new syscalls without the application touching the kernel.

This can be enabled by a Kconfig CONFIG_APPLICATION_DEFINED_SYSCALL.
Once enabled the application source directory will be scanned to
find all application defined syscalls.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-07-10 10:22:04 -07:00
Maureen Helm
530a71310e arm: nxp: mpu: Consolidate k64 mpu regions
Reduces the number of mpu regions statically reserved at boot time by
one, giving a total of five. We originally sought to reduce the total to
three: 1 background region with lowest precendence for supervisor r/w, 1
flash region, and 1 sram region. However, the nxp mpu hardware does not
give precedence to any region over another, and thus we cannot revoke
access from the background region with a higher priority region. This
means we cannot support hardware stack protection with a single
background region.

Instead, create two background regions that cover the entire address
space, except for sram.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-10 12:46:04 -04:00
Kumar Gala
f0450fc423 nrf52: dts: Force user to explicitly set UART0 compatible
Since the UART0 @ 0x40002000 can either be UART or UARTE the user of the
soc.dtsi needs to select either compatible = "nordic,nrf-uarte" or
"nordic,nrf-uart"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-10 08:54:30 -05:00
Kumar Gala
b3d34d2e4c arch: arm: nrf52: Support UARTE defines in dts.fixup
If we select UART0 as UARTE we will get different defines from the
generation script.  Support both UART and UARTE for UART0.  Also fixup
UART1 defines since this will always be UARTE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-10 08:54:30 -05:00
Ioannis Glaropoulos
f93b3d1947 arch: arm: fix linker script title comment
Fix the title comment in the linker.ld script for ARM, to
make it clear that this is the common linker script for all
Cortex-M based platforms.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-10 09:12:42 -04:00
Ulf Magnusson
ef1544301f boards: arduino_101_mcuboot: Remove Kconfig settings moved to DTS
The PHYS_LOAD_ADDR Kconfig symbol was removed by commit b8ea7c889d
("x86: remove HAS_DTS checking"). The ROM_SIZE Kconfig symbol was
removed by commit e524f0b846 ("dts: x86: derive RAM and ROM size from
dts instead of Kconfig").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-10 08:17:20 -04:00
Jakub Rzeszutko
c8a2131743 drivers: serial: nrf: Adding missing baud rates to UART driver
Add missing baudrates supported by Nordic HAL:
 - NRF_UART_BAUDRATE_31250
 - NRF_UART_BAUDRATE_56000

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-07-10 13:51:34 +02:00
Jakub Rzeszutko
101d493622 drivers: serial: nrf: Use nrfx GPIO HAL to properly handle pins from P1
The dependency on the GPIO driver was a bit artificial, since the UART
driver used the GPIO API functions only to configure the pins at its
initialization. This configuration will be done by using nrfx GPIO HAL
functions directly, just like in case when a shim is using
an nrfx driver underneath.

HAL functions can be fed with the absolute pin numbers, that are
currently used for Nordic SoCs in Kconfig and DT, and for the GPIO
driver an additional translation would be required, to extract
the port and its relative pin number.

UART driver has to be initialized at PRE_KERNEL_1 (because of the
console using it) and currently the GPIO driver is initialized
at POST_KERNEL stage, so calling its API function form the UART
initialization routine was incorrect.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-07-10 13:51:34 +02:00
Jukka Rissanen
cb00061cbe net: dhcpv4: Use less parameters in debug print
Having 24 parameters in a debug print is a bit extreme especially
as it is causing warning from new logger. Split the debug print
to three pieces each having 8 parameters which is more reasonable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-10 12:37:31 +03:00