When offloading only ZSOCK_POLLIN and DNS_EAI_MEMORY are available, so
use those instead of the standard ones.
Fixes#28069.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
On errors we were aborting immediately skipping any needed cleanup after
the error has occured. This will run the cleanup function and upload
reports of failure when something bad happens.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This command add support for `<command>_flag_final` to all bintools
commands.
This allows users that has special use-cases to use a CMake script
for bintool command execution, and thereby have full control of command
invocation and argument processing.
Example of how to specify the property for such use:
Calling a custom script for elfconvert command:
set_property(TARGET bintools
PROPERTY elfconvert_command ${CMAKE_COMMAND})
set_property(TARGET bintools
PROPERTY elfconvert_flag "")
set_property(TARGET bintools
PROPERTY elfconvert_flag_final -P elfconvert.cmake)
set_property(TARGET bintools
PROPERTY elfconvert_flag_strip_all "-DSTRIP_ALL=True")
set_property(TARGET bintools
PROPERTY elfconvert_flag_infile "-DINFILE=")
set_property(TARGET bintools
PROPERTY elfconvert_flag_outfile "-DOUT_FILE=")
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit updates the get Zephyr settings functions to be able to
handle settings if those settings are expressed using a generator
expression.
As example, zephyr_get_include_directories_for_lang(...) would prefix
each include property of zephyr_interface with `-I`, like this:
Property: include;include/generated;lib/libc/minimal/include
becomes: `-Iinclude -Iinclude/generated -Ilib/libc/minimal/include`
But if the property contains a generator expression:
Property: include;$<TARGET_PROPERTY:compiler,some_include>
becomes: -Iinclude -I$<TARGET_PROPERTY:compiler,some_include>
and in case that property is a list, this results in:
`-Iinclude -Iinclude/list_item1;include/list_item2;include/list_itemN`
and thus breaking the build.
This is fixed by using `$<JOIN:<list>>` expression instead, which
ensures all list item, regardless of provided as simple list or through
the usage another generator expression, will always expand correctly.
Functions updated in the commit:
- zephyr_get_include_directories_for_lang
- zephyr_get_system_include_directories_for_lang
- zephyr_get_compile_definitions_for_lang
- zephyr_get_compile_options_for_lang
The sample `application_development/external_lib` has been updated
according to those changes.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
When fetching include, system include, compiler options, or compiler
defines, then it is important to strip the SHELL: (no de-duplication)
tag of any flag.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit fixes an issue in the process_flags function.
The function check a list of flags for generator expression for provided
language, for example:
$<$<COMPILE_LANGUAGE:C>:--flag>
and then converts that into a single compile flag, `--flag`
This works as long as $<COMPILE_LANGUAGE:[language]> is the only
generator expression present in the flag.
In case the flag contains multiple generator expression, then the
current substitution fails.
This commit keep existing behaviour for simple cases, but extends the
more complex cases into a always enabled generator expression, that is
$<$<COMPILE_LANGUAGE:C>:$<ADDITIONAL_EXPRESSION>> into
$<1:$<ADDITIONAL_EXPRESSION>>
and
$<$<FIRST_EXPRESSION>$<COMPILE_LANGUAGE:C>:--flag> into
$<$<FIRST_EXPRESSION>$<1:--flag>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit introduces disabling of de-duplication for imacro.
Disabling of de-duplication allows for a space between the imacro flag
and arguments.
This allows for broader range of compiler support in future.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
As part of toolchain abstraction three template files to facilitate
additional toolchain support development has been introduced.
Those covers:
- bintools
- compiler flags
- linker flags
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
GNU/bintools abstraction completed.
The following commands and flags are now available in bintools:
- memusage
- elfconvert
- dissassembly
- readelf
- strip
The bintools template has now been updated with more description which
will be useful when adding support for more toolchains in future.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Some logging configuration are compatible with software-base Link
Layer. Currently only one configuration is supported:
RTT back-end in drop mode and no clean output
Signed-off-by: Guillaume Lager <guillaume.lager@gmail.com>
Added macro that helps to declare multi-instance services. The macro
allows to statically define service structure array. Each element of
the array is linked to the service attribute array that is provided
by the user.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Add the command add-subscription to the shell to test the
bt_gatt_add_subscription API.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Allow the application to add subscription without resubscribing.
This is needed for persistent bonds that can go to deep sleep and
turn of the RAM or power-cycle.
In this case the application as a GATT client must have a way to add
the subscription callbacks back to the stack before the GATT server
sends notifications.
This should preferable be able to be done before even connecting
since the notifications can arrive immediately after connecting to
the peer.
The stack cannot persist this on it's own since it must remember the
function pointers for the callback functions. Storing these in
persistent storage would not be compatible with a Device Firmware
Upgrade (DFU) solution.
Fixes: #21798
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor the gatt_sub_add function to be similar in structure to how
find_cf_cfg is implemented. This is so that a subscription can be added
without an active connection.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Clarify the note about the lifetime of the subscribe parameters.
The note uses subscribe procedure lifetime, but the parameters
must remain valid after having subscribed as well, until the
subscription is removed.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fixes: #27934
This commit introduces additional naming support of config files.
It is now possible to create a config file of the form
`prj_<build>.conf` and automatically have a corresponding
`boards/<BOARD>_<build>.conf` config file merged.
As example, one can create a structure as:
|-- prj.conf
|-- prj_debug.conf
|-- boards
|-- nrf52840dk_nrf52840.conf
|-- nrf52840dk_nrf52840_debug.conf
when building: (existing behavior)
cmake -DBOARD=nrf52840dk_nrf52840 ...
prj.conf is merged with nrf52840dk_nrf52840.conf
when building: (new behavior)
cmake -DBOARD=nrf52840dk_nrf52840 -DCONF_FILE=prj_debug.conf ...
prj_debug.conf is merged with nrf52840dk_nrf52840_debug.conf
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Flag name usb_dev.configured is misleading as it does not
mean the device is configured. This flag indicates whenever
endpoints for the device were enabled. For all classes
except for audio endpoints are enabled on set_configuration
request. This sets the configured flag true. For Audio this
will never happen as what enables audio endpoints is
set_interface request. Without this patch audio samples
will STALL all interface requests.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
The dmamux requires HEAP size definition, so that k_malloc
is valid. The HEAP size config is defined in the common for
any stm32 soc instead of specific to dma Kconfig
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add support for the ARM DesignStart DAPLink board for Digilent Arty
S7/A7 (V2C DAPLink) shield.
This shield is designed to be used along with the ARM Cortex-M1/M3
DesignStart FPGA reference designs running on the Digilent Arty.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add missing default for enabling CONFIG_SPI if CONFIG_FLASH is
enabled. This is needed for CONFIG_SPI_NOR.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The ARM Cortex-M1/M3 DesignStart FPGA reference designs support booting
from an off-board, memory-mapped QSPI NOR flash device. The V2C DAPlink
shield from ARM Ltd. provides support for this feature.
If the board/shield is not configured for booting from the QSPI NOR
device, that same device is available as a regular QSPI NOR flash
device.
The presense of a shield configured for QSPI NOR flash boot is indicated
through an IRQ line used as a level-detect, non-interrupt signal.
Introduce a board specific devicetree binding for the DAPLink QSPI MUX
and provide a board specific API accessing it. Automatically set the
QSPI MUX to to provide regular QSPI NOR flash access if the board/shield
is not configured for memory-mapped QSPI NOR flash boot.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Updates west.yml to use modules/tee/tfm commit number
143df675557305b61f7930a50459a53a8d2bb097.
Change: make BL2 configurable.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Configures the Non-Secure target to work with TFM.
Memory (Flash and RAM) mapping according to TFM definitions.
How to build and flash the board.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
Moved the flash partitioning to the shared device tree include so all
targets can benefit from the partitioning.
This is implemented to MCUboot can run TFM(S) with Zephyr
(lpc55s69 cpu 0 NS).
Also defines RAM partitions as TFM expects them, first part of ram for
S, second half for NS.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Configure build variable BL2 depending on board configuration. BL2 is
set to True by default. BL2 enabled building TFM with MCUboot.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
When running shell commands updatehub alloc data from shell stack.
Increase shell room stack to avoid shell issues. Memory tuning
should be performed accord with available resources.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Currently updatehub trust on MCUboot to test a new image. The process
is executed on next boot after a validate the downloaded image. To
have a more reliable system, is recommended run the SHA-256 algorithm
to attest that firmware was properly stored on the flash memory. This
implements the use of flash_img_check to achieve that, and as a
consequence, add a new level of trust that avoids an useless reboot
on the system.
Updatehub uses two SHA-256 verification. One is used to check the
data stream at download. The second one, realise the verification
reading from flash. Users have the possibility to chose only one
option or keep both verifications. However, it is adviced keep
always both verifications enabled to get consistent reports on
back end.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Currently SHA-256 uses a temporary hash digest to calc final sha sum.
This moves temporary variable from local scope to updatehub context.
The motivation is to use the hash digest on future flash validation.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Remove the BT_LL_SW_SPLIT dependency for
BT_CTLR_DEBUG_PINS_CPUAPP when building CPUAPP application
that is using Zephyr BLE HCI controller on the CPUNET core.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added a Bluetooth Peripheral sample that demonstrates how to use
GATT Object Transfer Service.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
When the connection is terminated, make sure that any pending
data is feed to the application.
Fixes#28057
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
VCO input frequency can be checked and set during compile time.
It unfortunately does not work for output frequency because macros in
HAL are defined together with uint32_t type.
This also fixes wrong check in case of HSI used as PLL source.
Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>