Commit Graph

71777 Commits

Author SHA1 Message Date
Stephanos Ioannidis cb43c90058 samples: cpp_synchronization: Allow running on POSIX arch boards
This commit updates the cpp_synchronization to run on the "POSIX
architecture" boards such as `native_posix`, since the POSIX arch now
properly supports the main() defined in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis 17ea196b02 samples: cpp_synchronization: Enable CONFIG_CPP_MAIN
This commit updates the cpp_synchronization sample to enable
`CONFIG_CPP_MAIN` since it defines its main() in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis 8073115b4c doc: languages: cpp: Add notes about C++ main()
This commit adds notes about the C++ main() function prototype in the
C++ documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis ae0437d2df arch: posix: Declare _posix_zephyr_main with int return type
This commit updates the `_posix_zephyr_main` declaration to use the
return type of `int` instead of `void` when `CONFIG_CPP_MAIN=y` (i.e.
C++-compliant main() support is enabled) so that Zephyr applications
defining their main() in a C++ source file can make use of the proper
main() definition of `int main(void)` as required by the C++ standard.

Note that the forward declaration of `_posix_zephyr_main` is required
if and only if the main() is defined in a C++ source file (i.e. when
`CONFIG_CPP_MAIN=y`).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis fa5fd41b61 kernel: Add C++ main() support
The C++ standard requires the main() function to have the return type
of 'int' and does not allow the main() to be defined with the 'void'
return type. Moreover, GCC goes as far as to emit a hard error when the
'::main()' has the return type of `void`.

This commit introduces an option to instruct the Zephyr kernel to call
the 'int main(void)' instead of the 'void main(void)' in case a Zephyr
application defines main() in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Elvar Tresnak 53666831d5 doc: POSIX arch: Add link to POSIX OS abstraction
In the note about the relationship between the POSIX arch
and the POSIX OS abstraction, add a link.

Signed-off-by: Elvar Tresnak <Elvar.Tresnak@gmail.com>
2022-11-05 08:41:24 +01:00
Anas Nashif e21cc69c90 tests: kernel: cleanup test meta-data
Mostly tag cleanup and fixing issues related to bad filtering in the
link_generator scenarios.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 22:13:54 -04:00
Anas Nashif a4d1c91115 tests: gen_isr_table: remove duplicate platform_allow
We should not have duplicated keys.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 22:13:54 -04:00
Anas Nashif 1b561d0f30 tests: kernel: fatal: cleanup test configuration
Use common section and remove duplication.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 22:13:54 -04:00
Dat Nguyen Duy 8db84cfa6a tests: drivers: gpio_api_1pin: support GPIO interrupt tests for NXP S32Z27
add support GPIO input interrupt tests for NXP S32Z27

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-11-04 17:44:08 -04:00
Dat Nguyen Duy 1db8419868 tests: drivers: gpio_basic_api: support to run the test on NXP S32Z27
Add support to run the test on NXP S32Z27, the wiring connection
is needed as describe in overlay file

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-11-04 17:44:08 -04:00
Dat Nguyen Duy da04197fdf drivers: gpio_s32: expose gpio_utils.h
Expose gpio_utils.h to follow updates in #51526

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-11-04 17:44:08 -04:00
Dat Nguyen Duy 6664953f12 drivers: gpio: support GPIO input with interrupt for NXP S32Z27
Add support input interrupts for GPIO pins on NXP S32Z27
SoC. The driver will convert GPIO pin to respective
interrupt line that will be processed by External
Interrupt Controller.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-11-04 17:44:08 -04:00
Dat Nguyen Duy 607358b084 drivers: interrupt_controller: initial support for NXP S32Z27 EIRQ
Add initial support for the NXP S32Z27 SIUL2 External
Interrupt Controller. Each SIUL2 node has a child node
will act as an interrupt-controller that processes external
interrupt signals.

This driver is required to manage GPIO interrupts.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-11-04 17:44:08 -04:00
Stancu Florin 33b86d6945 tests: ADC API: add support for cc1352r* boards
Add ADC API tests for the TI CC1352R1 LaunchXL, CC2652R1 LaunchXL and
TI CC1352R SensorTag boards.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Stancu Florin b9f462e890 boards: cc13x2/cc26x2*: add ADC sample + update docs
Add ADC driver sample overlays + update features in doc + metadata for TI
CC13x2/CC26x2 based boards (cc1352r_sensortag, cc1352r1_launchxl,
cc26x2r1_launchxl).

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Stancu Florin 42915e498e drivers: ti: cc13xx/cc26xx: implement ADC driver
New ADC driver for the TI CC13xx/CC26xx family.

