Commit graph

41120 commits

Author SHA1 Message Date
Carles Cufi
ff0b76ea4a samples: usb: console: Remove overlay file
After the removal of the virtualcom DT node in 5071eee, using the chosen
node is no longer functional. Instead the Kconfig
CONFIG_UART_CONSOLE_ON_DEV_NAME is used to locate the correct UART.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-22 16:20:11 +02:00
Carles Cufi
0928b1dde6 boards: nrf52840_pca10059: Enable ADC in DT
Enable the ADC in the basic DT configuration.

Fixes #17671

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-22 16:20:11 +02:00
Ulf Magnusson
0ec0c84808 dts: bindings: Remove unused 'version' field
No binding has anything but 'version: 0.1', and the code in scripts/dts/
never does anything with it except print a warning if it isn't there.
It's undocumented what it means.

I suspect it's overkill if it's meant to be the binding format version.
If we'd need to tell different versions from each other, we could change
some other minor thing in the format, and it probably won't be needed.

Remove the 'version' fields from the bindings and the warning from the
scripts/dts/ scripts.

The new device tree script will give an error when unknown fields appear
in bindings.

The deletion was done with

    git ls-files 'dts/bindings/*.yaml' | xargs sed -i '/^\s*version: /d'

Some blank lines at the beginning of bindings were removed as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-22 09:28:07 -04:00
Jan Van Winkel
6b8433bd33 samples: fs: Added libfuse req. to fs shell README
Updated fs shell sample readme to state the requirement of a 32-bit
version of libfuse while building for native_posix board

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-22 15:08:36 +02:00
Mariusz Glebocki
c189993028 boards: litex_vexriscv: Enable LiteEth driver
Enable liteeth device in litex_vexriscv board.

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-07-22 15:28:54 +03:00
Mariusz Glebocki
35edfedf68 drivers: ethernet: Add LiteEth driver
Add LiteX Ethernet driver with bindings for this device.

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-07-22 15:28:54 +03:00
Vinayak Kariappa Chettimada
6cf26b8fe6 Bluetooth: controller: Make ULL/LLL split the default
Make the Upper and Lower Link Layer split architecture
implementation of the controller as the default when
building Zephyr Bluetooth Low Energy controller support
in applications.

Noticeable missing feature (porting) in comparison to old
architecture implementation is, Advanced scheduling of
connection events.

The missing features will subsequently be submitted
upstream.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-07-22 14:23:42 +02:00
Vinayak Kariappa Chettimada
fb8166ad26 Bluetooth: mesh: Use legacy LL for microbit build
Use legacy LL until RAM utilization is optimized in the new
LL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-07-22 14:23:42 +02:00
Vinayak Kariappa Chettimada
f4eb03c538 Bluetooth: controller: Rename BT_LL_SW to BT_LL_SW_LEGACY
Rename the controller Kconfig option BT_LL_SW to
BT_LL_SW_LEGACY in preparation towards switch to new Link
Layer implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-07-22 14:23:42 +02:00
Peter A. Bigot
312f05eaef subsys/fs: add implementation helper module
File system API functions that operate on paths are passed both the
absolute path including the mount point prefix, and the mount point
within which the path lies.

Unfortunately it's not entirely trivial to convert an arbitrary path
within the file system space to an absolute path within its mount point,
because the path may be to the mount point itself and not end with a
directory separator.  The effect is that a file system implementation
like nffs may be given an empty path when "/" is required.

Add an implementation module that does this transformation and use it to
transform paths within each filesystem wrapper.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-22 12:46:50 +02:00
Vinayak Kariappa Chettimada
60bf4da4aa Bluetooth: controller: split: Conditional compile LL Rx pool use
Conditional compile the use of Rx Pool used to dispatch ULL
context generated messages towards LL thread context, which
is presently only used in connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-07-22 12:34:49 +02:00
Jan Van Winkel
400cafe7bb drivers: sdl: Added support to set def pix format
Added support to SDL display driver to set default pixel format through
Kconfig.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-22 12:33:32 +02:00
Markus Becker
3178555878 net: openthread: Allow DHCP configuration of OpenThread in Zephyr
Certain Thread implementations (notably ARMs) require a DHCPv6
implementation.
Allow the usage of the relevant OpenThread configuration parameters in
Zephyr.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2019-07-22 13:23:05 +03:00
Ulf Magnusson
efae1a5e10 dts: riscv32: rv32m1: Disable unused interrupt multiplexers
Commit 948ef47cf4 ("dts: riscv32: Add rv32m1 zero-riscy core") put
common ri5cy and zero_riscy DT parts in rv32m1.dtsi, with two separate
rv32m1_ri5cy.dtsi rv32m1_zero_riscy.dtsi files that #include it.

