Commit graph

42565 commits

Author SHA1 Message Date
Andries Kruithof f434beb2bf doc: Coding Guideline: correct reference for rule 18.6 examples
Rule 18.6 has the examples split in two files. This PR adds
the correct reference to the example files in the gitlab
repository

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-07-22 12:43:08 +02:00
David Leach 5803ec1bf0 arch: arm: mpu: Use temporary MPU mapping while reprogramming NXP MPU
Race conditions exist when remapping the NXP MPU. When writing the
start, end, or attribute registers of a MPU descriptor, the hardware
will automatically clear the region's valid bit. If that region gets
accessed before the code is able to set the valid bit, the core will
fault.

Issue #20595 revealled this problem with the code in region_init()
when the compiler options are set to no optimizations. The code
generated by the compiler put local variables on the stack and then
read those stack based variables when writing the MPU descriptor
registers. If that region mapped the stack a memory fault would occur.
Higher compiler optimizations would store these local variables in
CPU registers which avoided the memory access when programming the
MPU descriptor.

Because the NXP MPU uses a logic OR operation of the MPU descriptors,
the fix uses the last descriptor in the MPU hardware to remap all of
dynamic memory for access instead of the first of the dynamic memory
descriptors as was occuring before. This allows reprogramming of the
primary discriptor blocks without having a memory fault. After all
the dynamic memory blocks are mapped, the unused blocks will have
their valid bits cleared including this temporary one, if it wasn't
alread changed during the mapping of the current set.

Fixes #20595

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-22 11:27:40 +02:00
Erwan Gouriou 60f1d70fa3 buildkite: Increase timeout
Some jobs require more than 120 minutes to complete.
But 180 appears to be long enough.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-22 11:02:40 +02:00
Kumar Gala 49d32fbb67 samples: adxl362: Fix building sample with sanitycheck
Tweak sample.yaml so we at least build this sample on one platform.

Fixes #16790

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-22 10:26:54 +02:00
Kamil Kasperczyk f061400b37 net: openthread: platform: Removed double-buffering in UART send.
Putting data to local buffer before transmission was removed
to optimize operation. Local buffering was not needed, as passed
buffer cannot be modified until sending is finished.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-07-22 11:08:21 +03:00
David Leach 1b192df030 samples: drivers: Fix unitialized spi_cfg in spi_fujitsu_fram sample
Fixes #19670

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-22 09:59:51 +02:00
Peter Bigot 0d480e78f8 settings: disallow modifying the content of a subtree name
There may be value in being able to rename a subtree, but there is no
identified need to be able modify the text of an assigned subtree
name.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-21 21:54:40 -04:00
Ningx Zhao 06ce1e4c32 tests: stack modifying and adding test case
1.Add some comments to describe functions performance
2.add a new testcase to implement push can be waited
when there are no items available.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2020-07-21 21:54:11 -04:00
Andrei Emeltchenko d8b845be4e sanitycheck: Add serial_pty script command line option
Add option to provide to sanitycheck argument for creating
pseudoterminal. Used with hardware without serial console connected.
A pseudoterminal is used to make a sanitycheck believe that it
interacts with a terminal although it actually interacts with the
script.

E.g "sanitycheck --device-testing --device-serial-pty <script>"

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-21 20:19:33 -04:00
Scott Worley 38028063e7 manifest: hal_microchip: Add eSPI SAF support
Add eSPI SAF support to MEC15xx including SAF
changes to eSPI and QMSPI.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2020-07-21 17:57:22 -04:00
Henrik Brix Andersen 80c2a751ff boards: arm: twr_ke18f: enable edma
Enable eDMA on the NXP TWR-KE18F development board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Henrik Brix Andersen 02027126f8 soc: arm: nxp: ke1xf: enable edma support
Enable eDMA support.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Henrik Brix Andersen c66aca20b4 dts: arm: nxp: ke1xf: add edma devicetree node
Add eDMA devicetree node to the NXP KE1xF SoC devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Henrik Brix Andersen 381a1cfcd2 drivers: dma: mcux_dma: add support for the NXP KE1xF
Add support for the NXP KE1xF SoC to the eDMA driver. The KE1xF supports
m2m DMA transfers from sources 60 to 63.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Henrik Brix Andersen c89ef2f393 drivers: dma: mcux_emda: only enable nocache memory if supported
Only enable CONFIG_NOCACHE_MEMORY if supported by the SoC.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Alexander Kozhinov 08b557ee24 boards: nucleo_h745zi_q: added ethernet support
KConfig.defconfig: enabled NETWORKING support
pinmux.c: added ethernet pins definition for this board
m7 yaml file becomes netif:eth support enabled

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Alexander Kozhinov 92727e9846 drivers: ethernet: stm32: add stm32h7 support
add DTCM caching management in KConfig for stm32h7
add NOCACHE_MEMORY support for stm32h7 M7 CPU series
add HAL_RCC_EX support for stm32h7 series
implemented stm32h7 support within stm32 eth driver

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Alexander Kozhinov ec25fa8592 drivers: ethernet: stm32: pre-add stm32h7 support
added changes that apply to other than stm32h7 series
and prepares stm32h7 series integration:

