Commit graph

57737 commits

Author SHA1 Message Date
Daniel Leung
2d5c724ed8 Revert "soc: intel_adsp: fix linker script for cavs_v20"
This reverts commit 3cc14b2c2b.

Revert this due to the same reason as commit
a29b66bbf5:

  Unfortunately this mechanism doesn't seem to actually work on the SDK
  linker.  The emitted sections, when passed a symbol name as the "start
  address" just appear wherever the "." variable was pointing (in this
  case, into the cached region).  That breaks the kernel coherence
  layer, obviously.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-16 10:13:46 -05:00
Lukas Gehreke
0544f5dbc3 drivers: gpio: Added mcp230xx GPIO driver.
Added driver for the mcp230xx series I2C-based GPIO chips.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2021-11-16 10:13:14 -05:00
Francois Ramu
eeb6921f34 tests: spi: spi loopback test running on the stm32f767zi nucleo
Add support of the tests/drivers/spi/spi_loopabck
with dma (V1).
Connect MISO pin (D12) to MOSI (D11) pin on the board
to pass the test.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-16 10:12:39 -05:00
Francois Ramu
dfc6611a31 tests: spi: loopback testing with NOCACHE MEMORY buffers for DMA
This patch is defining Tx buffers in NON CACHE memory for using
with DMA transfers. This requires the CONFIG_NOCACHE_MEMORY=y
flag when mcu is using CACHE.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-16 10:12:39 -05:00
Torbjörn Leksell
86d8b36955 Tracing: k_free tracing hook heap reference added
Added heap reference parameter to k_free tracing
hook to allow tracing of the pointer which was
passed as a parameter to a k_free call.
As part of this update the defines
(for this hook) in the various tracing formats
was also updated.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
2021-11-16 09:45:01 -05:00
Aleksander Wasaznik
b4bcffb4de CODEOWNERS: Replace joerchan with alwa-nordic
I'm taking over for joerchan at Nordic Semiconductor as a Zephyr
Bluetooth host collaborator.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2021-11-16 07:44:40 -05:00
Anas Nashif
43622e0864 actions: clang: fix typo
Add missing ")".

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 13:02:57 +01:00
Anas Nashif
9852790811 actions: clang: do not rebase, use commit range
Avoid rebasing and instead use the commit range. This avoids issues with
trees having intermediate rebase data after a reboot (due to
cancellation).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 06:48:20 -05:00
Anas Nashif
add37df1bc actions: run code coverage only on main tree
Run code coverage reporting on main zephyr repo only.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 06:48:20 -05:00
Torbjörn Leksell
f527a81dcf Tracing: Tracing/Kernel dependency issue fix
Added forward declarations of types declared
throughout kernel.h at the start of
kernel.h. With this change it is possible to
include tracing/tracing.h early in kernel.h
and use the tracing functionality in
kernel.h functions without compile errors
which would result if tracing/tracing.h
was included at the end of kernel.h
(type dependencies).

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
2021-11-16 06:40:00 -05:00
Vinayak Kariappa Chettimada
e07af1fa08 Bluetooth: Controller: Fix Periodic Sync Failed to be Established
Fix Periodic Advertising Synchronize implementation to
generate Synchronization Failed to be Established event
when 6 AUX_SYNC_IND PDUs are not received when establishing
synchronization.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-16 12:12:56 +01:00
Vinayak Kariappa Chettimada
f9ac97336d Bluetooth: Controller: Rename ticker operation callbacks
Rename ticker operation callback suitably to reflect their
purpose.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-16 12:12:56 +01:00
Dominik Ermel
1d17a4bc55 mgmt/mcumgr: Add CONFIG_IMG_MGMT_FRUGAL_LIST
The commit adds Kconfig options that enables "frugal status list";
when enabled, the status list will be sent with zero, empty and false
values omitted, slightly reducing number of bytes sent as response
from device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
1593357dde manifest: Remove mcumgr from manifest
The commit removes mcumgr library, as module, from west.yml
manifest, as the mcumgr library source is now kept within Zephyr
source code tree.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
a29ab5106b mgmt/mcumgr/lib: Add Kconfig option MGMT_CBORATTR_FLOAT_SUPPORT
The option enables float numbers processing within CBOR attributes.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
cf10549e7e mgmt/mcumgr/lib: Replace license block
The commit changes licensing to SPDX tags.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
56e602b22b mgmt/mcumgr/lib: Fix compliance
Commit fixes compliance issues.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
0bc87573bf mgmt/mcumgr/lib: Documentation fixes
References to Mynewt have been removed and README for Zephyr has been
merged directly to the README.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
dfc57ae390 mgmt/mcumgr/lib: Remove non-Zephyr code
The commit removes MYNEWT sepcific code and code that has been
conditionally compiled with "ifndef _ZEPHYR_".

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
c8381a9d14 mgmt/mcumgr/lib: Remove log management commands
Not implemented.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Dominik Ermel
af75feac4f mgmt/mcumgr/lib: Copy mcumgr library under mgmt subsystem
The commit copies code of mcumgr, as a lib, under subsys/mgmt/mcumgr.
Only source files relevant for Zephyr have been copied, and changes
to source files have been limited only to path changes, where
required.
Samples have been left out as the only relevant sample, smp_svr,
is already within Zephyr source tree.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-16 10:45:57 +01:00
Jay Vasanth
70d4559fdf Microchip: MEC172x: eSPI driver
Updates to MEC172x eSPI driver to support ACPI shared
memory region and EC Host Command Subsystem through
ACPI_EC1 and Embedded Memory Interface (EMI).

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2021-11-16 10:43:42 +01:00
Michel Haber
9d815e5251 timing: use runtime cycles for cortex-m systick
Use sys_clock_hw_cycles_per_sec() instead of
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC to determine clock cycles.

