This commit introduces support for multiple SOC_ROOT.
This means that additional SOC_ROOTs specified using -DSOC_ROOT as
argument to CMake will be forming a list together with ${ZEPHYR_BASE}.
This allows for greater flexibility, as developers can now specify
multiple out-of-tree SoCs and not worry about the SoC used for the
board they compile for.
Also it avoid code, such as:
if(BOARD STREQUAL my_board_using_out_of_tree_soc)
set(SOC_ROOT some/out/of/tree/soc/path)
endif()
in application CMakeLists.txt.
Finally, allowing multiple SOC_ROOTs prepares for specifying SOC_ROOTs
in Zephyr modules.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit relocates the generated Kconfig.modules file from
${CMAKE_BINARY_DIR} into ${CMAKE_BINARY_DIR}/Kconfig.
This is done as preparation of multiple SOC and ARCH root support.
A single Kconfig folder inside ${CMAKE_BINARY_DIR} helps to keep the
build folder tidy.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is a cleanup of the SOC_DIR usage.
This cleanup is a preparation for supporting a list of SOC_ROOT instead
of just allowing one SOC_ROOT.
Supporting a list of SOC_ROOTs allows for placing of SOC in Zephyr
modules. It also aligns how BOARD_ROOT supports a list, and thus usage
of n_ROOT in Zephyr becomes more consistent.
This commit introduces the following changes:
- soc/xtensa/intel_apl_adsp/bootloader.cmake removed.
This file is not included elsewhere in the build system, and appears
to be leftover from #25133. Almost identical content is found in
`soc/xtensa/intel_apl_adsp/commonbootloader.cmake`
- Changed xtensa/intel_apl_adsp to named library. Using a named library
allow fetching library files based on library name without the need to
know build path (and thus removes the need for knowing `${SOC_DIR}`).
- Changed SOC_DIR/ARCH/SOC_FAMILY to use CMAKE_CURRENT_LIST_DIR for
configure time commands, as CMake code is already located inside this
path.
- Using generator expression for library files from other CMake targets.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
close in error handling attempts to close incorrect file descriptor.
Fixes#27327
Coverity-CID: 211585
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fix incorrect use of LLL ticker user id in ULL_LOW execution
context.
Regression introduced in commit 23ef75f6d9 ("Bluetooth:
controller: split: Fix Low Latency Prepare Done").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix a regression that caused flashing on nRF51x Series to stall
the Bluetooth low energy controller and flashing under
BT_CTLR_LOW_LAT option.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Currently, when usage.cmake is run, the shield list is in construction
order, making it difficult to locate the shield of interest. This sorts
the list upon display and also makes the display indent consistent.
Signed-off-by: Aleksandr Koltsoff <czr@iki.fi>
The previous test had two defects. First, the shell command was called
before the backend was initialized.
Second, the test compared the string from shell's backend buffer with
the reference string using strncmp function. This test result was very
susceptible to the time when it was performed because of data contained
in the buffer. Apart from expected string there was data like escape
codes needed to control the terminal.
To fix it, function strncmp was replaced by strstr, which
searches for the reference strings regardless of the characters
controlling the terminal.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
The original return type of tcp_data_get() was unsigned and the
return value <0 was not checked properly.
Fixes#25723
Coverity-CID: 210559
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
include/cache.h: System calls declaration and implementation
kernel/cache_handlers.c: Defination of verification functions
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
The previous commits added the SAM0 DAC driver. Now document and
enable it, including enabling it in the DAC sample.
Signed-off-by: Michael Hope <mlhx@google.com>
The peripheral is the same on the SAMD20 and SAMD21 except for
different clock and interrupt settings. There is no DAC on the SAMR21.
Leave disabled by default as the DAC is fairly power hungry.
Signed-off-by: Michael Hope <mlhx@google.com>
This change adds the 'fixed-link' sub-node of the ip_k66f board's
ethernet node. The fixed link is set to work with 100 Mbps and
full duplex.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit adds support for setting fixed configuration, read
from device tree, for ENET ETH interface and PHY.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit enables support for parsing 'fixed-link' node when it
is added to node described in 'ethernet,fixed-link.yaml'.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
This patch adds description for 'fixed-link' node in ethernet DTS
node. It supports setting speed and duplex.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Some ICs - like DSA switches (e.g. ksz8794) - do not use SMI to setup
and configure PHY.
This change introduces a new Kconfig define - CONFIG_ETH_MCUX_NO_PHY_SMI
- to allow replacing SMI communication with SPI or I2C.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The new LPC WWDT shim driver needs HAL update, which is provided by
the commit 7276046215cfcd4ed3d6723f16f7aeb868b0fb60.
Signed-off-by: Jiří Keresteš <jiri@kerestes.cz>
For some reason, MCUMgr used to consist of two separate Kconfig
files, likely due to the fact that the author's original intention was
to split the "management" and "mcumgr-specific" options in order to
integrate additional libraries. In practice this never worked out, so
coalesce them into a single file.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Fixes#27266.
cmd_hdr and acl_hdr local structs were read but never written.
Causing unpredictable errors in bt_tx_thread such as :
"Invalid HCI CMD packet length" in hci.c:2280
or Imprecise data bus errors on nrf52810.
cmd_hdr and acl_hdr are now filled with the received data
from SPI Master.
Signed-off-by: Corentin Dorothée <corentin.dorothee@gmail.com>
Numbers in C macros are treated as signed integer. This causes
issues when using macro KB(x). If the result is larger than
(2^31 - 1), it is treated as a negative number downstream.
For example, the RAM size of up_squared is 2GB. The result of
KB(CONFIG_SRAM_SIZE) should be 2147483648, but due to being
casted as signed, the result is instead -2147483648. Any
calculations using this would be incorrectly. Fix it by
casting x in KB(x) to size_t first.
Fixes#27164
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add note regarding safe use of the k_work_pending return value. Similar
to the note for k_delayed_work_pending.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add k_delayed_work_pending similar to k_work_pending to check if the
delayed work item has been submitted but not yet completed.
This would compliment the API since using k_work_pending or
k_delayed_work_remaining_get is not enough to check this condition.
This is because the timeout could have run out, but the timeout handler
not yet processed and put the work into the workqueue.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Using SPIM_FREQUENCY_FREQUENCY_M32 to check if the device has HS-SPI and
able to use higher SPI clock than 8MHz.
Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no>
The LwM2M server might modify the lifetime value while the device is
registered, hence it's needed to obtain the value directly from the
Server object instance, before each Register Update.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A proper way to match a Security object instance with a Server object
instance is via Short Server ID resource. Both coupled object instances
should carry the same value of this resource in order to me considered
matched.
This was not implemented in the LwM2M library and it was incorrectly
assumed that the Security object instance index corresponds to the
Server object instance index. While such apporach works is simple
scenario, it might yield incorrect results when bootstrap is used.
Fix this, by verifyng the Short Server ID resource in the Secuirty
instance used, and finding a matching Server instance. The server object
instance is stored for future use in the engine.
Additionally, remove an extra Server object instance that was created
when the bootstrap procedure was used. Since the boostrap Security
object instance does not have the corresponding Server object, it's
enough to have a single Server instance.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Remove the static buffer for TCP options. Make sure that the
options were read properly to temp buffer.
Fixes: #25729
Coverity-CID: 210056
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Value of this member was never assigned, so it was always 0. Remove it
to simplify code a little bit.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Now that the relevant APIs generalize properly for bindings without
flags, we can remove some special case checks from the tree.
I couldn't find any more, but I did this kind of quickly, so it's
possible I missed some.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Just as was done for GPIO flags, make PWM flag accessors default to 0
when there are no flags. This makes the API easier to use correctly.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The vast majority of devicetree bindings for GPIO controllers are
expected to have "flags" cells in their respective GPIO specifiers,
but that's not required by the specification and we want to make sure
to support that.
However, so many drivers and applications initialize gpio_dt_flags_t
values that it's silly to require each and every one of them to check
for the flags value and fall back to the sensible default flags value
of 0 when it does not exist.
Make the API easier to use correctly by returning 0 in the devicetree
core API for accessing flags, whenever there are no flags defined.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add a variety of property and specifier cell accessors that fall back
on a default value supplied by the caller if the devicetree does not
contain the requested data.
This is useful for avoiding use of COND_CODE_1() and similarly tricky
macros in applications and drivers.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Move some common macros shared between different unit test functions
up to the top of the file to make them easier to spot and keep them a
bit tidier.
This cleanup excludes macros that are only used for specific purposes
in a single function.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Reorder the instance number property access macros. The non-instance
number ones appear in this order: DT_PROP(), DT_PROP_LEN(),
DT_PROP_HAS_IDX(), DT_PROP_BY_IDX(), DT_LABEL().
Improves readability slightly by moving code around so INST versions
appear in the same order as non-INST versions.
No functional changes expected.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
EATT channels use bt_l2cap_chan_send which does return the number of
bytes sent on success not 0 as bt_l2cap_send.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When passing a using --hardware-map, sanitycheck would ignore extra
args passed via --west-flash, such as --west-flash="--erase".
This is because the command with the extra args was overwritten by the
command with the runner info from the hardware map.
This patch merges those code paths so they are aware of each other and
of --west-runner.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Before sanitycehck was removing all `test_` chars in test cases'
names. This test has to be modify to work with the improved behavior
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>