eth_tx/eth_rx: changed type of total_len
added necessary defines for
    tx_desc and own flag extractions
added read_eth_phy_register() function
    and corresponding defines
added ETH_DMA_MEM and CACHE defines
following memory buffers declarations moved out of
    its ifdef preprocessor macro:
        dma_rx_desc_tab, dma_tx_desc_tab,
        dma_rx_buffer, dma_tx_buffer
added hal_ret stm32 HAL status checks

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Alexander Kozhinov 3ad1f91a80 drivers: pinumx: stm32: pinmux_stm32h7: added ethernet pins
added ethernet pins definition for stm32h7 SoC series

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Jan Van Winkel adecdd5d43 driver: display: Added extra asserts to SDL display
Added extra asserts to write function of SDL display driver to check if
write is within bounds.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-07-21 15:12:05 +02:00
Jan Van Winkel 814f94e053 driver: display: Added asserts to write of dummy driver
Added asserts to write function of dummy display driver to check if
write is within bounds

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-07-21 15:12:05 +02:00
Jan Van Winkel 1130dc9f90 gui: Set actual display size when using static buffers
Set actual display size, obtained via the display driver, when using
static rendering buffers. If the actual screen size is not set an
out-of-bound write could occur in case the maximum resolution settings
for LVGL are larger than the actual screen resolution.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-07-21 15:12:05 +02:00
Kamil Kasperczyk cb41255e3f logging: added new logging backend - Spinel protocol
New logging backend that can be used by NCP architecture.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-07-21 15:11:55 +02:00
David D cf582284f7 logging: always add ids_print() to prefix even when using net backend
When using net log backend,
    adding severity and function name to log message.
    The log module name is a useful information when looking
    at log entries. This way remote log entries will
    contain the log module name.

Signed-off-by: David D <a8961713@gmail.com>
2020-07-21 15:09:13 +02:00
Vincent Wan 0d2f5a788a samples: sockets: echo_async: add IPv6 support for TI CC32xx
On TI CC32xx, the same port number cannot be bound to different
sockets. Instead, when an IPv6 socket is bound it can handle both IPv4
and IPv6 connections.

Signed-off-by: Vincent Wan <vwan@ti.com>
2020-07-21 15:08:56 +02:00
Vincent Wan 53f408afe8 drivers: wifi: simplelink: enable IPv6 support
IPv6 support was not fully implemented in the driver and was disabled.
This commit completes the implementation and enables it when
configured.

Signed-off-by: Vincent Wan <vwan@ti.com>
2020-07-21 15:08:56 +02:00
Robert Lubos d20b1aebf9 net: lwm2m: Fix poll fds handling
Currently, functions for poll sock_fds array management are buggy, in
case there is another socket open (for instance the socket for firmware
update download), it could get overwritten, if the LwM2M socket was
closed and re-opened in a meantime (e. g. on registration timeout).

Fix this, by appending new entries to the sock_fds in continuous manner.
In case of removal, the deleted entry is overwritten by the last one,
and the last one is cleared.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-21 15:08:14 +02:00
Robert Lubos b080dfbd12 net: lwm2m: Fix block transfer retransmissions
During FW update, the application expects a consecutive data stream.
Therefore retransmitted blocks shall not be forwarded to the
application, but ignored. In case blocks are received out of order,
return an error and do not handle this block.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-21 15:08:02 +02:00
Robert Lubos 69ca589256 net: lwm2m: Fix opaque data transfer in block mode
When FW update in PUSH mode is used, the firmware is encapsulated in the
TLV as an opaque data, according to the LMWM2M satandard, and then
sliced into blocks and transferred block by block in several
transactions. Therefore, the TLV header is only present in the initial
message.

Current implementation did not handle this case well, reporting errors
on consecutive blocks, therefore making the FW update in PUSH mode
broken.

This commit fixes this issue with following changes:
 * The TLV is only assumed to be present in the initial block, while
   consecutive blocks will be processed directly into the appropriate
   handler,
 * 32-bit variables shall be used whenever dealing with the opaque data
   length, since the firmware size can easily exceed the 16-bit range,
 * Additional information, required for the FW block transfer to work
   properly were added to the block context structure,
 * The application shall only be notified of the actual data length, and
   not the total block size (the total TLV size including header).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-21 15:08:02 +02:00
Robert Lubos daf303e660 net: lwm2m: Fix unused return value from sys_mutex calls
Fixes coverity issues 211473 and 211477.

Fixes #26988
Fixes #26989

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-21 12:40:40 +02:00
David D e023928e57 logging: Fixing timestamp calculation when using NEWLIB
corrected seconds value for gmtime() when using LOG_BACKEND_NET and
    NEWLIB_LIBC

