Zephyr news, 18 April 2018


Marti Bolivar
 

Hello,

This is the 18 April 2018 newsletter tracking the latest Zephyr
development merged into the mainline tree on GitHub.

An HTML version with additional links is available here:

https://opensourcefoundries.com/blog/2018/04/18/zephyr-news-20180418/

Contents are broken down like this:

- **Highlights**
- Important changes: ABI/API breaks and some features
- New features: non-exhaustive descriptions of new features
- Bug fixes: non-exhaustive list of fixed bugs
- **Individual changes**: a complete list of patches, sorted
chronologically and categorized into areas, like:
- Architectures
- Kernel
- Drivers
- etc.

Highlights
==========

This newsletter covers changes in Zephyr between these two
commits:

- 9bde3c06e ("tests: build_all: Add LPS22HB and LSM6DSL sensors build
test"), Apr 10 2018
- 4c400e876 ("net: ipv6: Fix crash from malformed fragment payload"),
Apr 17 2018

Important Changes
-----------------

Userspace calling convention change:

System calls from userspace on ARM targets now expect all
arguments to be passed via registers, instead of mixing stack and
registers as done previously.

DTS alias renames:

Various DTS aliases with underscores ('_') in their names were
renamed to use dash ('-') instead. Apparently, underscores were
technically always illegal to use in alias names. This change
avoids a dtc warning in newer versions. In-tree users were
updated; any out of tree applications using the old names will
need changes as well.

WiFi:

The initial outline for Zephyr's WiFi suport was
merged. Initial definitions were added in the following
areas:

- device driver skeleton in drivers/wifi
- a mostly stubbed out main header file, include/net/wifi.h
- WiFi network management in include/net/wifi_mgmt.h,
including definitions for events from so-called "offloaded"
devices (which are separate cores that implement WiFi
funcionality and communicate with the IC running Zephyr
via a higher-level protocol)
- shell support for controlling the network management API in
subsys/net/ip/l2/wifi_shell.c, which can be selected with
CONFIG_NET_L2_WIFI_SHELL. The initial commands are "wifi
connect", "wifi disconnect", and "wifi scan".

This is the groundwork for future changes completing the
generic framework and adding individual device drivers.

Device tree bindings for GPIO keys and LEDs:

Generic device tree bindings for GPIO-based buttons ("keys") and
LEDs were added in dts/bindings/gpio/gpio-keys.yaml and
dts/bindings/gpio/gpio-leds.yaml respectively.

The initial users are STM32-based boards, which now have device
tree nodes for their buttons and onboard LEDs defined.

Features
--------

Architectures:

ARM cores now flush the instruction pipeline after switching
privilege levels, to prevent execution of pre-fetched
instructions with the previous privilege.

Boards:

SoC support was added for the Cortex M4 core which is present in
the imx7d SoC. The Zephyr image must be loaded and run by an A7
core also present on the SoC. Initial board support was added for
the Colibri iMX7D as "colibri_imx7d_m4".

Sanitycheck now runs on hifive1.

96b_carbon_nrf51 now uses the new nRF SPIS driver.

Userspace mode was enabled by default for sam_e70_xplained.

Device tree:

Device tree bindings for STM32 GPIOs were defined, and all
STM32-based boards now have GPIO device nodes.

Drivers:

The native POSIX Ethernet driver now supports network statistics
collection, extending support for the Ethernet interface network
statistics framework that was recently merged.

The driver for the KW41Z BLE and 802.15.4 chip now supports the
OpenThread L2 layer, and received changes to its RNG source which
now feed its (slow and blocking) entropy source's output into the
Xoroshiro PRNG.

The nRF SPI drivers now appear to be completely supported. There
are three available drivers: spi_nrfx_spi.c is a master-only
driver for older devices (or devices with anomalies) without
direct memory access (DMA) support, spi_nrfx_spim.c is a master
driver for devices with DMA support, and spi_nrfx_spis.c is a
driver for the experimental SPI slave API which uses DMA.

Bug Fixes
---------

The k_malloc() and k_calloc() calls in the mempool implementation
now properly check for overflow in all configurations.

A pair of patches fixing IPv6 crashes were merged.

Following reports of confusion, the Windows installation guide
has been restructured to make it easier for new users to
understand what their choices are.

A few sample applications (BT's hci_usb, as well as USB's dfu and
wpanusb) now use the Kconfig knobs CONFIG_USB_DEVICE_VID and
CONFIG_USB_DEVICE_PID to configure the USB vendor and product
IDs. These knobs say they "MUST be configured by vendor"
(e.g. http://docs.zephyrproject.org/reference/kconfig/CONFIG_USB_DEVICE_VID.html);
they default to 0x2FE3 and 0x100 respectively. The VID 0x2FE3
doesn't appear to be allocated by the USB-IF.

The wpanusb sample and ENC28J60 Ethernet driver received fix-ups,
and, in the ENC28J60 case, optimizations.

The number of interrupts on the nRF52840 SoC was fixed.

PWM was disabled on nucleo_f103rb, fixing some test build breaks
and continuing Zephyr's move towards a consistent set of default
board configurations.

CONFIG_CUSTOM_LINKER_SCRIPT, which allows the user to override
the linker scripts provided by Zephyr itself, was fixed. This had
been broken since the transition to CMake, so it seems to have
few, if any, active users.

The Atmel SAM0 flash driver's build is fixed when
CONFIG_FLASH_PAGE_LAYOUT is disabled.

A concurrency fix to the SPI driver core was merged.

Individual Changes
==================

Patches by area (105 patches total):

- Arches: 5
- Bluetooth: 1
- Boards: 8
- Build: 1
- Continuous Integration: 1
- Device Tree: 11
- Documentation: 10
- Drivers: 22
- External: 2
- Kernel: 3
- Libraries: 1
- Maintainers: 2
- Miscellaneous: 2
- Networking: 22
- Samples: 6
- Scripts: 1
- Storage: 1
- Testing: 6

Arches (5):

- 81633023 arch: Add imx7d m4 soc support
- 397e52f0 arch: nrf52: Correct the number of IRQs in nRF52840
- 1aa123d0 arm: nucleo_f103rb: Do not enable PWM by default
- 4d5fbbc5 arch: arm: Flush pipeline after switching privilege levels
- 09a8810b arm: userspace: Rework system call arguments

Bluetooth (1):

- b6d912ab Bluetooth: hci_usb: Use USB Device defined VID / PID

Boards (8):

- 85e8eaa9 boards/arm: add support for colibri_imx7d_m4 board
- a9d7b1ff boards: hifive1: Add missing board yaml file
- 5319e009 boards: arduino_due, nrf52_pca20020: Add "ram" and "flash" properties
- c542c0e3 boards: dts: Cleanup aliases
- 9c032eb1 boards/arduino101: Enable UART 0 controller
- 1d27d27a boards: 96_carbon_nrf51: Update SPI driver default configuration
- 7c6cf201 boards: stm32: add button and leds gpio definitions
- 95126d1a boards: sam_e70_xplained: Enable userspace

Build (1):

- c1aa9d16 cmake: Fix CONFIG_CUSTOM_LINKER_SCRIPT

Continuous Integration (1):

- c84235ee sanitycheck: Exit on load errors

Device Tree (11):

- 708b59b9 dts: stm32: stm32f469 is a stm32f429 derivative
- e7ab1d30 dts: stm32: Populate gpio nodes for stm32f4 series
- 8e5cf5fe dts: stm32: Populate gpio nodes for stm32f0 series
- dbc3c024 dts: stm32: Populate gpio nodes for stm32f1 series
- a4c426ab dts: stm32: Populate gpio nodes for stm32f3 series
- a78adcdd dts: stm32: Populate gpio nodes for stm32l4 series
- 50bf306f dts: stm32: Populate gpio nodes for stm32l0 series
- 93318f9f yaml: rename cell_string clocks
- 6c92e556 dts: bindings: add bindings for stm32 gpio
- 2b4cb5a7 dts: provide yaml bindings for led and gpio keys
- 4fe3a977 dts: gpio: create gpio dt-bingings and inlude in stm32 dtsi files

Documentation (10):

- a02e78d3 doc: fix note for forcing a CI recheck
- f6a25cfd docs: network-management-api: update a changed function name
- 70a5bded doc: network-management-api: clarify intended event listening usage
- 5e9563ab doc: usb: Move USB sections to USB Stack
- 556e5329 doc: Make code consistent lowering case
- a660fcb3 doc: Add USB documentation identifiers and links
- 88b66b58 doc: getting_started: Make it more obvious how to follow the guide
- 05f02bd0 docs: group the GPIO_* flags into logical groups.
- 5e9f7cb2 doc: fix misspellings in Kconfig files
- 50468605 doc: Fix path in documentation about uncrustify.cfg

Drivers (22):

- 346165b2 serial: Add imx uart driver shim
- 05893ec5 wpanusb: Assign USB Product ID to 802.15.4 over USB
- c925bf51 wpanusb: Remove unneeded configuration option
- 32e089d2 wpanusb: Remove old hardcoded VID / PID
- a68a177c wpanusb: Use DEBUG syslog level
- e295836b usb: dfu: Use USB Device defined VID / PID
- 42902e58 drivers/ethernet: Fix and clean a bit ENC28J60 driver
- 669d4a8c drivers/ethernet: Optimize memory read/write operations in ENC28J60
- e8bc0632 drivers/ethernet: Reduce runtime context size in ENC28J60 driver
- 3e048f6d drivers: eth: native_posix: Add ethernet statistics support
- 7738a501 drivers: ieee802154: Add auto-ack support to KW41Z driver
- 9f7470e2 drivers: ieee802154: Add OpenThread modifications to KW41Z driver
- c563e331 drivers: entropy: Change KW41Z to use XOROSHIRO for RNG source
- 8b839b4e drivers/wifi: Add files skeleton for adding WiFi drivers
- 998c79d0 drivers: spi: Add shim for nrfx SPIM driver
- 7a9c4cbd drivers: spi: Align nrfx_spi shim with the nrfx_spim one
- 8c5b16cc drivers: flash: atmel sam0: Fix compilation without page
layout support
- 5976afe9 drivers: spi: Correct a typo in spi_nrfx_spi.c
- 1143606c drivers/spi: Fix context lock behavior
- ffb2bcbb drivers/spi: Slave async calls require recv frames as
successful status
- ecd08111 drivers: spi: Add shim for nrfx SPIS driver
- 5991cea1 drivers: spi: Add missing periods in Kconfig.nrfx

External (2):

- 3afc2b6c ext/hal/nxp/imx: Import the nxp imx7 freertos bsp
- ea1d14e5 hal: nordic: Move nrfx IRQ related stuff from SPI shim to nrfx_glue

Kernel (3):

- 79d151f8 kernel: Fix building of k_thread_create
- b902da35 kernel: mempool: Check for overflow in k_malloc()
- 85dcc97d kernel: mempool: Always check for overflow in k_calloc()

Libraries (1):

- 51a20907 newlib: Fix compiler warning when using Newlib

Maintainers (2):

- f8248d4f CODEOWNERS: Add @pfalcon as a maintainer of BSD Sockets subsystem
- a534aa6a CODEOWNERS: update owners

Miscellaneous (2):

- c7f5cc9b license: fix spdx identifier in a few files
- be6bf293 syslog: net: Fix multiple network interface selection for IPv4

Networking (22):

- 61cd96ee net: l2: ethernet: fix kconfig
- 1146ba1f net: app: server: Create IPv4 listener also if IPv6 is enabled
- c1e7fd76 net: stats: Add infrastructure for collecting ethernet stats
- c90b9f53 net: shell: Print ethernet statistics
- 03b24082 subsys: net: ip: l2: openthread: Fixed compiler errors and warnings
- 00885bbf OpenThread: Normalize IEEE802.15.4 driver name for use by L2 layers
- 292033c1 openthread: kw41z: Adding echo/server project config files
for KW41Z OT
- 6f57c03a net: app: Always set relevant sa_family when starting a TCP server
- ac661a07 net: tcp: Cancel fin_timer in FIN_WAIT_2 instead FIN_WAIT_1
- 6d387ec9 net: Remove the need for an l2 on offloaded drivers
- c7d5e872 net: Don't call l2->enable for offload devices
- 93ac7ce6 net/mgmt: Move NET_EVENT_INFO_MAX_SIZE into net core's private header
- 7bde51d8 net/mgmt: Add initial WiFi management API definitions
- dc81659b net/wifi: Select dependencies to get wifi mgmt working
- 17b923ae net: wifi: Add a wifi.h to hold WiFi definitions
- eab3f168 net/mgmt/wifi: Add dedicated net mgmt hooks for WiFi offload devices
- c995bfe7 net/wifi: Add a shell module for controlling WiFi devices
- da8af393 net: if: Add helper to select src interface for a IPv4 dst addr
- 2bb179b7 net: shell: Use correct network interface for IPv4 ping
- a91c46ff net: app: Select local IP address properly if multiple interfaces
- 2563c373 net: ipv6: Fix crash from NULL fragment pointer access
- 4c400e87 net: ipv6: Fix crash from malformed fragment payload

Samples (6):

- f9159ab6 samples/telnet: Fix accessing iface ipv4 config
- 435d1738 samples: net: stats: Print ethernet statistics
- cd6a3f04 samples: coap_client: fix net mgmt event handler
- 023ae27d samples: telnet: fix net mgmt event handler
- 79c4a5b4 samples: net: coap_client: Fix compile error
- 3aa3e976 samples: net: coap: Solved the payload issue in coap GET Method

Scripts (1):

- 3b529ca3 scripts: extract_dts_inlcudes: generate cells for gpio

Storage (1):

- 50893349 subsys: nffs: Unlock mutex before returning

Testing (6):

- 0d83900d tests: net: mld: fix net mgmt event handler
- 3718684e tests: net: dhcpv4: fix net mgmt event handler
- 3c8b3875 tests: kernel: threads: Additional tests for set_priority
- 1f45f79d tests: mempool: Add overflow checks
- f2177bfb tests: net: Make "app" tests dependent on netif
- 25e5c60c tests/net: utils: increase min RAM requirement to 24K

Join devel@lists.zephyrproject.org to automatically receive all group messages.