Commit graph

60811 commits

Author SHA1 Message Date
Bartosz Golaszewski 0f09360456 lvgl: change the prefix of Zephyr-specific LVGL config options
We're now using the Kconfig copied from the upstream lvgl repository. It
uses the LV_ prefix for all options while we're using LVGL_ for
Zephyr-specific ones. Make the latter consistent with upstream but also
make sure they're distinct from lvgl's by using LV_Z_ as the prefix.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski 6c190292c0 lvgl: move the lvgl glue out of the zephyr tree
Start using the upstream Kconfig from LVGL and move the glue code out
of the zephyr tree and put it under lvgl/zephyr/ in modules.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski 1244a89a21 lvgl: bump version to v8.1.0
This updates the lvgl in-tree glue code to work with version v8.1.0 and
bumps the west manifest accordingly.

The following are the most significant changes:
- The logging callback has changes in lvgl and no longer provides the
  caller with an integer log level code. We now need to parse the log
  string's prefix to determine the level.
- Several Kconfig options (mostly for default values of various settings)
  have been removed because these values are no longer configurable in
  lvgl.
- The library no longer performs a deep copy of the display and input
  device driver structs, so these must no longer be allocated on the
  stack in the init func.

Other than that it's mostly about renaming of various structures and
functions and adjusting the calls if function's signatures have changed.

This patch allows all in-tree users to work correctly but it's likely
it doesn't support all new widgets and layouts added in lvgl v8. These
however can be added gradually once this is upstream.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski 1e80d5a954 lvgl: provide lvgl_realloc()
In order to support lvgl v8, we need to provide a realloc() implementation
in our custom sys_heap allocator. This uses sys_heap_realloc() internally
and exposes traditional realloc() semantics.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski b7dbe1a51e lvgl: add locking for the sys heap
The sys_heap layer doesn't provide any locking mechanism. Add a spin_lock
around the calls to sys_heap functions.

Suggested-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski b2f1bbed88 lvgl: mem: align the memory used for the private sys heap
Improve efficiency by introducing the 8-byte alignment of the private
heap.

Suggested-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski 595131c2d0 lvgl: kill LVGL_MEM_POOL_HEAP_KERNEL and LVGL_MEM_POOL_KERNEL
Current lvgl code allows to use the kernel heap for dynamic memory
allocation. The k_heap API doesn't however provide k_realloc() which
will be needed in order to update lvgl to v8. Nico suggested there's
no good reason for lvgl to use k_heap and it should stick to either
the libc's allocator or depend on its own private sys_heap.

The alternative would be to extend the k_heap API to provide k_realloc()
but this may be tricky for several reasons and for now there would
be a single user anyway.

This removes the choice of using k_heap for lvgl and renames the user
pool to SYS_HEAP in Kconfig and makes it the default option.

The prj.conf for the lvgl sample is modifed to specify the number of
memory pool blocks instead of the total size as the default block
size is 2048 and it results in the same size of memory.

Suggested-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski b653cc8bad samples: lvgl: add missing Kconfig options
The sample graphical Hello World program uses the image widget as well as
the Montserrat font size 14. While currently those are being selected by
default, it won't be the case once we update to lvgl v8. Select relevant
Kconfig option in prj.conf.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski e467088faa lvgl: take opacity into account
The callback used for the 32-bit color depth has a slight problem, it
doesn't take opacity into account. Correctly mix the colors by using
lv_color_mix().

Suggested-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski 98665755ea tests: lvgl: drop duplicate include
lvgl.h is already included in the img.h header. Drop the duplicate.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Andrzej Kuros 5ee306944b manifest: hal_nordic: update nrf_802154
This commit brings latest changes of nrf_802154 component
provided by hal_nordic module.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
2022-02-24 09:13:21 +01:00
Gerard Marull-Paretas 5fab2efc79 ci: split Bluetooth workflow
Split Bluetooth tests workflow into 2 steps:

