Commit graph

41120 commits

Author SHA1 Message Date
Stephanos Ioannidis
74e43a3103 tests: kernel: fp_sharing: Reorganise tests
The `fp_sharing` testsuite consists of two tests: `load_store` and
`pi`.

This commit reorganises the two tests into separate files and refactors
the common parameters into the `test_common.h` header file.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-10 11:43:05 +02:00
Carles Cufi
ba3b1e06b7 usb: Stop reversing the hardware identifier
Now that the hardware identifier obtained with the hwinfo API is stored
in the correct order based on the platform, there is no longer the need
to reverse its bytes when populating the serial number in the
corresponding USB descriptor.

Fixes #24103

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-10 10:59:04 +02:00
Kumar Gala
ab15602b79 dts: ti: lm3s6965: Add flash controller node and binding
Add a flash controller node and place the soc-nv-flash under that node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
7ab2f98684 dts: bindings: Remove zephyr,native-posix-flash-controller binding
Nothing uses the zephyr,native-posix-flash-controller binding so
remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
6bb3ff9088 dts: bindings: add missing binding for st,stm32l0-flash-controller
The st,stm32l0-flash-controller did not have a binding, add one for it.

Also made a comment in stm32l0.dtsi that the driver doesn't currently
support this controller.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
30c47cfa2c dts: stm32: H7: Fixup flash nodes
Add missing compatible and label for flash nodes on STM32 H7 SoC dtsi
files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
c5153a2d2a dts: atmel: sam: cleanup flash / sram nodes
Move flash node under flash controller and sram nodes under soc as it
is for most SoC dts files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
85f0e8631a dts: arm64: qemu-virt: Update flash node to match what qemu models
The flash at 0 is a cfi-flash and its 2 banks each that are 64M.
Update qemu-virt-a53.dtsi to reflect the proper flash config, however we
comment out the second bank of flash for now because zephyr,flash can
only handle one value in the reg property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:18:50 -05:00
Ioannis Glaropoulos
95da5d479b arch: arm: minor fixes in the docs for ARM kernel_arch headers
Fix documentation in kernel_arch_data.h and kernel_arch_func.h
headers for ARM, to indicate that these are common headers for
all ARM architecture variants.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-04-09 13:13:42 -07:00
Jaron Kelleher
0fb4382164 arch: isr: Update z_isr_install for multi-level interrupts
z_isr_install is not suited to handle multi-level interrupt formats.
This update allows z_isr_install to accept irq numbers in zephyr format
and place them in the isr table appropriately.

Fixes issue #22145

Signed-off-by: Jaron Kelleher <jkelleher@fb.com>
2020-04-09 13:12:24 -07:00
Josh Gao
a06617b7e1 kernel: mark time conversion functions as constexpr in C++14.
Allow C++ code to evaluate time base conversion routines at compile time
by marking them as constexpr where possible.

Signed-off-by: Josh Gao <josh@jmgao.dev>
2020-04-09 13:10:41 -07:00
Robert Lubos
073ec8d4aa net: mqtt: Refactor because of timeout overhaul
Align MQTT with timeout API changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-09 21:58:42 +03:00
Kumar Gala
90f0217543 dts: soc: atmel: sam: Add pinctl container node
Group all the GPIO controllers under a pinctl node so that we have a
container for pinmux configuration data.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 13:34:46 -05:00
Abe Kohandel
861548f12f drivers: dma: i2s: stm32: I2S Master DMA support
When configuring the I2S peripheral as a master, the DMA channel
direction must be configured to transfer data from memory to the
peripheral.

Currently the configuration of channel direction is always set for
peripheral to memory regardless of whether it is the TX or the RX
channel.

Signed-off-by: Abe Kohandel <abe@electronshepherds.com>
2020-04-09 19:57:08 +02:00
Peter A. Bigot
1c6791b428 west.yml: update littlefs to 2.2.0
See zephyrproject-rtos/littlefs/pull/5

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-04-09 19:52:26 +02:00
Steven Slupsky
c54f7ec1fc drivers: hwinfo: fix endianness for sam0 and nrf
HWINFO drivers should be responsible for ensuring that
the data structure is a sequence of bytes. That is not
what the current sam0 and nordic drivers do. The drivers
read the data as u32_t and then memcpy the data to a
buffer. This ensures the data has the endianness of the
underlying MCU, which in this case is Cortex M0 which
is little endian.

This commit fixes the endianness so the data can be
interpreted as a "left to right sequence of bytes".

This commit updates the API doc to provide clarification
of the data structure.
Add to 2.3 release notes.

