Commit graph

51581 commits

Author SHA1 Message Date
Erwan Gouriou
99f211b668 drivers/clock_controller: stm32: Prepare for dts based configuration
To allow transition to device tree based clock configuration on
stm32 targets, rework clock_control driver to use intermediate
STM32_ macros initially defined as the equivalent Kconfig macros
for now.
Propagate the change in all code using these macros.

The reason to introduce these new macros instead of configuring
Kconfig flags using dt kconfigfunctions is that we'll need
to be able to inform users that Kconfig flags are deprecated
once the whole family conversion is done, to encourage
out of tree users to adopt this new configuration scheme.

Note: For now STM32H7 series and code is excluded.
This is the same for some series specific code such as
PLL mul/div for L0/L1 and XTRE prescaler on F1 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Johann Fischer
26f2e33227 drivers: usb_dc_nrfx: add attached event delay
Add configurable attached event delay. Delay can be used to give
USB Charging Controller time for initialization.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-04-29 09:55:28 -04:00
Arvin Farahmand
008bfeb43e drivers: uart_sam0: add error support
Adds support for enabling and detecting errors to uart.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-04-29 09:54:54 -04:00
Krzysztof Chruscinski
7f1d4fdb5b logging: Enable MPSC_PBUF for legacy modes
Logging failed to compile when --no-gc-sections is used because
log_core is conditionally calling mpsc_pbuf.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 09:53:19 -04:00
Michał Narajowski
b9c8d270ab Bluetooth: Mesh: Allow to be NODE when PROVISIONER is enabled
When PROVISIONER and CDB is enabled then IUT couldn't be a NODE.
This patch fixes this by not returning an error when CDB is not
configured. This is useful especially in testing environment, when all
the features are compiled in and we can choose role in runtime.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-04-29 09:52:35 -04:00
Bob Recny
81f839b157 boards: arm: Add u-blox EVK-NINA-B4
Add support for u-blox EVK-NINA-B4, which uses the nRF52833

This board is similar to the nrf52833dk_nrf52833, though it
uses a u-blox NINA-B40x openCPU module with DC-DC support
included.
Simplified pwm LED aliases
Corrected LED assignments for red, green, and blue
Addressed review comments (spi & gpio 0 0)

Tested with blinky, button, and Bluetooth peripheral_hr

Signed-off-by: Bob Recny <bob.recny@u-blox.com>
2021-04-29 09:52:19 -04:00
Robert Lubos
0d1577f7fe net: lwm2m: Add API function to delete object instance
Since the API already has a function to create an LwM2M object instance,
it makes sense to add a corresponding delete funtion, allowing the
application to delete created objects.

Additionally, for the remote delete set the Registration Update trigger
only when not in bootstrap mode.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-29 09:51:54 -04:00
Robert Lubos
66c5fdc984 net: lwm2m: Fix Registration Update send on object creation
The Registration Update message should be sent whenever an object
instance is created or deleted. Currently this was only the case when an
object instance was created by the server and not by the application.
Fix this by triggerng the Registration Update from the API function
as well.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-29 09:51:54 -04:00
Guðni Már Gilbert
947bd45260 boards: arm: add board revision to board description
add board revision number to board description (MB1319C)

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-04-29 09:51:39 -04:00
Guðni Már Gilbert
2d81d2d91e boards: arm: Add adc1 node to board nucleo_l412rb_p
The board has 16 input channels on ADC1.

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-04-29 09:51:39 -04:00
Guðni Már Gilbert
be1f9403de boards: arm: fix i2c pin and add SPI to docs
When I added this board recently I mistakenly placed
the Arduino SCL pin (Default Zephyr pin) as PB6
when it should be PB8.

The SPI node is now properly set to SPI2 peripheral
instead of SPI1. SPI2 is the most suitable to follow
the silkscreen on the printed circuit board.

Added arduino_gpio to yaml.

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-04-29 09:51:39 -04:00
Guðni Már Gilbert
e19389724c dts: arm: st: l4: add SPI2 node for stm32l412
This commit adds a SPI2 node for STM32L412 which
will be used for the board Nucleo L412RB-P.

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-04-29 09:51:39 -04:00
Piotr Szkotak
c60d500bf9 net: openthread: Increase stack sizes with FP context
This PR increases the OpenThread stacks to compensate
for the runtime increase of the MPU stack guard
when the usage of the FP context is detected.

Signed-off-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
2021-04-29 09:50:44 -04:00
Keith Short
e7a9775cca adc: Move ADC acquisition time macros
Move the ADC acquisition time macros so that they can be utiliized by
devicetrees.