- One that runs the actual tests and stored results
- A second one that fecthes and uploads tests results

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-23 16:11:27 -05:00
Aastha Grover c0d7e10beb logging: Add support to backends to switch log format at runtime.
Adding mechanism to all the backends to switch the logging formats
at runtime while leveraging the function pointer table based upon
the Kconfigs which also cleans up the logging backend design.
Also demonstrate the working API with the changes
to syst sample. Clean up Kconfig for backends and add a standard
template to generate the Kconfigs for logging formats to be used
by all backends.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-02-23 14:12:22 -06:00
Aastha Grover 9fcbace639 logging: Add API's to switch logging formats at runtime.
Add support for new API's log_backend_format_set and
log_format_set_all_active_backends to switch the logging format
for one backend and for all the active backends respectively.
Using format_set function pointer in log_backend_api struct as a hook
to set the log format at runtime in the backends. Add function pointer
table with helper functions to be used as a way to select log format.
Add supported log format types as macros to use with the API.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-02-23 14:12:22 -06:00
Aastha Grover e4e675dc37 logging: Add API to get log_backend instance by name.
Added helper API to the logging backend interface to get the
log backend instance by name.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-02-23 14:12:22 -06:00
Trond Einar Snekvik 134c0c3562 Bluetooth: Mesh: Re-enable pb_adv_reprovision test
Re-enables the failing test, undoing the change in #43070.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2022-02-23 11:35:38 -08:00
Trond Einar Snekvik b9eda3d939 Bluetooth: Mesh: Reduce number of reprovision runs in test
The pb_adv_reprovision test takes a long time to execute, as it's
running 10 provisioning sessions in a row. Any side effects from the
provisioning process should come into play already on the first
reprovisioning, so we can safely reduce this to only 3 provisioning runs
without losing any test coverage.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2022-02-23 11:35:38 -08:00
Trond Einar Snekvik 5aafc8cd0c Bluetooth: Mesh: Increase BSIM test timeout to 5 minutes
The wallclock time timeout of the test execution is limited to let CI
abandon hanging test cases. Increase this timeout to account for
additional tests running in parallel in CI, which has caused enough
resource contention to make CI break the time limit.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2022-02-23 11:35:38 -08:00
Torsten Rasmussen 117008331d cmake: package_helper CMake script
The Zephyr CMake package helper script allows to invoke Zephyr package
modules as they are invoked at configure time, up to the modules given
with `-DMODULES=<modules>`.
This allows to run the configure time part of the Zephyr build system
without generating a complete build system.

This means that for example devicetree module can be invoked for a given
sample and board to generate zephyr.dts identical to what is created
by the build system during a build.

To generate zephyr.dts for hello_world, invoke the script as:
$ cmake -DBOARD=<board> -B build -S samples/hello_world \
$       -DMODULES=dts -P <ZEPHYR_BASE>/cmake/package_helper.cmake

Other modules, for example 'kconfig' and 'zephyr_modules' can also be
invoked this way.

This will allow other tools, such as twister, to executed only a
subset of the build system like dts in order to do filtering before
determine if a complete build should be invoked.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-02-23 11:34:22 -08:00
Torsten Rasmussen 31e90f1bc5 cmake: support sub-component loading in zephyr_default module
This commit allows to load only subcomponents of the default Zephyr
CMake module, zephyr_default.cmake.

This allows other tools to execute Zephyr CMake build system up to a
specific module and the stop further processing.

This commit is an enabler for future support in twister to process only
devicetree or kconfig, to allow test / sample filtering before
generating a complete build system.

Sub-components can be loaded as:
> find_package(Zephyr COMPONENTS zephyr_default:<sub-component>)

for example:
> find_package(Zephyr COMPONENTS zephyr_default:dts)

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-02-23 11:34:22 -08:00
Nikola Trifunovic b94fe63158 board: arm: added new board nrf52840_mdk_usb_dongle
Origin: Original

Source code of the board/arm/nrf52840dongle_nrf52840
was adapted to be used for the nrf52840_mdk_usb_dongle board.
The main differences to the copied code are:
- Kconfig: deleted BOARD_ENABLE_DCDC_HV option
- Deleted all unnecessary modules from the device tree.