ADC channel configurations are translated from Zephyr constants to
simplelink driverlib ones (e.g., sample times use a lookup table).

Async mode was also implemented & tested.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Kamil Serwus 278120acb6 board: samc21: add support for SAMC21N Xplained Pro Board
Add basic support board with SAMC21N soc including SPI, UART, I2C,
ADC, Flash, Leds.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Kamil Serwus cad62fae61 soc: atmel: add base support for C2x SOC
Adds Atmel SAMC20 and SAMC21 soc. C series is based on Cortex-M0+.
C21 contains CAN interface.

The init routines are same for SAMC20 and SAMC21. They use one
clock OSC48M without configuration.

The code is inspirated from atmel_sam0/samd21.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Kamil Serwus 9f5edfbc55 soc: arm: atmel: Add revisions to soc
Some SAM0 contains revisions with separated includes for example
SAMC21 and SAMC21N.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>

Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-11-04 16:03:01 +01:00
Kamil Serwus 3d29f708c0 manifest: update hal atmel for c2x support
Hal atmel intruduces c20/c21 series support.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Tom Burdick dbc366918d tests: Enable qemu_xtensa logging tests
Enables logging testing for qemu_xtensa along with the fixes needed to
correctly run the tests.

Several tests in log_api rely on being able to calculate the size of
the message in the mpsc_pbuf to know when an overflow occurs. The
size being calculated assumed a ROUND_UP size alignment to sizeof(long
long). On xtensa this is actually 16 bytes as defined by
CBPRINTF_PACKAGE_ALIGNMENT.

Changes the size calculation for SIMPLE_MSG_LEN to account for this.

The second issue was a misaligned package that would cause reading
from the incorrect memory when going to format the package with cbpprintf.

Fixes the padding used to align the package in cbprintf.h and adds a build
assert ensuring correct alignment when building against xtensa in both
cbprintf.h and log_msg.h.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-11-04 11:02:27 -04:00
Stephanos Ioannidis afdf012a63 ci: manifest: Drop west label for manifest updates
This commit updates the manifest workflow to not label the pull
requests updating the west manifest (`west.yml`) with the `west` label
because the `manifest` label alone is enough for this purpose and the
`west` label can be easily confused with the `area: West` label.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-11-04 15:51:17 +01:00
Keith Packard 261025a86e modules/hal/ti: Merge patch fixing errno usage for picolibc
This replaces *__errno() with errno as that is required for picolibc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-11-04 07:19:06 -04:00
Artur Hadasz 382cba8e60 dts: bindings: nordic,nrf21540-fem: add supply voltage parameter
This commit adds an optional property to the nRF21540 Front-End Module
devicetree description that specifies supply voltage in mV. This
property can be used by the nRF21540 driver to compensate the value of
achieved gain for different supply voltage.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-11-04 12:02:50 +01:00
Emil Obalski 2e9992f3c8 doc: Add IPC service documentation
Adding IPC service documentation for ICMSg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2022-11-04 11:51:54 +01:00
Flavio Ceolin 0c2607786d tfm: mbedtls: Fix build warning
/__w/zephyr/modules/crypto/mbedtls/library/aes.c:307:23: warning:
'RT0' defined but not used [-Wunused-const-variable=]
307 | static const uint32_t RT0[256] = { RT };
      |                       ^~~
/__w/zephyr/modules/crypto/mbedtls/library/aes.c:200:28: warning:
'RSb' defined but not used [-Wunused-const-variable=]
  200 | static const unsigned char RSb[256] =
      |                            ^~~
[360/437] Building C object

Fixes #51025

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-11-04 10:18:20 +01:00
Francois Ramu 4d5c99060a tests: drivers: dma: test the DMA drivers on the stm32MP157 disco kit
Define configuration to run the tests/drivers/dma
on the stm32mp157c_dk2 disco platform

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-04 10:16:56 +01:00
Francois Ramu d4889366ba drivers: dma: stm32 dma driver supporting the stm32mp1 serie
Add the support of the stm32MP1 family for DMA peripheral.
This dma driver is similar to the stm32H7.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-04 10:16:56 +01:00
Francois Ramu 75da6091be dts: arm: stm32mp1 family has DMA and DMAMUX instances
Define the DMA and DMAMUX peripheral for the stm32MP1
DMA1 and 2 are of type V1 of 8 streams (channels) each
with a DMAMUX peripheral. See the RefManual for details.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-04 10:16:56 +01:00
Anas Nashif aead5b523b sample: tracing: add a configuration for percepio
Add a sample configuration for percepio.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 10:00:48 +01:00
Anas Nashif 66b8847728 MAINTAINERS: update tracing areas
tleksell-pe is no longer working on Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 10:00:48 +01:00
Anas Nashif e6424c3945 manifest: update TraceRecorder commit
Update commit to fix issues with headers and unneeded null checks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 10:00:48 +01:00
Henrik Brix Andersen f7c4cf5a31 boards: x86: qemu: initialize flash simulator before EEPROM emulator
On the x86 QEMU boards the EEPROM emulator uses the simulated flash as
backend.