Signed-off-by: Michel Haber <michel-haber@hotmail.com>
2021-11-16 10:43:18 +01:00
Vinayak Kariappa Chettimada
c025e07557 Bluetooth: Controller: Fix DTM HCI command returned error codes
Fix DTM HCI command returned error codes.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-16 10:42:38 +01:00
Vinayak Kariappa Chettimada
ee40950282 Bluetooth: Controller: Fix missing DTM Tx/Rx reset on HCI Reset Command
Fix missing implementation to reset DTM Tx/Rx reset on HCI
Reset Command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-16 10:42:38 +01:00
Torsten Rasmussen
1594cd38b2 doc: zephyr build process description
Updated the Zephyr build process description to include description of
all Zephyr link stages.

It extends the guide with description of the intermediate binaries as
well as the post-processing of those binaries.
- Unfixed size binary
- Fixed size binary

Post-processing
- Partition alignment
- ISR table generation

Build stages images has been updated and new images showing the
post-processing stages of the intermediate binaries has been added.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-11-16 10:41:59 +01:00
Jordan Yates
44b8a0d199 scripts: gen_handles.py: remove size restrictions
With `gen_handles.py` now running on the first pre-built image,
`zephyr_pre0.elf` there is no requirement for the device handle arrays
to remain the same size after processing.

Remove the padding generated in `gen_handles.py`, as well as the
temporary option `CONFIG_DEVICE_HANDLE_PADDING` which was added to work
around this issue.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-11-16 10:41:59 +01:00
Jordan Yates
28b2e55321 cmake: rework linker script generation and linker prebuilt stages
This commit reworks the linker script generation and linking stages in
order to better support fixed section location as required by #38836.

Today we have the following generated linker scripts and the elf output
depending on the system configuration:
- linker_app_smem_unaligned.cmd --> app_smem_unaligned_prebuilt.elf
- linker_zephyr_prebuilt.cmd    --> zephyr_prebuilt.elf
- linker.cmd                    --> zephyr.elf

as not all linker scripts may be created and as there is a need for the
possibility to move gen handles earlier then those stages has been
renamed into more generic names so that with this commit we have:
- linker_zephyr_pre0.cmd --> zephyr_pre0.elf
- linker_zephyr_pre1.cmd --> zephyr_pre1.elf
- linker.cmd             --> zephyr.elf

This also means that is the stage zephyr_pre1 is not needed, then build
can go from `zephyr_pre0.elf` to `zephyr.elf`.

The gen_handles.py has been changed so it now uses `zephyr_pre0.elf` as
input. This ensures that the handles array are final when invoking the
next build and linking stages.

To keep the current behavior of generating the isr table and kobj hash
of what was `zephyr_prebuilt` stage the code blocks contolling isr
generation and kobj hash has been relocated to be located after
app_smem and device handle generation.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-11-16 10:41:59 +01:00
Jordan Yates
8d93217af4 cmake: new global property for generated files
Introduce a new global property for source files that are generated from
the initial Zephyr link (app_smem_unaligned_prebuilt). This source list
is used for files which will introduce address shifts into the final
binary, which need to be present in `zephyr_prebuilt.elf` for
`CONFIG_USERSPACE` scripts to correctly generate `zephyr.elf`.

This resolves #38836.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-11-16 10:41:59 +01:00
Jordan Yates
c03e658369 cmake: update desc of GENERATED_KERNEL_* variables
The previous description of the `GENERATED_KERNEL_*` cmake variables
was incorrect in that these are generated after the second link stage
when `CONFIG_USERSPACE` is enabled.

