Following the introduction of the new shell, the OpenThread shell
wrapper is not well integrated. It outputs the answer to a command using
printk(), which is not necessarily using the same device than the shell
if "zephyr,console" does not match "zephyr,shell-uart".
OpenThread calls the otConsoleOutputCallback() function to output the
answer to the shell. It can provide a callback argument, but defined
when OpenThread is initialized, not when the command is submitted.
Workaround that by taking a copy of the shell argument in a static
variable and use it for the call to shell_fprintf(). It is not perfect
if two or more shells issue concurrent commands, but is already an
improvement compared to printk().
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Check should be done with & instead of | otherwise it will always be
evaluated as 1/true regardless of the flags.
Fixes#12308
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Extend the "slow" flag on tests to inhibit building too. The original
assumption was that building would be fast but running slow, but now
We have tests using a component (OpenThread) that wants to pull and
build software from github for every app.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The current OpenThread integration wants to download (from github) and
configure the OpenThread source tree every time the app is build. We
don't want to be doing this in quadruplicate every time sanitycheck is
run.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
These tests were defining a "test_kw41z" case, but that platform is
already whitelisted in the main ("test") case, and this one defines no
different behavior. It's just a dupe.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Fixes an ethernet build error introduced with MCUXpresso SDK 2.5.0,
caused by a slight change in the ethernet pll configuration structure.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Xtensa toolchain has a HAL library that needs to be compiled in similar
to how we do this with the Zephyr SDK.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As mentioned in issue #12265, some APIs
aren't included in the generated
API docs because doxygengroup directives were missing. Also add a
comment referencing defgroups that are just organizational and the
scanning script can ignore.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add uart5 nodes to stm32f1 series dts.
Provide matching dts_fixup add-on.
Signed-off-by: Chen Han <qq1433255094@outlook.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Introduced by commit id de78a7af28.
If the sum is 0xffff, a ~sum will give 0.
Fixes#12164
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The 'doc' build has been invoking 'project' with the argument "VERSION
${PROJECT_VERSION}". This is cargo-cult code inherited from the
toplevel build system.
This can be safely removed because in the doc build the versioning
variables that are set by 'project' are unused and PROJECT_VERSION is
not available to be de-referenced at that point in time any way ...
This fixes#12282
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Following the standard GCC RISC-V convetion use __riscv for the RISC-V
specific define:
41d6b10e96/gcc/config/riscv/riscv-c.c (L37)
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Updates the MCUXpresso SDK to version 2.5.0 for applicable SoCs.
Wireless (KW*) and legacy (KL25) SoCs were not included in this
MCUXpresso SDK release and are therefore not updated here.
New in this release is SoC-level and board-level support for external
xip flash in the i.MX RT family.
For RT1050, we are now using the MCUXpresso SDK for the EVKB version of
the board, which correponds to an upgrade from A0 to A1 silicon.
However, we don't yet have Kconfigs in place to support A1 silicon part
numbers, and therefore add a simple cmake hack to convert A0 part
numbers to A1 part numbers.
The SDK flash driver interface also changed slightly in this release,
and thus the zephyr flash shim driver is updated accordingly.
Origin: MCUXpresso SDK
License: BSD 3-Clause
URL: mcux.nxp.com
Purpose: Provide device header files and bare metal peripheral drivers
for Kinetis, LPC, and i.MX SoCs.
Maintained-by: External
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Devices with external xip flash like the rt1050 and rt1060 have
additional support files in the MCUXpresso SDK. Enhance the mcux import
script to pick up these files.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Updates the mcux import script to place fsl_iomuxc.* files into the
device-specific folder rather than the shared driver folder.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This file was moved into a device-specific folder in commit
282d95f655 but inadvertantly added back to
the imx driver folder in commit
a4633da9f5.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The segment size computation has value, but it's actually a very slow
process that parallizes poorly. It seems to be bound by the Python
GIL doing the parsing, so never sees more than about 150% of CPU in
use even on wildly parallel systems. And it takes about 75-80
seconds, which is 15-20% of the entire runtime of the test on that
box!
And the only "failure" case this can detect (unexpected sections in
the output file) is now a duplicate of the orphan section warning
we've since enalbled at the linker level.
This defaults to enabling the test to preserve behavior (as I don't
know where all the existing users of the size report are to change
them), but long term we might consider making "disabled" the default
and switching this to an --enable flag.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
With the new implementation we do not need a NULL terminated list
of kobjects. Therefore the list will only contain valid entries
of kobjects.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This API was using variable number of arguments. Which is not
allowed according to misra c guidelines(Rule 17.1). Hence making
this API into a macro and using the util macro FOR_EACH_FIXED_ARG
to get the same functionality.
There is one deviation from the old function. The last argument
shouldn't be NULL.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This new macro will be able to do FOR_EACH with a fixed argument.
This fixed argument will always be called as the 2nd argument
to the function call(_fn).
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Add negative scenarios, API tests and improve
test coverage for kernel management APIs supported
in CMSIS RTOS V2 portability layer.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
add a comment for the scanner script for missing API doxygengroup
directives so it won't complain about a parent defgroup used only for
organization
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
As mentioned in issue #12265, some networking APIs
aren't included in the generated
API docs because doxygengroup directives were missing.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
As mentioned in issue #12265, this API wasn't included in the generated
API docs because a doxygengroup directive was missing.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The en.high-perf_nucleo-144_mbed.jpg is an empty file.
This causes error when generating PDF documentation
as the tool cannot deal with empty image files.
So replace it with the image with same filename from
nucleo_f765zg, as the images are identical from
the online product description pages.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The patch allows to enable logs for NET_RAW configuration.
For example using wpanusb currently breaks build with logging enabled.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The test_timer_periodicity test is racy and subject to initial state
bugs. The operation of that test is to:
1. Start a timer with a known period
2. Take the current time with k_uptime_get()
3. Wait for the timer to fire with k_timer_status_sync()
4. Check that the current time minus start time is the period
But that's wrong, because a tick expiring between any of the first
three steps is going to skew the math (i.e. the timer will have
started on a different tick than the "start time").
And taking an interrupt lock around the process can't fix the issue,
because in the tickless world we live in k_uptime_get() is actually a
realtime quanity based on a hardware counter and doesn't rely on
interrupt delivery.
Instead, use another timer object to synchronize the test start to a
driver tick, ensuring that even if the race is unfixable the initial
conditions are always correct.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The logic in z_set_timeout_expiry() missed the case where the ticks
argument could be zero (or lower), which can happen naturally due to
timing/interrupt slop. In those circumstances, it would still try to
reset a timer that was "about to expire at the next tick", which would
run afoul of the drivers' internal decisions about how soon a timer
interrupt could be set, and then get pushed out to the next tick.
Explicitly detect this as an "imminent" predicate to make the logic
clearer.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The recent change that added a locked z_set_timeout_expiry() API
obsoleted the subtle note about synchronization above
reset_time_slice(). None of that matters any more, the API is
synchronized internally in a conventional way.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The use of dticks == INACTIVE to tell whether or not a timeout was
already in the list was insufficient. There is a time period between
the moment a timeout is removed from the list and the end of its
handler where it is not in the list, yet its list node pointers still
point into it. Doing things like aborting a thread while that is true
(which can be asynchronous too!) would corrupt the list even though
all the operations on it were "atomic".
Set the timeout node pointers to nulls atomically when removed, and
check for double-remove conditions (which, again, might be perfectly
OK).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This loop was structured badly, as a while(true) with multiple "exit
if" cases in the body. It was bad enough that I genuinely fooled
myself into rewriting it, having convinced myself there was a bug in
it when there wasn't.
So keep the rewritten loop which expresses the iteration in a more
invariant way (i.e. "while we have an element to expire" and not "test
if we have to exit the loop"). Shorter and easier. Also makes the
locking clearer as we can simply release the lock around the callback
in a natural/obvious way.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Move to latest cmake version with many bug fixes and enhancements.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
interface/stlink-v2-1.cfg and interface/stlink-v2.cfg are wrappers
around interface/stlink.cfg, their inclusion trigger warning which
this change addresses. Besides the warning there is nothing there
except sourcing iterface/stlink.cfg directly.
Signed-off-by: Vasili Slapik <vslapik@gmail.com>
Update menuconfig and Kconfiglib to upstream revision 16539b4f223fa, to
add the commit below.
menuconfig: Prompt for save if a different .config would be saved
Previously, menuconfig.py only prompted for saving the configuration
if .config didn't exist or the user changed symbol values within the
interface.
Also make it prompt for save if Kconfig symbols have been added,
removed, or have had their defaults changed, provided it would make
the saved .config differ from the loaded one.
This usually won't matter for correctness, because loading an
outdated configuration performs an implicit olddefconfig, but it's
less confusing.
Also add a Kconfig.missing_syms attribute that records all
assignments to undefined symbols in the most recently loaded .config
file. This is needed to implement the check for whether the saved
.config would be different.
As an unrelated change, always prompt for saving if a .config has
been loaded from within the menuconfig interface. The intention is
probably often to save the configuration somewhere else, even if it
isn't modified.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When using bt_gatt_discover with BT_GATT_DISCOVER_CHARACTERISTIC the
read callback would be set to bt_gatt_attr_read_chrc which would attempt
to access the next attribute which in this case would not be set since
the value attribute is no fetched by the discovery, the spec actually
omit the value handle saying it should always be the first attribute to
appear after the characteristic thus we can assume it to be handle + 1.
Fixes#12159
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This should make it more clearer what APIs are intended to be used with
server and client instances, in addition to that mention on the function
documentation when operation is valid only for local attributes.
Fixes#12138
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This mode allows the USB driver to use MSI clock as source clock.
MSI PLL-Mode permits +/-0,25% accuracy.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
When MSI clock is available and in PLL-Mode (high accuracy), use it as
USB source clock. This allows to enable USB on STM34l475 disco iot
board without having to add external oscillator.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>