Change the default initialization priority for the EEPROM drivers to ensure
the flash simulator is ready before initializing the EEPROM emulator.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-04 09:00:23 +00:00
Mariusz Skamra fbeee206f2 Bluetooth: audio: pacs: Hotfix invalid PACS length
This fixes adding 2 redundant bytes... to the PAC records.
As a result we end up with broken PAC record.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 10:00:00 +01:00
Mariusz Skamra 7405f81db6 Bluetooth: audio: pacs: Remove unused structure member
The 'pacs' member was never referenced.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 10:00:00 +01:00
Mariusz Skamra 8f6fc38ca3 Bluetooth: audio: unicast_client: Remove redundant code
The unicast_client_ep_set_codec function that is called below
sets the codec id, cid, vid.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 10:00:00 +01:00
Juha Heiskanen efa75b5a76 net: lwm2m: Send operation registry lock update
Secured Message allocation, init and rebuild process for secure
timeseries ring buffer.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-11-04 09:59:51 +01:00
Juha Heiskanen 05a92f9258 net: lwm2m: Timeseries data cache read update
Added support for handle case when all data is not possible to
add in 1 message for Send and Observed Notification.

Notification continuous pending timeseries data is triggred
by iMIN attribute.

Send Operation generate continuous message in multiple lwm2m
message.

Normal Read by server only report back latest stored data.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-11-04 09:59:51 +01:00
Henrik Brix Andersen ace688b075 drivers: eeprom: mchp_xec: add missing kernel.h include
Add missing kernel.h include.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-04 08:59:24 +00:00
Kai Vehmanen 2dc9257ae1 drivers: dmic: remove invalid assert on dmic->created
struct dai_intel_dmic never had a "created" member, so this assert seems
to be accidentally left in the code. Remove it to allow building builds
with dmic driver with asserts enabled.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-11-04 08:59:11 +00:00
Evgeniy Paltsev 785f95a626 ARC: mwdt: add __fallthrough attribute support
As we set the minimal required version of ARC MWDT to 2022.06
we can add __fallthrough attribute

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-11-04 08:58:42 +00:00
Evgeniy Paltsev 82b14692ed ARC: mwdt: mark _Generic and __auto_type types supported
As we set the minimal required version of ARC MWDT to 2022.06
we can mark _Generic and __auto_type types supported

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-11-04 08:58:42 +00:00
Tommi Kangas 75b5eaac0f net: lwm2m: fix hanging deregistration
Fixed a deadlock in deregistration by moving mutex unlocking.

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
2022-11-04 08:56:05 +00:00
Mariusz Skamra 50b57056bd Bluetooth: iso: Fix calling wrong function to terminate BIG
The bt_iso_chan contains vaild pointers for Tx and Rx QoS parameters.
This unifies the implementation between different roles.
This fixes checking ISO type that is done based on ISO type that
is kept inside of conn.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 08:55:12 +00:00
Mariusz Skamra 0fa978508c Bluetooth: audio: unicast_client: Inform all related EP's about ISO state
This fixes application callbacks not being called on ISO connection
state change.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 08:55:12 +00:00
Mariusz Skamra 3fa456905d Bluetooth: audio: Factor out bt_audio_iso pool
This adds common bt_audio_iso pool that will be used across all the
roles/profiles. The pool range is dependent on the CONFIG_BT_ISO_MAX_CHAN
which is the maximum number of ISO connections the host can maintain.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 08:55:12 +00:00
Mariusz Skamra 1aaf1e522f Bluetooth: audio: unicast_client: Remove unused functions
This removes unused functions from unicast_client.c

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 08:55:12 +00:00
Mariusz Skamra 6fde7ae96d Bluetooth: audio: ascs: Move control point work to EP
Move the control point work to the EP. The aim is to cleanup the code so
that it there's no EP for ASE that means ASE is in idle state.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-11-04 08:55:12 +00:00
Ryan Erickson 35df759e20 modem: hl7800: ensure net_if_down is triggered and not ignored
Trigger network dropped based on socket error notifications.
This debounces the network state and only triggers
the network interface to go down if the network
really drops or causes socket problems.
This will ensure upper networking stack layers can
cleanup broken sockets properly.

Debounce DNS resolver refresh.
Only trigger DNS resolver refresh if the DNS address changes.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-11-04 08:54:50 +00:00