Fixes #23444, #24103

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
2020-04-09 19:30:32 +02:00
Paul Sokolovsky
8eac618cba samples: big_http_download: Add automated-CI friendly sanitycheck config
This application was initially intended to be a manual, interactive
sample, run by a user. However, it's also a useful real-world
integration test, to be run in automated CI systems. So, provide
a config suitable for such a usage: use local host machine as a
server (to not depend on availability and characteristics of an
Internet connection), and have a concrete completion criteria
(by limiting number of iterations; given that performance of TCP
is not to be not too high, limit it to just 1 for now).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-04-09 18:40:03 +03:00
Paul Sokolovsky
761aa6c52b samples: big_http_download: Allow to configure number of iterations
Initially, this was intended to be a sample for manual "burnout"
testing, e.g. see if a device with it can run for 24hrs, or download
1GB of data, or similar.

It's however also useful for automated CI testing, but then we need
to have more specific completion criteria. So, allow to specify
number of download iterations via local Kconfig.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-04-09 18:40:03 +03:00
Paul Sokolovsky
2dd38a7e88 samples: big_http_download: Allow to configure URL via Kconfig
To streamline management of multiple test configurations (which
now can go into separate config/overlay files instead of patching
source).

Note that now that this option is introduced, it must be set to
a correct value for any Zephyr config, thus we set it in
overlay-tls.conf. But the sample also supports building under a
POSIX environment (using Makefile.posix), which doesn't use
Zephyr's config system, so suitable defaults still should be
present in the C source file.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-04-09 18:40:03 +03:00
Carles Cufi
76c3a8d964 Bluetooth: controller: Fix Peer Address Type in Conn Complete
The LE Connection Complete HCI event, unlike its Enhanced counterpart,
only uses 0x0 and 0x1 for Peer Address Type. Fix it so that it reflects
the specification correctly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-09 17:18:58 +02:00
Torsten Rasmussen
0e31656e67 cmake: fixed issue with invalid usage of APPLICATION_SOURCE_DIR
Fixes: #24158

The shell/fs sample was using APPLICATION_SOURCE_DIR before it has been
defined.

This has now been fixed to use the proper way of overlaying board
specific settings using boards folder.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-04-09 16:57:30 +02:00
Robert Lubos
ceecd0fd8a west.yml: Update hal_nordic
Introduce several upgrades for the nRF ieee802154 radio driver.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-09 16:56:11 +02:00
Robert Lubos
7820d99274 net: openthread: Fill mTimestamp field in OT frame
Fill the mTimestamp filed in OpenThread frame based on the net_pkt
timestamp value (only if NET_PKT_TIMESTAMP is enabled).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-09 16:56:11 +02:00
Robert Lubos
a4f704d2ec drivers: ieee802154_nrf5: Handle RX timestamp
Obtain RX time from the radio driver. Fill the `net_pkt` with
a timestamp if `NET_PKT_TIMESTAMP` is enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-09 16:56:11 +02:00
Robert Lubos
ee8a85e38f net: openthread: Forward IEEE802154_HW_TX_RX_ACK capability
Translate and forward to OpenThread stack IEEE802154_HW_TX_RX_ACK
capability.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-09 16:56:11 +02:00
Robert Lubos
86f56fcd36 drivers: ieee802154_nrf5: Switch to ACK timeout at nRF driver level
nRF radio driver will call `nrf_802154_transmit_failed` callback in case
no ACK is received, so we do not need to set timeout at the shim layer
anymore.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-09 16:56:11 +02:00
Kyle Sun
a9b926414c net: lwm2m: Publicize firmware block context
This change is to allow access to the firmware block context in order to
give the firmware update callback implementation an indication of when
to reset the flash context. Additionally, it allows for a validity check
between the total expected size downloaded and the actual size
downloaded. A simple implementation can check if the block context's
current downloaded blocks is equal to the expected block size in order
to determine if the flash context needs to be reset. This approach
seemed the simplest, and knowing the firmware block context can have
other purposes. This has been tested by accessing the block context
during the update in the block received callback and confirming that the
callback had information regarding the current downloaded bytes.

Fixes #16122