The two interrupt multiplexers are defined in the common rv32m1.dtsi
file, but rv32m1_ri5cy.dtsi rv32m1_zero_riscy.dtsi each only specify
'interrupts' for one of them. Since 'interrupts' is 'category: required'
in openisa,rv32m1-intmux.yaml, this leads to warnings (or errors with
the new DT parser).

Disable (status = "disabled") the two interrupt multiplexers in the
common rv32m1.dtsi file and enable them in the board-specific files to
fix it. Required props. are only checked for enabled nodes.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-20 17:23:20 -04:00
Peter A. Bigot
1bb59bb68e dts: add label property to all jedec,spi-nor nodes
The property is required on all SPI clients, but was missing from
several devicetree nodes.  Set it, using the capitalized version of the
node alias when present, with "jedec,spi-nor#0" as the fallback.

Closes #17662

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-20 17:23:08 -04:00
Piotr Zięcik
e7ed47966a dts: bindings: fixed-clock: Make label optional
In most of the cases the fixed-clock node is not referenced by the
Zephyr code, making the label property just a burden.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-20 17:22:21 -04:00
Kumar Gala
3c8f8cb256 dts/arm/microchip: Mark uart & i2c nodes as disabled by default
Have the SoC dtsi files for microchip mark the devices (uart & i2c) as
disabled by default and let the board dts files enable which one's they
need/use (which is what's happening already).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-20 17:21:01 -04:00
Andrew Boie
39425eaada assert: generate oops if invoked from usermode
User mode isn't allowed to generate a panic and this would
lead to a confusing privilege violation exception.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-20 08:29:39 -04:00
Kumar Gala
2d9032e5d0 boards/arm/v2m_musca_b1: Add missing label to timer node
The binding for arm,cmsdk-timer requires a label so add it into the dts
since its missing on v2m_musca_b1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-20 08:27:23 -04:00
Ulf Magnusson
b3a042a040 boards/arm/mps2_an521: Add missing timer labels to dts
The bindings for arm,cmsdk-{d}timer requires a label so add it into the
dts since its missing on mps2_an521.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-20 08:26:44 -04:00
Jan Van Winkel
00d6fe49b2 drivers: ssd16xx: Removed blanking support
Removed blanking_on and blanking_off support from SSD16XX driver as it
is not supported.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-20 08:25:59 -04:00
Jan Van Winkel
42d1899087 driver: display: Clarified blanking API
Updated the documentation of display_blanking_on and
display_blanking_off to clarify its usage.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-20 08:25:59 -04:00
Ulf Magnusson
4bf7ceaa11 dts: bindings: Do not require 'interrupts' on STM32 GPIO nodes
I'm guessing STM32 GPIO nodes don't generate interrupts, because I can't
find any device tree nodes with 'compatible = "st,stm32-gpio"' and an
'interrupts' property.

Remove the required 'interrupts' property from the binding. This fixes a
bunch of errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-19 10:59:46 -04:00
Ulf Magnusson
ad3ee99756 dts: Add missing spi-max-frequency for mimxrt/nxp/hifive1/qemu_riscv2
spi-max-frequency is marked as required in
dts/bindings/mtd/jedec,spi-nor.yaml.

I took the value from the datasheets (133 MHz for all), and guessed that
a dummy entry is fine for QEMU.

Fixes some errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-19 10:46:01 -04:00
Kumar Gala
fd62a50255 dts/bindings: Fix category field for microchip,xec-i2c
The port_sel property had the category set to 'define' which isn't a
valid option.  Change it to be 'required'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-19 10:43:50 -04:00
Ulf Magnusson
b9ef4a2546 dts: bindings: simplify !include in jedec,spi-nor
No need to use an array when !including a single binding.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-19 10:39:19 -04:00
Piotr Zięcik
33c9acf114 dts: bindings: nxp,kinetis-usbd: Make clocks property optional
This commit makes the clock property optional (through base.yaml),
as clock reference is not used in the code.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-19 10:35:54 -04:00
Mariusz Skamra
8b27af58eb Bluetooth: tester: Change RPA timeout
This changes RPA timeout so that the address is changed every 60
seconds. This change is needed to speed up privacy related test cases.
Currently, the new RPA was initiated on request that was a bit hackish
and could be done via BT_RPA_TIMEOUT Kconfig option.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2019-07-19 16:28:13 +03:00
Ioannis Glaropoulos
6c4fdc61ef tests: kernel: fp_sharing: increase robustness of float_disable test
This commit make the float_disable test suite more robust
for fast CPUs, by replacing k_sleep(1) with k_yield(), as
the mechanism to trigger thread swap-out during the test
execution. In the wake of using k_yield(), the test, now,
fixes the priorities of all testing threads to 0, making
the test behavior more deterministic with respect to
thread scheduling. The patch doesn't change the functional
behavior of the test.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-07-19 12:11:38 +02:00
Alberto Escolar Piedras
fece6907b4 arch: POSIX: Fix race with unused threads
Fix a race which seems to have been presenting itself
very sporadically on loaded systems.
The race seems to have caused tests/kernel/sched/schedule_api
to fail at random on native_posix.

The case is a bit convoluted:
When the kernel calls z_new_thread(), the POSIX arch saves
the new thread entry call in that new Zephyr thread stack
together with a bit of extra info for the POSIX arch.
And spawns a new pthread (posix_thread_starter()) which
will eventually (after the Zephyr kernel swapped to it),
call that entry function.
(Note that in principle a thread spawned by pthreads may
be arbitrarily delayed)
The POSIX arch does not try to synchronize to that new
pthread (because why should it) until the first time the
Zephyr kernel tries to swap to that thread.
But, the kernel may never try to swap to it.
And therefore that thread's posix_thread_starter() may never
have got to run before the thread was aborted, and its
Zephyr stack reused for something else by the Zephyr app.

As posix_thread_starter() was relaying on looking into that
thread stack, it may now be looking into another thread stack
or anything else.

So, this commit fixes it by having posix_thread_starter()
get the input it always needs not from the Zephyr stack,
but from its own pthread_create() parameter pointing to a
structure kept by the POSIX arch.

Note that if the thread was aborted before reaching that point
posix_thread_starter() will NOT call the Zephyr thread entry
function, but just cleanup.

With this change all "asynchronous" parts of the POSIX arch
should relay only on the POSIX arch own structures.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-07-19 11:37:34 +02:00
Mariusz Skamra
1074efd3cd Bluetooth: tester: Update to recent conn param related changes in BTP
This updates tester application to recent changes in BTP related
to Connection Parameters Update.
Connected event has been extended with connection parameters.
Connection Parameters Update command and event have beend added to
initiate and track current connection parameters.
Needed to automate qualification test GAP/CONN/CPUP/BV-06-C

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2019-07-19 11:24:11 +02:00
Alexander Wachter
63157529b3 boards: arm: Activate DTCM for STM32F7 boards with Ethernet
Activate the DTCM for STM32F7 board that have Ethernet.
This is needed because the Ethernet driver puts the DMA buffer
to this section.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-19 10:05:46 +02:00
Alexander Wachter
0fbaaa1350 drivers: ethernet: stm32: Put DMA buffer to DTCM section
For STM32F7 MCU the actual implementation doesn't work when the
DMA buffers are placed in the SRAM.
This might be a problem with caches.
To overcome this problem, the buffer is moved to the DTCM.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-19 10:05:46 +02:00
Alexander Wachter
fbfb56b331 dts: stm32f7: Add Device Tightly Coupled Memory
This commit adds the DTCM to the STM32F7 MCUs

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-19 10:05:46 +02:00
Alexander Wachter
b4c5f4b32b linker: Add dtcm section for Cortex M7 MCUs
This commit adds a DTCM (Device Tightly Coupled Memory) section for
Cortex F7 MCUs. The Address and length is defined in the corresponding
device tree file.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-19 10:05:46 +02:00
Krzysztof Chruscinski
1f046f9943 logging: Removing redundant code from xtensa sim backend
Refactored xtensa sim backend to use standard backend functions

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-18 18:16:39 -04:00
Krzysztof Chruscinski
20483961a8 logging: Removing redundant code from UART backend
Refactored UART backend to use standard backend functions

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-18 18:16:39 -04:00
Krzysztof Chruscinski
65b47f89c2 logging: Removing redundant code from SWO backend
Refactored SWO backend to use standard backend functions

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-18 18:16:39 -04:00
Krzysztof Chruscinski
9768f7826b logging: Removing redundant code from RTT backend
Refactored RTT backend to use standard backend functions

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-18 18:16:39 -04:00
Krzysztof Chruscinski
519c77d1e2 logging: Add qemu_x86_64 backend
Added backend for qemu_x86_64

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-18 18:16:39 -04:00
Krzysztof Chruscinski
9fa60f0307 logging: Add header with common log backend functions
Simple backends, like UART or RTT, implementation is very similar.
Header has functions which can be reused by simple backends and
remove redundant code.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-18 18:16:39 -04:00
Anas Nashif
2a1682e7b3 doc: scheduler: add diagrams illustrating scheduler
Add some diagrams showing the different scheduling algorithms we
support.

The diagrams were made using draw.io and can be edit using draw.io.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-18 18:07:17 -04:00
Anas Nashif
9058ef167d doc: move schedling doc to its own section
Move scheduler documentation to its own section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-18 18:07:17 -04:00
Wentong Wu
be2c937368 target_relocation.cmake: fix spell typo
fix spell typo in target_relocation.cmake.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-07-18 11:09:48 -04:00
Wentong Wu
fa7ce3ff70 scripts: make mpu align in sections for code reloation
make mpu align inside sections instead of outside to avoid
overlap for code relocation feature.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-07-18 11:09:48 -04:00
Wentong Wu
e51c2095cd linker: move scripts generated code at the beginning of .text
When code relocation enabled, there will be serval regions holding
text. And then there will be function call between these .text
regions, when distance between caller and callee is too far, linker
will automatically generate and insert veneer functions. And these
veneer functions will be located right after the last instruction
in the .text region by the linker. So these code will be put in the
memory reserved for priv_stacks text and kobject text if they don't
consume all the reserved memory. Or the veneer functions will be put
before the reserved memory if there isn't code in the reserved
memory. And then in the user mode building process, there will be
different memory layout and it will cause usr mode not working.
And moving the memory reserved for priv_stacks text and kobject text
at the beginning of .text will avoid above problem. The detailed
analysis for this issue can be found on Github issue #17038.

Fixes: #17038.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-07-18 11:09:48 -04:00
Carver Forbes
9d42858821 drivers/counter_cmos.c: Add config struct
Added config struct to enable use of generic API functions.

Signed-off-by: Carver Forbes <carver.forbes@gmail.com>
2019-07-18 11:06:20 -04:00
Kumar Gala
ad183ce6af dts/bindings: Mark 'rdc' as optional in nxp,imx-gpio
Since the nxp,imx-gpio binding is shared between i.MX and i.MX-RT SoC
the 'rdc' property needs to be optional (as it doesn't make sense on the
RT SoCs).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-18 11:02:23 -04:00
Carles Cufi
9754201e04 west: Load CMakeCache.txt as a UTF-8 encoded file
CMake has been using UTF-8 as an encoding for CMakeCache.txt since 3.2.

Fixes #17635

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-18 16:50:08 +02:00
Carles Cufi
3ad1f27efc cmake: Encode and decode in UTF-8 in build system
In order to make sure that the build works in folders that require a UTF
encoding, make sure that both CMake and the various Python scripts that
interact with each other on files use the same encoding, in this case
UTF-8.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-18 16:50:08 +02:00