This includes a bugfix for a pyocd requirement on pyyaml
that could not be satisfied using officially supported
releases.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Callbacks called from the RX thread may block, but should avoid doing
it for long periods of time.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is a follow up to commit 436c4262da.
By default the channel 0 of pwm0 is set to the pin that drives led0.
Since the LED is active high, the inversion of polarity is incorrect.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This fixes an issue where if timestamp == service_due_timestamp,
we don't call the periodic service. Then the following call to
engine_next_service_timeout_ms() returns 0 because the service
is still due and lwm2m_engine_service() is called again.
This process repeats several times until the value of
k_uptime_get() changes and then the work is finally handled.
Previously, the resolution of k_uptime_get() was in ms. A recent
change to this API defaults Zephyr so that the resolution is
set via CONFIG_SYS_CLOCK_TICKS_PER_SEC (default 100).
This means the value of k_uptime_get() only changes every 10ms.
Reported-by: Github User pieterjanc
Signed-off-by: Michael Scott <mike@foundries.io>
"It's a Trap!" -- Admiral Ackbar
When moving to the BSD-socket APIs, the original thread running LwM2M
periodic services such as observes and lifetime updates, was replaced
with a re-occuring workqueue job. To save the overhead of creating a
new thread, I used the system workqueue for these jobs.
This was a mistake. If these jobs hit a semaphore or wait for some
reason, it cannot be prempted due to the priority of the system work
queue.
Let's instead add this service handling to the thread that we already
use for polling sockets. This also removes a configuration issue where
the system workqueue stack size needed to be increased. This can now
be adjusted via the LWM2M_ENGINE_STACK_SIZE knob.
Directly fixes semaphore usage in the socket-based DNS code.
This was introduced as a bugfix for non-responsive DNS server hanging
the Zephyr device forever. However, this probably fixes randomly
seeming hangs on the device.
Signed-off-by: Michael Scott <mike@foundries.io>
Bad order of interrupt calls made it unable to transmitt data
using interrupt driven API.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
After the testcase configs are built, there is a step to
filter all the test case information to determine the set
of tests to run.
As this step takes a nontrivial amount of time, add an
informational message about it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Renamed the page "review_process.rst" to "dev_env_and_tools.rst"
as the old name did not cover all its content.
Moved the labels page content into this
"Developemnt Environment and Tools" page.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
There has been some confusion about how GitHub labels
should be used.
This commit adds a new doc page, which tries to clarify this.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added information to the release notes about the new drivers
in native_posix, the new nrf52_bsim board and the BabbleSim
integration in CI and testcases.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
We need to use the ARMV7_M_ARMV8_M_FP Kconfig symbol,
which denotes the Floating-Point capabilities, instead
of the option that signifies the Cortex-M variant. Fix
is of minor importance, as long as the #ifdef block
remains empty.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This is what checkpatch.pl expects, and GitHub's file viewer flags a
missing trailing newline too.
Note that this is different from a blank line at the end of the file. It
just says whether the last line must end in a newline.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Send unknown rsp instead of asserting when encryption related control
PDUs are received in the wrong state.
This would allow an attacker to intentionally crash the device.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Stop the Length request procedure from initiating during the encryption
procedue. This would cause the peer to disconnect the link with error
code LMP_TRANSACTION_COLLISION
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set the encryption procedure pending and start it as soon as
there are no other procedures running.
This allows the Host to enqueue the encryption procedure, and not
get disallowed command because a different LL procedure is active.
Fixes#15012
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
When calling bt_unpair() the keys were removed from flash, however a
pointer was left to the invalidated keys in case there was an existing
connection. This would then lead to a bogus entry being stored in
flash for a zero-address peer device. Fix this issue by clearing the
conn->le.keys pointer in the bt_unpair() function.
Fixes#15325
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update 1.14 draft release notes with doc changes. Also edited existing
release notes material to make sentence tense consistent (past tense).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The bt_mesh_fault_update() API is meant for updating the publication
message and sending it out to the network, however it was missing the
necessary call to health_pub_update() which is responsible for
updating the publication message.
Fixes#15300
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Casting the rb_data character array to a u32_t can result
in an unaligned u32_t * pointer being passed to
ring_buf_item_put(), since rb_data is only byte-aligned.
Our Altera Max10 CPU build is not configured to detect
unaligned memory access and throw an exception, it is
instead rounding down the memory address
of the data pointer to the nearest 4-byte value, causing
the wrong data to be copied into the ring buffer.
It appears that in the C standard this is considered
Undefined Behavior so the approach this patch takes is
to fix the test, by ensuring that rb_data is aligned to
u32_t.
Fixes: #14869
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The NSIM emulator has severe performance issues when
the MPU registers are reprogrammed on context switch.
Disable runtime reprogramming of the MPU for these
platforms on these two tests, which have a lot of context
switch thrashing. This is done by ensuring userspace
and hardware stack overflow detection via guard areas
is disabled.
I have assurances from the ARC team that the tests run fine
on real hardware and this is an emulation issue.
For 1.15, this will be completely resolved by optimizing
MPU region gap-filling to not take place during context
switch time, which will drastically reduce the number of
MPU registers poked during context switch on nsim_sem.
Meanwhile, for 1.14 we ensure that no runtime reprogramming
of the MPU is done for these tests.
Fixes: #14642
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* fix the stack allocation and initialization
for mpu stack guard when USERSPACE is not configured
* fixes#15163
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Increase the default mgmt event stack size from 512 to 768 because of
stack overflows.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
* it's not reliable to use exc_nest_count to decide nest interrupt.
A better option is to use IRQ_ACT
* ext_nest_count is just used to switch interrupt stack
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Currently coverage is enabled only in platforms which dont have
multiple memory regions. This sample was designed to emulate
different memory regions. This in conjunction with gcov which
might instrument data in different memory regions will not work
as expected. Therefore disabling gcov for this sample.
Fixes: GH-15107
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
We have actual tests now under tests/kernel/mem_protect/userspace
and tests/kernel/mem_protect/mem_protect that exercise all the
memory domain APIs. This old test is superfluous.
Fixes: #15178
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fixes: #15289
Kconfig requires posix style path when sourcing other files.
As abspath in python will use native host style, i.e. backslash '\' in
windows this will cause invalid paths in Kconfig generated file and
thus the file will never be loaded.
This commit uses PurePath to convert the path to posix style, ensuring
Kconfig can load the modules.
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
A transport may receive multiple bytes of data between shell_thread
wakeups, but state_collect is only called once per wakeup. So it must
process all data, and only return when all data from the transport has
been consumed. This is mostly handled correctly, but there were two
places where state_collect would return early instead.
Signed-off-by: Jim Paris <jim@jtan.com>
This commit extends existing documentation by providing an example
of how to build Hello World sample application for MCUboot using
west.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Unaligned test might filed in case fcb area was not clen before
run.
The patch insert clean operation before this test.
fixes#15063
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
We were running this as a test and not evluating the output. Now we
verify the output and stop treating this as a ztest item.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fixes:
.../zephyr/subsys/bluetooth/shell/bt.c:906:12:
warning: 'cmd_chan_map' defined but not used [-Wunused-function]
Signed-off-by: Jim Paris <jim@jtan.com>
Persistent storage is done. So are the configuration and health
clients. We're also not actively looking to optimize the provisioning
protocol & mesh networking memory usage anymore.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>