Signed-off-by: Nikola Trifunovic <nikola@trifunovic.at>
2022-02-23 11:29:09 -08:00
Juha Heiskanen 6904915a35 net: lwm2m: LwM2M engine default content format select
LwM2M version 1.1 will select SenML Json for default content format.
Version 1.0 will use TLV format.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-23 17:25:36 +01:00
Juha Heiskanen 312dd7f887 net: lwm2m: Composite Observe operation placeholder
Added detetction for Composite Observervation request and cancel.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-23 17:25:36 +01:00
Juha Heiskanen 98cd71eef2 net: lwm2m2: LwM2M Composite-Write operation
CoAP method iPATCH enable LwM2M Composite-Write operation.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-23 17:25:36 +01:00
Juha Heiskanen 3bec5de0fb net: lwm2m: LwM2M Composite read support
Adeed enabler for composite read to LwM2M engine.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-23 17:25:36 +01:00
Juha Heiskanen 906feebb33 net: lwm2m: Added LwM2M Send operation support
LwM2M engine Send operation support /dp.
Send operation based on Composite Read functionality
which is not enabled at engine side like composite write.
Added Kconfig configurable for composite read path list size.
Created generic Read object instance which is shared between
general read and Composite Read operation.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-23 17:25:36 +01:00
Juha Heiskanen a9c1b8d0f2 net: lwm2m: Added SenML JSON support for Read & Write
LwM2M SenML JSON contain format support for Read / Write operation.
Added Kconfig configurable for enable SenML JSON format.
LwM2m read validate read operation and report out of memory.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-23 17:25:36 +01:00
Martí Bolívar ea98d0587b MAINTAINERS: gmarull for pinctrl
We don't have a formal maintainer for this and we should.

I nominate gmarull as the original author and designer of the API,
especially given his continued work reviewing incoming
implementations.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-23 11:16:59 -05:00
Bradley Bolen c0dd594d4d arch: arm: aarch32: Change CPU_CORTEX_R kconfig option
Change the CPU_CORTEX_R kconfig option to CPU_AARCH32_CORTEX_R to
distinguish the armv7 version from the armv8 version of Cortex-R.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2022-02-23 08:14:15 -06:00
Gerard Marull-Paretas 3b51f9b9e8 pm: device: remove deprecated functions
Remove deprecated functions in the previous release. Note that PM API is
not marked as stable.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-23 07:34:26 -05:00
Flavio Ceolin 9b27dde602 pm: Replace macros with inline function
Macros are not type safe and can be expanded regardless of whether
they are syntactically correct or not. Also macros can result in
side effects when they expand.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-23 07:33:46 -05:00
Flavio Ceolin 78454e5e93 pm: Rename pm_power_state_exit_post_ops
Aligning with the rest of PM API, replace pm_power_state_exit_post_ops
with pm_state_exit_post_ops.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-23 07:33:46 -05:00
Flavio Ceolin f74c38e061 pm: Rename pm_power_state_next_get
Aligning with the rest of PM API, replace pm_power_state_next_get with
pm_state_next_get.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-23 07:33:46 -05:00
Flavio Ceolin 6142fcb8ba pm: Rename pm_power_state_force
Aligning with the rest of PM API, replace pm_power_state_force with
pm_state_force.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-23 07:33:46 -05:00
Flavio Ceolin 89fee61b43 pm: Rename pm_power_state_set
Aligning with the rest of PM API, replace pm_power_state_set with
pm_state_set.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-23 07:33:46 -05:00
Vinayak Kariappa Chettimada bd3ee8608c Bluetooth: Controller: Refactor rx link and node rx release
Refactor implemenation of rx link and node rx release, and
replenish of their quota.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-02-23 13:16:07 +01:00
Vinayak Kariappa Chettimada 6c8ae61bb1 tests: Bluetooth: bsim: ISO Broadcast Channel Map Update Procedure
Updated tests to perform ISO Broadcast Channel Map Update
Procedure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-02-23 13:16:07 +01:00
Vinayak Kariappa Chettimada b29aaff415 Bluetooth: Controller: ISO Synchronized Receiver Channel Map Update
Initial implementation support for ISO Synchronized Receiver
Channel Map Update Procedure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-02-23 13:16:07 +01:00
Vinayak Kariappa Chettimada 28489fc900 Bluetooth: Controller: ISO Broadcast Channel Map Update
Initial implementation of ISO Broadcast Channel Map Update
Procedure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-02-23 13:16:07 +01:00
Vinayak Kariappa Chettimada 7437743982 Bluetooth: Controller: Fix Periodic Advertising PDU ACAD set and clear
Fix Periodic Advertising PDU ACAD set and clear interface to
support updating ACAD when previous and new PDU buffer are
same (i.e. when previous new PDU not consumed yet by LLL).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-02-23 13:16:07 +01:00
Vinayak Kariappa Chettimada d607d1cc6a Bluetooth: Controller: Update assertion check when traversing ACAD
Update implementation to have assertion when not finding the
Channel Map Update Indication field in ACAD.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-02-23 13:16:07 +01:00
Andrzej Kuros 7ce93ebfed modules: hal_nordic: nrf_802154_irq ZLI support
Parameter `prio` of `nrf_802154_irq_init` is now allowed to have
negative value what means use of ZLI priority or highest possible
priority if ZLIs are disabled.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
2022-02-23 11:18:17 +01:00
Anas Nashif dd3f251f10 doc: fix release notes title for 3.0
Remove working draft from release notes, they are official now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-22 19:02:22 -08:00
Martí Bolívar dcb0d9fc4a soc: nrf: remove use of NRF_GPIO_PIN_MAP
Commit 7cdd10bf89
("soc: arm: nordic: add NRF_DT_GPIOS_TO_PSEL_BY_IDX") added a use of
NRF_GPIO_PIN_MAP to soc_nrf_common.h without including the relevant
HAL header where it is defined, hal/nrf_gpio.h.

