The radio API expects the setting of the TX-power in dBm. The actual
TX-power is however set by a 6bit register, which mapping between
register value and power in dBm is a lookup-table in the datasheet.
This mapping for the kw41z was off, which not only lead to incorrect
output power, but also to a maximal output power of only -1.9 dBm
instead of the possible +3.5 dBm.
Signed-off-by: Tobias Aschenbrenner <tobias.aschenbrenner@blik.io>
Signed-off-by: Franco Saworski <f.saworski@posteo.de>
If the user attempts to send data before the USB connection is
established (see the HID sample for an example of such code), the
DataInCallback never gets called which leaves the write semaphore in a
taken state forever.
Signed-off-by: Josef Gajdusek <atx@atx.name>
The SYSCFG_CFGR1_PA11_PA12_RMP define is present even on packages where
the remap isn't strictly required. This commit makes the remap optional
based on a DT property.
Also fixes syntax error caused by a missing );.
Signed-off-by: Josef Gajdusek <atx@atx.name>
Write the net_pkt using net_pkt_write() and then verify that the
data is actually written into net_buf.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a new command-line and build config option, `pristine`, that the
user can pass to `west build` or set in its configuration file(s) in
order to automatically trigger a pristine build on every build or
whenever west considers it required.
The option can take the following values:
- never: Never run the target
- always: Always run the pristine target before building
- auto: Run the pristine target when required
With `auto`, the pristine target will be run when running
west with an existing build folder containing a build system and:
- Selecting a different board from the one currently in the build system
- Selecting a different application from the one currently in the build
system
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The -B option has always existed but was first officially documented in
CMake 3.13.0. In that same release the -S option was introduced,
replacing the old undocumented -H. Switch to using the officially
documented options.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
If promiscuous mode support is disabled in Kconfig and promiscuous.h is
included the build will fail. The returned errno should be ENOTSUP.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
This is needed to remove noise when comparing binaries across git
commits and more generally for anyone who wants to manual
control/override the version number when building with or without a
.git/ subdirectory.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
One of the first things needed when comparing builds of tests across
different environments/systems is to make sure the same (sub)tests were
selected and run in the first place. For that purpose sort the output of
--testcase-report and --discard-report as they were in random order.
Actually make the entire class TestInstance sortable by adding a
standard __lt__() method comparing unique instance names; it could be
useful again.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
While this race seems unlikely and harmless let's play it safe and
implement the usual solution: temporary file + atomic rename.
The race is unlikely and maybe even harmless because:
- Only sanitycheck seems to invoke cmake concurrently.
- Users rarely delete their ~/.cache/zephyr/ToolchainCapabilityDatabase/
- All concurrent cmake processes write the same, single byte to the same
files.
- Creating a single byte is at least very fast, so extremely short
window for others to read an empty file.
For additional background see links in issue #9992
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This makes the output of file2hex.py deterministic by default while also
letting the user set the mtime in the gzip header manually if desired.
Use the option without any argument to restore the previous behavior
that sets the current (and obviously changing) "now" timestamp.
To test: ./sanitycheck --tag gen_inc_file
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
If the compiler supports it, strip the ${ZEPHYR_BASE} prefix from the
__FILE__ macro used in __ASSERT* macros, in the
.noinit."/home/joe/zephyr/fu/bar.c" section names and in any application
code. This saves some memory, stops leaking user locations in binaries,
makes failure logs more deterministic and most importantly makes builds
more deterministic.
- .noinit section names now look like this in objdump -h:
17 .noinit."./kernel/init.c".2 00001100 00000000 ...
18 .noinit."./kernel/init.c".1 00001200 00000000 ...
19 .noinit."./kernel/init.c".3 00001800 00000000 ...
- The output of __ASSERT* macros now looks like this:
ASSERTION FAIL [0] @ ./samples/hello_world/src/main.c:13
The world comes crashing down
***** Kernel Panic! *****
Current thread ID = 0x00400040
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit enable Bluetooth SMP Service which will help
us to do Device Firmware Upgrade over thr air. By default
it is not enable.
Reference: $zephyr/samples/subsys/mgmt/mcumgr/smp_svr
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
General MIC fix for AAD lengths up to 14 bytes.
This case doesn't concern the mesh stack because it uses 16 bytes.
Signed-off-by: Reham Tarek <reham.tarek@si-vision.com>
This stores the database hash and check if it has changed on commit
skipping service changed if hash matches.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Custom handlers without any arguments don't since there is a check for
argc > 1, to fix this behavior removing the check.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If handle is over the range end return since handles are always placed
in ascending order.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This reduces bt_gatt_foreach_attr complexity (O(n)) so it can skip
ahead when the start handle is not within its service handles.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
It may be very important information for the developer if scanning
fails to start or stop, so add proper logs. There's no need to log
EALREADY errors, since the mesh stack doesn't track the current scan
state and simply relies on the under lying GAP layer to return this
error if the desired state is already set.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
All docs should have a label at the top that would
permit cross-document linking via :ref:`labelname`.
Update "testing" label that would have conflicted and fix the only
reference to the old "testing" label in development process
documentation.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
.object_access.* sections should be with
GROUP_LINK_IN(ROMABLE_REGION) as other sections in
common-rom.ld
Fixes#15481
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
SPI is not normally enabled, but some tests assume that there's a device
available. Conditionally enable SPI_2 which is associated with the
on-board flash.
Closes#15374
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
bt_gatt_connected should be only called, when there is no
connection error. Change fixes problem with receiving notifications
before connection.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Add config overlay for cdc_acm+dfu composite configuration.
Manual configuration over menuconfig may be error-prone for
the user because then FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE
should also to be set to appropriate values.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Set bwPollTimeout for DFU_GETSTATUS request dynamically.
For now, adjust bwPollTimeout only during DNLOAD stage.
Fixes: #8734
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Remove 'counter' as a supported feature on several NRF boards as these
boards fail to build tests/drivers/counter/counter_basic_api. This is
due to the fact that we either need explicit board conf files for the
test or have the counter driver enabled via Kconfig.
Fixes#15460
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Exclude nucleo_f302r8 platform as the tests doesn't fit in flash size.
This is due to that fact that we pull in newlib for the STM32 counter
driver.
Fixes#15460
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Clearing the pending IRQs when resetting the timeout fixes the
forward time drifting, but the change needs more investigation
until we are sure this won't break kernel time management.
Reverting the change to get 1.14 release out.
This reverts commit 2895da02a4.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The nxp mpu uses the logical OR of access permissions when multiple
region descriptors apply to a given memory access. This means that we
must partition the sram into two non-overlapping regions to implement
the mpu stack guard. This partitioning gets reconfigured at every
context switch, and if an interrupt occurs during this time, it can
cause a fault because we do not have a valid mpu region descriptor for
the sram.
This scenario was observed on frdm_k64f in tests/posix/common before
commit 2895da02a4, which changed timing.
In this case, we couldn't even print fault information to the console
and the hardware would reset. It looked a lot like a watchdog reset,
unless you attached a debugger to see the fault.
A similar problem was fixed in commit
ec424b7a45, but this change temporarily
disabled the mpu.
Fix both cases by locking interrupts during the critical sections, as
this is more secure than disabling the mpu.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Clean up accumulated release notes with (final) clarity edits, spell
check, and such. Remove "Working Draft" from the heading.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
HFCLK may be requested for multiple modules, i.e. Bluetooth stack.
When any other module has requested HFCLK to run, the driver will
return -EBUSY on free attempt which is not an error - thie means
that free request has been processed, but someone else is still
requiring the clock to run. When all clock users free the clock,
it may be disabled.
Related issue: #15145
Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
Added information to release notes about Zephyr modules which allow for
splitting ext/ into multi-repo instead using Zephyr modules.
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>