nRF53 application core does not have RNG peripheral.
Software implementation must be used instead.
This patch adds config overlay for hid-cdc nRF5340 sample.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add configuration and overlay files for Adafruit feather nRF52840.
README has also been updated and improved. Documentation related to
littlefs has been moved to an independent section as it could apply to
any sample.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Following the change to use the C domain for parsing, update all
existing :cpp:func: references to :c:func:. Remove the parentheses as
well, if used, because they are not needed, this is already known to be
a function, and how it is displayed in the documentation later is a
semantic decision done by the output builder.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Make the flash-backed USB mass storage sample depend on usb_device and
flash instead of just flash.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When try build updatehub using overlay-dtls.conf system fail with
cannot create privkey.der.inc file, permission denied. Add missing
gen_dir cmake definition. Update updatehub sample test config to
run missing dtls build test.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add overlay that includes only the shell transport of mcumgr, without
bringing in BLE as well. This can be used as an alternative for the
serial transport. The `smp_svr` README was updated accordingly.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Its possible to rename the executable we build via the Kconfig symbol
CONFIG_KERNEL_BIN_NAME. So we really should use ${KERNEL_ELF_NAME},
${KERNEL_BIN_NAME} and ${KERNEL_HEX_NAME} variables instead of hardcoded
zephyr.elf, zephyr.bin, and zephyr.elf.
This fixes an build issue with
tests/misc/test_build/buildsystem.kconfig.utf8_in_values on
up_squared_adsp and lpcxpresso11u68 platforms.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
usb_enable() must be called by the application.
The application may want to register usb_dc_status_callback
and trace usb status codes (usb_dc_status_code).
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This patch removes unused Kconfig option from console
subsystem. If application wants to wait until the console
port is connected, enabled and ready to receive data
it should use uart_line_ctrl_get() API function and
check for DTR flag.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
usb_enable() must be called once by the application.
The application may want to register usb_dc_status_callback
and trace usb status codes (usb_dc_status_code).
After this patch all pre APPLICATION messages will be dropped
as USB console device is enabled in the application.
Application waits for console device until its ready by checking DTR
flag - uart_line_ctrl_get(). This function could be dropped but then
some log messages that were generated before USB device is ready
could also be dropped.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit adds a PD sample for drivers/osdp. It receives OSDP commands
and prints a message to console.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
USB device shall be able to send only in CONFIGURED state.
Zephyr USB HID device class allows to send the data no matter
of the USB state what is wrong. Attempting to write to endpoint
buffer in state != CONFIGURED may lead to driver error.
This patch introduces state tracing for USB HID class and
allows to send data using hid_int_ep_write() class API
only if the device remains in CONFIGURED state.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Add a fixture since we need at least two boards connected for this test
to run correctly w/real hardware.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add for various flash runners (pyocd, nrfjprog, and dfu-util) to do a
full chip erase. This is needed for the sample to pass in sanitycheck
on real hardware.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fix smp_svr Bluetooth configuration for when BT_HCI_ACL_FLOW_CONTROL
option has been enabled. In this case the CONFIG_BT_L2CAP_RX_MTU
is used instead of CONFIG_BT_RX_BUF_LEN to set the RX MTU.
This lead to a negotiated MTU of 23, which is not supported by
the SMP_SVP protocol.
Removed the board specific configuration files as these are just
duplications of the overlay-bt.conf or overlay-bt-tiny.conf and
the readme specifies how these should be used.
Reduced the TX MTU to end up with the same value as the RX MTU,
CONFIG_BT_RX_BUF_LEN - 4 (HCI ACL header) - 4 (L2CAP header).
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
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>
Zephyr introduced subsys/mgmt folder for MCU management. Move UpdateHub
sample to its correspondent folder at sample/subsys/mgmt folder.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
In order to be able to add more entries under 'subsys/mgmt', move the
current contents of it, which relate exclusively to MCUMgr, to its own
folder.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The fs_open has been extended with support for open flags.
Currently supported flags are:
FS_O_READ -- open for read
FS_O_WRITE -- open for write
FS_O_CREATE -- create file if it does not exist
FS_O_APPEND -- move to the end of file before each write
The FAT FS and LittleFS front-ends within the Zephyr has also been
modified to utilize the flags.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Applications using IPM callbacks get the imp device instance pointer
now through the callback. Which help to clarify a bit the code here and
there as well.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It was already using uart_irq_callback_user_data_set below, now it also
uses uart_irq_callback_user_data_t as callback type, so let's normalize
the callbacks.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Sample tries to estimate maximum number of messages that can be
logged. It was using two system cycles and counting number of
messages logged in that window. It did not take into account the
fact that clock frequency may vary and logging speed also varies
(especially if LOG_IMMEDIATE is enabled). Presented results may
be faulty and misleading.
Fix is attempting to adjust window size to increase precision of
the measurement.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Configuration file was left unchanged after development
of USB Audio class. Deleted configs should never be present.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
In fat_fs example, if we choose a large size SD card to connect with,
the result of memory size calculation coule be wrong due to the missing
brace for manipulating operator priority.
Fixes#26266.
Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no>
USB access to the flash device is not synchronized with the
application, so if the application needs to create a new file system
USB may read configuration state that is incorrect. Wait until the
the application is done with the flash before starting USB.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Introduced interface for efficient logging from external logsystems:
Added handling of vaargs and automatic strdup to macros intended
to be used in logging interface function. Fast path to less then 4
arguments to speed up the execution. Made log_count_args external,
if external logsystem cannot count arguments.
Signed-off-by: Tomasz Konieczny <tomasz.konieczny@nordicsemi.no>
The upload command invokes lfs_stat() on the destination file which
overflows the stack. Adding 256 bytes seems to make it work.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming multiple projects
"NONE" defeats this functionality.
This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names, small, manual adjustments
have been done.
See also 7eabab2f5d ("samples, tests: Use semi-accurate project names")
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Move to using PRIu64/PRId64 instead of %llu/%lld since on
native_posix_64 the uint64_t/int64_t type is defined in terms of 'long
int' and not 'long long int'.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Left unset it becomes the first partition, which is not what's used
for littlefs, and specifically isn't on the external flash for
nrf52840dk_nrf52840.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The flash interface header needs to be available regardless of
selected filesystem implementation.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>