Unfortunately, including that header causes even more problems, since
it causes undefined NRFX_ASSERT() calls to appear elsewhere in the
tree.

It's not really worth bothering to use this macro. Just expand it
inline instead.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-22 20:55:53 -05:00
Gerard Marull-Paretas 45eaa60fe4 doc: silent filtered warnings
The filtered warnings are warnings we can't fix due to Sphinx
limitations, so showing them just adds noise to the doc build process.
The extension already defaults to silent mode.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 16:02:56 -08:00
Jingru Wang eb614e268c scripts: twister: output error message
Sometimes custom script fails, but we can't see the
error information in twister log, because the twister
uses _ to ignore the stderr.

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2022-02-22 18:52:39 -05:00
Martí Bolívar 7017678ffb doc: contribute: signed-off-by updates
Rework the contribution guide's Signed-off-by: language to be clearer
and reflect the TSC guidance that legal names are required. Also
clarify that existing s-o-b lines should be preserved.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-22 15:07:11 -08:00
Jedrzej Ciupis 81c48c3e68 soc: arm: nordic: extend nRF5340 initialization
Extend initialization code for nRF5340 application core to iterate over
child nodes of GPIO pin forwarder node and pass control over detected
pins to the network core.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-02-22 15:00:35 -08:00
Jedrzej Ciupis 7cdd10bf89 soc: arm: nordic: add NRF_DT_GPIOS_TO_PSEL_BY_IDX
Add a macro that allows to retrieve pin's PSEL from its devicetree
representation taking into account its index into GPIO array.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-02-22 15:00:35 -08:00
Jedrzej Ciupis ebe4cf5035 boards: arm: nordic: update DTS for nRF5340
Add a generic GPIO pin forwarder node to nRF5340 application core DTS
and to Thingy53 application core DTS. For Thingy53, add data of
FEM-related pins to the GPIO forwarder node. For nRF5340, leave the node
with status disabled by default.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-02-22 15:00:35 -08:00