To enable for easier testing, replace direct use of registers
from Nordic's nrfx MDK with accesses via its HAL inlined functions
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When the priority of the LwM2M engine was lowered, it causes an
occasional registration update to fall outside of the registration
lifetime. This shows up as the following error:
Failed with code 4.4. Retrying registration
Let's try and retry a bit earlier to account for the priority
change.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Check the return value of close() in socket_dumb_http.c
If non-zero, print the error code
Fixes#8413.
Signed-off-by: Satya Bhattacharya <satyacube@gmail.com>
The prepended 0x causes DTC warnings and shouldn't be there.
Tested by compiling hello_world for nrf52840_pca10056 before and after.
Fixes#8334.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
When using CONFIG_MULTITHREADING=n, the semaphore primitives are
non-functional and useless. Remove their usage when this option is
enabled.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
A HID application can no longer write to the default
interrupt IN endpoint because the addresses are assigned
dynamically. Add hid_int_ep_write() function and leave
it to the hid-core to call the usb_write() with the correct
endpoint address.
fixes: #8424
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This enables testing of the scan, connect, and disconnect
wifi_mgmt functions of the wifi shell module for
the cc3220sf_launchxl.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Initiate a SimpleLink WiFi Driver, implemented to the WiFi management
offload APIs for scan, connect, disconnect.
Also registers the DHCP-obtained IPv4 address upon connect.
This was validated on a cc3220sf_launchxl using the wifi
shell module from the Zephyr shell_module sample.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This commit contributes the definition and the implementation
of an API for ARM MCUs to configure and get the configuration
of the security state targeted by a given external IRQ line.
The API is only available in Secure ARM Firmware.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This fixes invalid assert condition.
As stated in Bluetooth Core v5.0 Vol 3 Part F
3.4.4.1 Read By Type Request &&
3.4.4.9 Read by Group Type Request
"The starting handle shall be less than or equal to the
ending handle."
3.4.3.1 Find Information Request &&
3.4.3.3 Find By Type Value Request
"Only attributes with attribute handles between and
including the Starting Handle parameter and the Ending
Handle parameter that match the requested attribute type
and the attribute value that have sufficient permissions
to allow reading will be returned."
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Updates nrfx to the recently released version.
This version introduces a new HAL for the RADIO peripheral (contained
in the "nrf_radio.h" file) and this HAL replaces the one temporarily
copied to the "nrfx/hal" folder in the Zephyr source tree (see commit
619790a9bcb3a6fea7a91af24007eba6404c1a2b). The nRF 802.15.4 radio
driver ("nrf_drv_radio802154.c") is updated accordingly to reflect
the changes between these two RADIO HAL implementations.
Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.1.0
commit: 293f553ed9551c1fdfd05eac48e75bbdeb4e7290
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
UART_PIPE_ON_DEV_NAME is set to UART_1 by default in
boards/arm/qemu_cortex_m3/qemu_cortex_m3.dts
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Declare and implement convenience wrappers to evaluate Non-Secure
read and write permissions of C variables using the cmse address
range intrinsics.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit contributes the implementation of the CMSE
address range permission checks based on the ARMv8-M
address range check intrinsics exlusicely for Secure state.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Refactor arm_cmse_mpu_region_get(.) function, so its signature,
documentation, and implementation align with the rest of functions
for obtaining MPU, SAU and IDAU region numbers via the TT instruction.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines and implements an internal ARMv8-M API
that allows the user to evaluate access permissions of memory
locations, based on the ARMv8-M Tests Target (TT, TTA)
instruction support (for Secure requests).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit introduces additional dependencies and selection
scheme for CPU_CORTEX_M_HAS_SPLIM, for Zephyr Non-Secure builds
on ARMv8-M MCUs with Security Extensions.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit introduces the ARMV8_M_SE K-config option
to signify the use of an ARMv8-M MCU with support for
Security Extensions. It also introduces dependences of
ARM_(NON)SECURE_FIRMWARE on ARMV8_M_SE.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit introduces the K-config option
ARM_NONSECURE_FIRMWARE, to indicate a Zephyr firmware image
that is intended to execute in Non-Secure state.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit improves the help text description for K-config
option: ARM_SECURE_FIRMWARE.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Adapt functions for new composite interface.
Assign bInterfaceNumber and similar variables of a Interface
default values, these should be valid values for non-composite
configuration. For the case of the composite configuration,
these variables must be set by the interface configuration
function (interface_config) accordingly.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch reworks composite device support. It allows the
functions to be modular and the user to combine its own
functions with the USB functions of the Zephyr OS.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Introduce function to configure interface descriptor at runtime.
It is simple to leave the corresponding function to configure the
interface descriptor and fix bInterfaceNumber and iInterface values,
for example.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add the routine to validate endpoint address and update the endpoint
descriptors and usb_ep_cfg_data at runtime.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch changes all class functions so that the endpoint
address will be retrieved from the usb_ep_cfg_data at runtime.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add function to check capabilities of an endpoint.
Only basic properties are checked, especially on STM32
capabilities of different USB controller configurations
have to be considered in the future.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add API function to check capabilities of an endpoint.
It should be used to check the capabilities of an endpoint
before configuration. The driver should return 0 if the
endpoint configuration is possible.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch moves the descriptor parts to related class
and function drivers and extends the usb_fix_descriptor
function so that the wTotalLength and bNumInterfaces
are corrected before enumeration.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch simplifies the handling of the string descriptors.
It introduces common macro for all string descriptors to
calculate the length of the bString.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch adds USB descriptor and data section macros.
Use USBD_DESCR_..._DEFINE macros to place the parts of USB device
descriptor in predetermined order in the USB descriptor
section. The parts of a device descriptor are also
sorted according to the macro argument. All parts of a
particular device descriptor must use the same argument.
Use USBD_CFG_DATA_DEFINE macro to place the data struct
of a class driver or function in the USB data section.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch adds a RAM section for the USB descriptors and
USB interfaces data.
The parts of USB descriptor can be declared independently in
different USB class drivers or functions. These must then be
placed in a predefined order one after the other without gaps
in a RAM section. There may also be several device descriptors
in the section such as for USB DFU.
Since at runtime the number of interfaces and endpoints in the
composite device descriptor is unknown, they must be corrected.
The class drivers or functions use the usb_cfg_data struct to
store the callbacks, interface and endpoints data. This struct
must also be corrected and needs to be placed in the data section.
The descriptor section and data section must be processed by
the USB Device Stack before the enumeration.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Restructured the test, added description and enhanced
semaphore count logic to check for semaphores created
only in the test.
Fixes: #7106
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
The ARRAY_SIZE() utility macro will actually test the parameter types,
and ensure that it is only called with arrays, and not arrays decayed
to pointers.
Changes were performed with a simple Coccinelle script.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Changes to kconfig documentation generation added some new files
(choice*.rst) that need to be added to the .gitignore list. Actually,
all the doc/reference/kconfig/*.rst files should be ignored.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Invalid configurations should be detected during configuration instead
of during compilation whenever possible.
This patch replaces a BUILD_ASSERT on CONFIG_SYSTEM_WORKQUEUE_PRIORITY
with what is intended to be an equivalent Kconfig restriction.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
lib/libc/minimal/source/CMakeLists.txt and
lib/libc/minimal/source/stdout/CMakeLists.txt was introduced in
12f8f7616 but it is not used by the build system. CMakeLists.txt in
the parent dir lib/libc/minimal/CMakeLists.txt adds C files to the
target with the lines like:
${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/atoi.c
${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/strtol.c
To make other empty CMakeLists.txt explicit, this commit adds a
comment line to them.
Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.
Fixes#8327
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit fixes a pretty nasty bug that could cause properties on
symbols and choices defined in multiple locations to end up in the wrong
order, potentially affecting evaluation.
Alexander Wachter ran into this for an out-of-tree build.
Multi.def. symbols are rare in the Linux kernel, which is what the
Kconfiglib test suite uses for compatibility testing, so this managed to
slip through. Comprehensive selftests have been added for property
ordering on nested multi.def. symbols/choices.
This bug was introduced by commit e307ba340c ("kconfiglib: Record
which MenuNode has each property").
Commit message from Kconfiglib (c8801514d63aa)
==============================================
Fix incorrectly ordered properties for some nested multi.def. symbols
_propagate_deps() visits menu nodes roughly breadth-first, meaning
properties on symbols and choices defined in multiple locations could
end up in the wrong order when copied from the menu node for some
unlucky if/menu nestings.
Fix it by moving the menu-node-to-symbol/choice property copying in
_finalize_tree() so that it's guaranteed to happen in definition order.
This bug was introduced by commit 63a4418 ("Record which MenuNode has
each property").
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
On Cortex-M7 CPU (at least on STM32F723), the dummy move FPU instruction
is executed before the FPU lazy state preservation is disabled. Add an
instruction synchronization barrier before it to avoid that.
At the same time, remove the data synchronization barrier after the
dummy move as it does not have any effect on RAM or registers.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Remove include guards in internal files; it is an agreed
convention to not have include guards in internal header
files in Bluetooth subsystem.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This adds basic support for declaring gpio nodes in dts for nrf52.
The dts.fixup provides mapping for the generated defines to the config
defines currently used by the nrf gpio driver.
Existing boards that use nrf52 are updated.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
The Kconfig option HID_INTERRUPT_EP_MPS does not have a prompt entry,
so it is not configurable in practice. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
New versions of Sphinx/Breathe are throwing a new warning that
we'll need to filter before upgrading to breathe 4.9.1 and sphinx 1.7.5
This change won't impact our current builds but will prevent new known
warning messages when we upgrade the doc build tools.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>