The sources in these variables are generated from `zephyr_prebuilt.elf`
for inclusion in `zephyr.elf`. However `zephyr_prebuilt.elf` is preceded
by `app_smem_unaligned_prebuilt.elf` when `CONFIG_USERSPACE` is enabled.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-11-16 10:41:59 +01:00
Anas Nashif
aace2da700 actions: follow namespace for job names
To avoid conflicts in reporting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif
5da807d57d actions: conflict: update version
Use released version instead of master.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif
e50cbdb9f8 actions: compliance: minor improvements
Namespace job names and retry west update if something goes wrong the
first time.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif
e49240941f actions: bluetooth: rename action and make it obvious
Rename to make action file name obvious referring to bluetooth, rather
than the tool used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif
75b7a35aec actions: bluetooth: fix job names and description
Misc fixes including:
- unique job names
- Change description to mention Bluetooth
- Retry west update
- Use latest unit test publication action

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Joakim Andersson
9b87d6f7fc modules: tfm: Fix cmake warnings for unused variables
Fix cmake warnings for TF-M build system when PSA tests are not enabled.
This produces the following warnings:
"
CMake Warning:
  Manually-specified variables were not used by the project:

    PSA_TOOLCHAIN_FILE
    TOOLCHAIN
"

These warnings can point to cache or config variables being updated in
the TF-M build system so keep this free of warnings.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-15 14:54:48 -05:00
Michał Barnaś
34d449df79 linker: add DWARF-5 debug sections
DWARF-5 standard replaced the location list (.debug_loc) and range
list (.debug_ranges) sections with new sections (.debug_loclists
and .debug_rnglists).
They weren't handled which resulted in many orphan sections
reported as warnings by linker.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-11-15 14:52:25 -05:00
Eduardo Montoya
68d34e4adb openthread: upmerge up to commit c02d1110
Regular upmerge.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-11-15 14:45:08 -05:00
Immo Birnbaum
99b7e9d860 boards: arm: qemu_cortex_a9: change board's timing parameters
- Fix the system clock frequency: should be 111.1 MHz instead
of 100 MHz.
- Set ticks per second to 1000 for higher system clock precision.
- Set QEMU icount shift value to 3 so that one instruction gets
executed every 2^3 = 8 ns.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2021-11-15 14:44:56 -05:00
Emil Gydesen
c8f08c9e94 Bluetooth: ISO: Update loop variables types in iso.c
Some of the loop variables used `int` where it
makes more sense to use `size_t` or `uint8_t`.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
db29cea01c Bluetooth: ISO: Add CIG state machine
Add a state to the bt_iso_cig struct. This makes
checks for the CIG state easier, and follows the
state machine in the core spec.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
65620363e3 Bluetooth: ISO: Add CIG reconfigure function
Add function to reconfigure and even add additional
CIS to a CIG.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
be1912b66a Bluetooth: ISO: Move validation of CIG parameters to function
Move the validation of specific CIG parameters to its
own function. This is mainly to be able to reuse it for
validationg CIG refconfiguration parameters.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
19c032ed78 Bluetooth: ISO: Rename bt_iso_cig_create_param
Renames the struct from bt_iso_cig_create_param to
bt_iso_cig_param as the same struct can, without
modification, be used to update the CIG as well
(function to support that will come in a later commit).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
3f345132e0 Bluetooth: ISO: Move cis/bis param checks to earlier
Move the verification of the individual cis/bis checks to
an earlier point, because we actually start allocating
resources for the groups.

This removes a double check for NULL, while also
allows us to terminate earlier if there were any
issues.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
2b58a94ab2 Bluetooth: ISO: Rename cis/bis in cig/big to cis/bis channels
Rename the field in the struct to x_channels to make
it more clear what the field represents.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Emil Gydesen
ba0a053f94 Bluetooth: ISO: Change CIG/BIG to use slist instead of array
A CIG may be updated later to include more CIS, and thus a slist
makes more sense.

The BIG doesn't need the change, but it makes more sense to
have similar handling for both.

This change also removes the requirement that the arrays
used to create the CIG/BIG need to static.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-15 14:39:59 -05:00
Adhipta Putra
2d9a4d13c0 Bluetooth: Controller: Updated code indent to use tabs
Replacing spaces code indent

Signed-off-by: Adhipta Putra <adhipta.putra@nordicsemi.no>
2021-11-15 14:39:43 -05:00
Adhipta Putra
f3654fc4f9 Bluetooth: Controller: Added PDU_CRC_POLYNOMIAL
Replacing RADIO_CRC_POLYNOMIAL

Signed-off-by: Adhipta Putra <adhipta.putra@nordicsemi.no>
2021-11-15 14:39:43 -05:00
Adhipta Putra
8a9711b48f Bluetooth: Controller: Use sys_get_le24 to fetch 24-bit data
Use sys_get_le24 to pass crc init value input

Signed-off-by: Adhipta Putra <adhipta.putra@nordicsemi.no>
2021-11-15 14:39:43 -05:00