Signed-off-by: David D <a8961713@gmail.com>
2020-07-21 10:29:04 +02:00
Lukasz Maciejonczyk 6edf5bde11 net: config: Fix IPv6 setup when DAD is unused and IPv6 addr is not set
When the dupplicate address detection mechanism is not used, we should
not wait for IPv6 address configuration. Because of the bug we are
waiting for it, when CONFIG_NET_CONFIG_MY_IVP6_ADDR is not set.
This commit fixes it.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2020-07-21 10:11:32 +03:00
Hake Huang 30ce64d543 test: dma: avoid useing flash as dma source address
avoid to use the flash address as dma source,
to avoid flash cache issue
this is fix to issue #26812

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-07-20 18:01:04 -05:00
Anas Nashif 3aa7d7fc16 boards: qemu_x68_nommu: run only kernel/userspace tests
Run only kernel and userspace tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-20 17:44:16 -04:00
Anas Nashif e8e367ada4 sanitycheck: support only_tags for boards
Support running/building only specific tags and ignoring everything
else.

Adding this to a platform yaml file will enable tests with one of of
tags listed to be executed on the platform.

This is useful for special platform configurations used for testing
specific features for example.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-20 17:44:16 -04:00
Anas Nashif 1fbbfc819a tests/samples: add tags to some tests
Some tests/samples had no tags, fill those..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-20 17:44:16 -04:00
Tomasz Bursztyka 922325992d spi: Make all API functions available
Removing ifdef around conditional API to follow zephyr coding style.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-20 17:32:42 -04:00
Ruslan Mstoi 6f26ca0b60 scripts: tests: Add tests for subfolder_list.py
This commit implements tests of subfolder_list.py

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-07-20 17:31:53 -04:00
Ruslan Mstoi ab20641054 scripts: subfolder_list.py: refactor the code
Refactor subfolder_list.py to enable unit testing. This means split the
implementation into separate logical functions. Additionally, modify the
code to improve PEP 8 compatibility and pylint result.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-07-20 17:31:53 -04:00
Carles Cufi 02dea9279b scripts: modules: Fix initialization of variable
The projects variable needs to be initialized with the list of modules
provided via cmd-line arguments.

This is a regression introduced by
ef3c5e5516.

Fixes #26948.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-20 22:39:09 +02:00
Eugeniy Paltsev dd49fb4da4 Serial: NSIM: remove legacy ARC-NSIM UART driver
After switching nSIM to 16550 UART model & driver there is no users
for ARC-NSIM UART. So remove it entirely.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-07-20 13:34:34 -04:00
Eugeniy Paltsev 3eee762e08 ARC: NSIM: switch to ns16550 UART model
Switch nSIM from custom ARC UART to ns16550 model. That will
allow us to use zephyr images built for nSIM on other platforms
like HAPS, QEMU, etc...

This patch do:
 * switch nSIM board to ns16550 UART usage
 * change nSIM simulator configuration to use ns16550 UART model
 * drop checks for CONFIG_UART_NSIM in ARC code
 * update nSIM documentation

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-07-20 13:34:34 -04:00
Robert Lubos ac305149bb net: lwm2m: Remove duplicated logs during bootstrap
Remove the `sm_bootstrap_reg_done` function, which produced duplicated
logs. The bootstrap registration done event is already logged on state
transition. Additionally, in case bootstrap procedure took longer time,
the duplicated log message was printed on each `lwm2m_rd_client_service`
call (500 miliseconds by default).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-20 12:50:25 -04:00
Robert Lubos c59271d9f0 net: lwm2m: Clear security object instance on engine restart
The security object instance used should be cleared on engine reset,
otherwise we might end up using invalid object instance for the
registration (i. e. if the engine was restarted during the bootstrap
procedure due to socket errors, the registration attempt will use
bootstrap security object instead of finding a proper one).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-20 12:50:25 -04:00
Robert Lubos 00d12041f6 net: lwm2m: Initialize CoAP response on bootstrap finish
During the bootstrap procedure, when Boostrap Finish was received, the
response message was not initialized properly, resulting in a socket
error (NULL pointer porovided) and the response not being sent.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-20 12:50:25 -04:00
Jukka Rissanen 4746a13324 net: Remove special alignment
The Z_STRUCT_SECTION_ITERABLE() provides an alignment so remove
the 32 byte alignment for net_if and ppp_protocol_handler structs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-07-20 08:32:46 -07:00
Jukka Rissanen 62580748e5 net: Use section foreach macros
Use system provided Z_STRUCT_SECTION_FOREACH() and
Z_STRUCT_SECTION_ITERABLE() macros instead of manually coding
everything for network sections.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-07-20 08:32:46 -07:00
Krzysztof Chruscinski 83ee9a8676 manifest: Refer to updated nrf_hw_models
nrf_hw_models require extension to support nrf_clock_is_running call.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski e82419074c drivers: led_strip: ws2812_gpio: Adapt to clock using onoff
Adapted to use onoff service for clock control

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski 4883a36be2 boards: arm: qemu_cortex_m0: Removed HFXO request from the timer
Removed HFXO request. It is a qemu target thus HF clock source
should not matter.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00