Signed-off-by: Kyle Sun <yaomon18@yahoo.com>
2020-04-09 16:48:45 +02:00
Ivo Clarysse
db400713ba drivers/flash: shell: Add optional device argument
Update `flash` shell commands to take an optional device argument,
instead of using the chosen flash device.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-04-09 16:36:39 +02:00
Stephanos Ioannidis
f40fc4a3bf modules: cmsis: Add CMSIS-Core(A) configurations
This commit updates the west.yml to point to the commit that adds the
CMSIS-Core(A) and defines the configurations to enable it, in
preparation for the AArch32 Cortex-A architecture support in Zephyr.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-09 16:24:05 +02:00
Kumar Gala
35cad0884a dts: soc: atmel: sam: cleanup node labels to match SoC docs
Update dts files to use node labels that match Atmel SoC docs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 09:02:19 -05:00
Maureen Helm
4219b63949 samples: sensor: Add lpcxpresso55s69 to fxos8700 accel-only test
The lpcxpresso55s69 board has an mma8652 accelerometer which is
compatible with the fxos8700 driver in accel-only mode. Now that this
board has an i2c driver, include it in the platform whitelist.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Maureen Helm
c5ef6dc73f boards: lpcxpresso54114: Enable i2c instance 4
Enables i2c instance 4 on the lpcxpresso54114 board. Configures pinmuxes
and clocks, and updates board documentation accordingly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Maureen Helm
ab949b023b boards: lpcxpresso55s69: Enable i2c instance 4
Enables i2c instance 4 on the lpcxpresso55s69 board. Configures pinmuxes
and clocks, and updates board documentation accordingly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Maureen Helm
ecd31dfd47 soc: nxp_lpc: Enable the mcux flexcomm i2c driver
Enables the mcux flexcomm i2c driver on lpc54xxx and lpc55xxx socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Maureen Helm
3005094994 drivers: i2c: Add mcux flexcomm driver
Adds a shim layer around the mcux lpc flexcomm driver to adapt it to the
zephyr i2c interface. It leverages heavily from the existing mcux lpi2c
shim driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Maureen Helm
f1a8f6dd7b dts: Add i2c bindings and nodes for lpc socs
Adds i2c device tree bindings and nodes for the lpc54xxx and lpc55s6x
socs in preparation for adding a new i2c driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Alexandre Bourdiol
168b918681 dts/arm/st: SPI6 not supported by all F7 devices
STM32F723 doesn't support SPI6

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-04-09 08:42:42 -05:00
Alexandre Bourdiol
615865f31e dts/arm/st: f7 supports SPI FIFO
Add SPI FIFO support to STM32F7

#fixes 23677

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-04-09 08:42:42 -05:00
Kumar Gala
a5daf74467 drivers: hwinfo: atmel_sam: Replace DT_FLASH define
Replace DT_FLASH_DEV_BASE_ADDRESS with new DT_REG_ADDR/DT_INST macro as
we phase out DT_FLASH define usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 08:41:09 -05:00
Kumar Gala
c7f8b30f53 drivers: flash: openisa rv32m1: Replace DT_FLASH define
Replace DT_FLASH_SIZE with new DT_INST_REG_SIZE as we phase out
DT_FLASH define usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 08:41:09 -05:00
Kumar Gala
19e91ab9f2 drivers: flash: nxp mcux: Replace DT_FLASH define
Replace DT_FLASH_WRITE_BLOCK_SIZE with new DT_INST_NODE_HAS_PROP and
DT_INST_PROP macro as we phase out DT_FLASH define usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 08:41:09 -05:00
Kumar Gala
9a28ff317f drivers: flash: atmel_sam: Replace DT_FLASH define
Replace DT_FLASH_DEV_BASE_ADDRESS with new DT_REG_ADDR/DT_INST macro as
we phase out DT_FLASH define usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 08:41:09 -05:00
Marek Porwisz
ccd74755d5 net: openthread: Pass received frame to the proper thread.
Received frames shall be handled in the OpenThread thread, not in
the receiver thread.
Passed received frame to the function that will handle it in a proper
thread instead of calling otPlatRadioReceiveDone directly.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-04-09 16:19:20 +03:00
Marek Porwisz
8f2bcee35b net: lib: openthread: Create API for RX frame handling
OpenThread received frame handling shall be done in the OpenThread
thread.
Created API to pass net packets to the proper thread and handle them
there.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-04-09 16:19:20 +03:00
Jukka Rissanen
1ecac129c8 net: mqtt: websocket: Only accept data packets in RX
Check the message type and only accept MQTT binary data.

Fixes #24156

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-09 16:16:57 +03:00
Jukka Rissanen
88d1d43842 samples: net: zperf: Refactor because of timeout overhaul
Convert to use k_timeout_t

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-09 16:07:03 +03:00
Jukka Rissanen
92e8422a40 samples: net: big_http_download: Fix to use proper data type for sleep
Needed because of k_timeout_t conversion

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-09 16:07:03 +03:00
Jukka Rissanen
a85d1e0e74 samples: net: syslog: Fix to use proper data type for sleep
Needed because of k_timeout_t conversion

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-09 16:07:03 +03:00
Jukka Rissanen
da2488d96e samples: net: net_mgmt: Fix compile issues from timeout overhaul
Feed proper time delay parameter to K_THREAD_DEFINE()

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-09 16:07:03 +03:00
Jukka Rissanen
36b151c566 samples: net: echo_client: Fix compile issues from timeout overhaul
Use proper timeout value for poll()

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-09 16:07:03 +03:00