Signed-off-by: Keith Short <keithshort@google.com>
2021-04-29 09:50:18 -04:00
Alexandre Bourdiol
630156a4e6 drivers: clock_control: stm32wl doesn't have HSE bypass
LL_RCC_HSE_EnableBypass() doesn't exist on stm32wl,
but can be replaced by LL_RCC_HSE_EnableTcxo()

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-29 09:49:53 -04:00
Anas Nashif
bfb1634af5 tests: cpp: run exceptions tests only on mps2_an385
While we wait for #32448, run only on mps2_an385.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-29 09:00:40 -04:00
Anas Nashif
8e5c09b2c6 tests: cpp: fix test identifier
use cpp as the main section in the identifier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-29 09:00:40 -04:00
Anas Nashif
174afccced tests: move cpp tests to subsys/cpp
Wrongly places under application_development. We have a CPP subsystem,
so move them under tests/subsys/cpp for consistency.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-29 09:00:40 -04:00
Krzysztof Chruscinski
a1829cf235 irq_offload: Remove ifdef from the api
Removed #ifdef that guarded irq_offload API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
fb6a69ec81 boards: arm: qemu_cortex_m0: use LFXTAL
Update configuration of qemu_cortex_m0 to use LF XTAL as low
frequency clock source. Previously used RC requires more
modules to be fetched into the build, including TEMP sensor
used for clock calibration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
acd8d8ebda tests: kernel: fatal: Add no multithreading test
Added test which verifies that when multithreading is disabled
exception as correctly handled by the kernel.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
518193f444 soc: arm: nordic: Do not use PM when no multithreading
Enable by default power managment only when multithreading is
enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
a4af0ee2ec logging: Fix support for no multithreading
Fixed to ensure that semaphore is not used by the log core
when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
fe8fe41571 drivers: serial: nrf_uarte: Support for no multithreading
Don use k_sleep when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
40315adeb2 drivers: clock_control: nrf: Supoprt no multithreading
Add support to no multithreading configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
d5664a4a2d debug: Allow spin lock validation only with multithreading
Spin lock validation is touching threads. Allow only when
multithreading is enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Peter Bigot
b417442575 doc: kernel: document general policy for Zephyr without threads
This provides the documentation of scope required as a stage towards
removing deprecation for CONFIG_MULTITHREADING=n.  The specific lists
of what does work will follow as the code base is inspected and
updated.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
2165e8c585 Revert "kernel: Deprecate CONFIG_MULTITHREADING"
This reverts commit 28cb9dab64.
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
4f949a28fb tests: kernel: mem_heap: Add CONFIG_MULTITHREADING=n configuration
Extended mheap_api_concept test suite to support case when
multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
693c3fbb9d tests: kernel: mem_slab: Add no multithreading support
Extended mslab_api test suite with CONFIG_MULTITHREADING=n
configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
e99a015ba3 tests: kernel: threads: no-multithreading: Extend test
Extended test to validate following functionality:
- k_busy_wait
- k_timer
- irq_lock/irq_unlock
- k_cpu_idle
- SYS_INIT()

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
2e085a5202 tests: kernel: timer: timer_api: Extend with CONFIG_MULTITHREADING=n case
Extended test to validate that timer API is working as expected
when CONFIG_MULTITHREADING=n.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
5e06b4add0 testsuite: ztest: Add support for CONFIG_MULTITHREADING=n
Added support for no multithreading case where test cases are
called directly from main(). On failure in ztest assert macro,
macro returns from the function. It implies that ztest assert
macros can only be called in the test function.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
b85250108c kernel: Limit kernel files when CONFIG_MULTITHREADING=n
Avoid fetching files which use scheduler. By explicitly avoiding
including RTOS specific files we ensure that it is not fetched
accidently.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
1ba23ca92b kernel: fatal: Avoid thread api access when no multithreading
Remove access to thread API when multithreading is off.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
c482a572d4 kernel: heap: Add support for CONFIG_MULTITHREADING=n
Ensure that k_heap is not attempt to block the thread when
timeout is set and space cannot be allocated.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
3b4b7c3a37 kernel: mem_slab: Add support to no multithreading
Mem_slab supports allocation with timeout which blocks the context
if no slab is available. Updated to treat every timeout as K_NO_WAIT
when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
dd0715c770 kernel: timer: Adding support to CONFIG_MULTITHREADING=n
Updated timer to not touch thread/scheduler code when multithreading
is off.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
7dcff6ecfe kernel: Move _kernel from sched to init
_kernel struct can be used when multithreading is disabled.
In that case sched.c may not be compiled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Krzysztof Chruscinski
b8fb353cd4 kernel: Move k_busy_wait from thread to timeout
K_busy_wait is the only function from thread.c that is used when
CONFIG_MULTITHREADING=n. Moving to timeout since it fits better there
as it requires sys clock to be present.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Lauren Murphy
09ba258b05 docs: rearrange toc
Fix index.rst and README.rst to put TensorFlow samples under
External Module samples next to Nanopb sample to avoid 4-level
indentation in the sidebar.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Lauren Murphy
14e6d1cf5d samples: add tensorflow magic wand sample train scripts
Adds training scripts to TensorFlow Magic Wand sample.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Lauren Murphy
83a036d738 samples: add tensorflow magic wand sample
Adds Tensorflow Magic Wand sample to tree.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Lauren Murphy
42e2a9ed21 samples: add tensorflow hello world sample train scripts
Adds training scripts to TensorFlow Hello World sample.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Lauren Murphy
cb4d28a066 samples: add tensorflow hello world sample
Adds Tensorflow Hello World sample to tree.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Lauren Murphy
a010d9152d modules: add tensorflow
Adds Kconfig option enabling TensorFlow Lite Micro support.
Updates manifest with TensorFlow module.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Marcin Niestroj
ba391b80b0 drivers: modem: hl7800: use dns_resolve_reconfigure() API
Use recently introduced API, which takes care of gracefully closing any
pending DNS requests and replacing existing DNS server list with new
one.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-04-29 08:00:09 -04:00
Marcin Niestroj
bb8b8b8b5f drivers: wifi: esp: use dns_resolve_reconfigure() API
Use recently introduced API, which takes care of gracefully closing any
pending DNS requests and replacing existing DNS server list with new
one.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-04-29 08:00:09 -04:00
Marcin Niestroj
d30b68a39a net: ppp: ipcp: use dns_resolve_reconfigure() API
Use recently introduced API, which takes care of gracefully closing any
pending DNS requests and replacing existing DNS server list with new
one.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-04-29 08:00:09 -04:00
Marcin Niestroj
de15a49640 net: dhcpv4: use dns_resolve_reconfigure() API
Use recently introduced API, which takes care of gracefully closing any
pending DNS requests and replacing existing DNS server list with new
one.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-04-29 08:00:09 -04:00