Fix regression and allow incoming packet when source and
destination port numbers are the same.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use tinycbor from the tinycbor repo directly and drop the library from
ext/.
Add entry to west.yml and update SHA.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In case of Ethernet for instance, the MTU is larger than the minimal
IPv6 MTU, so it is not required to fragment a packet that fits in
Ethernet MTU.
Fixes#14659
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit updates the documentation as follows:
- stresses that the lazy stacking preservation is disabled
by default and not supported in ARM Cortex-M builds,
- corrects the figure of extra stack requirement when
floating point services are enabled in ARM builds.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit provides the following fixes:
- Corrects the note regarding which ARM MCUs may support
floating point services
- Rewords the text stressing the undefined behavior when
multiple threads access the floating point registers.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Following fix SRAM size to take into account CCM,
enable CCM and update yaml files in boards including fixed soc
dtsi definitions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On various stm32 soc packages CCM is available and SRAM size
mentionned in datasheet include CCM.
Though, actual SRAM size defined in dtsi files should not
include CCM sizes.
Fix this on impacted dtsi files.
Fixes#14779
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Field stack_info.size is supposed to hold the actual writable
thread stack area, above what is pointed to by stack_info.start.
Therefore, in all MPU architectures we can program the Thread
Stack MPU region as starting from thread->stack_obj and with
size equal to stack_info.size plus the (possible) difference
between stack_obj and stack_info.start.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Consider a stack buffer at address 0x10000 with size 1024.
If a thread is created with this stack object, the resulting
fields in thread.stack_info ended up being a base address of
0x10020 with size 1024. The guard size needed to be subtracted
from the size in order for the bounds to be correct.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add driver support for Atmel SAM device ID, which is 16-bytes long. On
this SoC family, the device ID is part of the flash controller and
complex to read. Therefore the driver reads it once at boot time and
then just returned the copy saved in RAM.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This patch checks the return value after updating the packet.
Fix Bugs: #14821
Coverity CID: 196635
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
The command `recheck` was always experimental and should not be part of
the contribution guidelines and flow. It is not working now, so remove
it from the docs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The earlier removal of _ prefix went and renamed this func
and added z_ prefix. This is useless as the relevant macro
is called GPTP_POW2() so call the helper function as gptp_pow2().
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Command scan fixed in the way that it can take one mandatory parameter
and one optional. Previously it accepted only 2 mandatory parameters.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removed automatic argument count checking in bt command. Now
it is possible to print a message that extra argument is not
recognized.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Replace "Note:" to actual @details so it appears properly formated in
generated documentation.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Its behavior varies whether overwrite bit is set or not, so detailing
this more carefully.
Fixes#14093
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It is invalid to try to bit shift the same amount of bits as
what is the number of bits in the left expression’s type.
Coverity-CID: 187079
Fixes#8988
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of relying on overlays which requires to write overlay for
every board (100+) define console device name.
Fixes#14698
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If there are several queued interrupts we can miss some of them. Use
while() loop to catch them all.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use ringbuf library for handling RX CDC ACM path. Remove old code
artifacts handling specific hardware.
Fixes#14288
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
1. The build paragraph was listed with the run option.
But, we need to pass an argument to the native_posix board,
so "ninja run" alone is not good enough.
Plus, it was not coherent with the rest of the text, as
the paragraph intended to tell people how to build.
2. Added "sudo" to the run line, as the user needs extra
permissions to connect to a host BT controller.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Several public APIs were not checking the BT_DEV_READY flag, which
could lead to hard-to-debug behavior, particularly when the stack
lacks an identity address. Add the appropriate checks to these APIs.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The treatment of the BT_DEV_READY flag was broken when used together
with BT_SETTINGS. The flag would get set even though the stack was
still in a partially initialized state. Even worse, for central role
the stack would potentially try to initiate passive scanning without
having an identity address.
Refactor the code that sets the BT_DEV_READY flag (among other
initialization) into a separate bt_finalize_init() helper function and
call it when the settings have been loaded. Also clarify the warning
message given to the user in case settings_load() needs to be called.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Coverity was complaining that this function was not being checked only
in a specific case.
Coverity CID: 183066
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
%z isn't available in Python, and makes the code raise a ValueError. Use
%d instead. Integers in Python 3 are not sized/signed (though it's
probably a typo from C).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The 14 individual cases that use these four config files are now
passing reliably when SMP is enabled, after the "Mark sleeping threads
suspended" scheduler fix. Turn it back on.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
For obvious performance reasons, scheduler state changes (other than
aborting a thread) do not cause synchronous interrupts on the other
CPU. Doing a k_thread_wakeup() means that the current CPU will run it
synchronously if it's high priority, but if you want to see it run on
the other cores you need to wait for them to reach a scheduling point
on their own.
The test was written to assume that k_thread_wakeup() is synchronous,
but that's not right, and it needs to spin a bit. This bug was always
present in the test, but masked by a bug in the way that k_sleep() was
handled on SMP. See #9506.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
On SMP, there was a bug where the logic that re-adds _current to the
run queue at swap time would accidentally reschedule threads that had
just gone to sleep, because the is_thread_prevented_from_running()
predicate only tests for threads that are "suspended" or "pending" and
not sleeping.
Overload _THREAD_SUSPENDED to indicate "sleeping" also. Simple fix
for an immediate bug, though long term we really want to unify all the
blocked conditions to prevent this kind of state bug.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
One of the bullet list items didn't get rendered properly because
continuation line wasn't indented.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The code for checking duplicates in the existing settings store was
incorrectly identifying a new value with the same initial content but
shorter length as a duplicate. Fix this by doing an early check on a
new vs old length mismatch, and immediately flag this as not a
duplicate.
Fixes#14840
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Enforce that NULL value is never given with a non-zero length. This
way we don't need to check this over and over again further down the
call path.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is throwing errors in static analysis, complaining that comparing
that a prior is higher and lower is impossible. That is wrong per my
eyes (I swear I think it might be cueing off the names of the
functions, which invert "higher" and "lower" to match our reversed
priority numbers).
But frankly this was never a very readable macro to begin with.
Refactor to put the bounds into the term, so the static analyzer can
prove it locally, and add a build assertion to catch any errors (there
are none currently) where the low<->high priority range is invalid.
Long term, we should probably remove this macro, it doesn't provide
much value. But removing it in response to a static analysis failure
is... not very responsible as a development practice.
Fixes#14816Fixes#14820
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
fs_dirent.name is MAX_FILE_NAME + 1 bytes long, not PATH_MAX. Just
fixing it to avoid access invalid memory.
Coverity CID: 186037
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Checking the return of sensor_trigger_set and if it fails log the
problem and exits.
Coverity CID: 186196
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
FPU's control and status register (FPCSR) for a thread is not
initialized. Random values are written to this register and this leads
to failure on fp_sharing test.
FPCSR register is set to 0 according to the value of FPDSCR.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
As em7d is configured with HARVARD, CCM will be used not DDR,
SRAM should point to DCCM.
This bug will cause the wrong caculation of heap area,
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Fix a bug where the controller would use the length
field of the advertisement packet before checking
if the length field was valid.
It is possible that the controller has received a packet
that passes CRC check but has a length field that is invalid.
This would cause the scanner to overwrite the scan report
buffer
Fixes: #14741
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
When using V0.10.0 SDK, flashing is not working anymore on
stm32f4_disco.
Using st_nucleo_f4.cfg instead of stm32f4discovery.cfg solves
the issue.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
net_pkt_read may fail in which case the error shall be reported back
instead of always assuming the whole packet was read.
Fixes#14817
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Move the original documentation in the arduino_101 board to a common
section in the Bluetooth documentation and document the use of `btmon`
in general.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>