This is done only for testing purposes, in real life the socket
would be closed if it is not used or needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the socket is closed, then do CAN detach if that is needed.
This way the CAN interrupts are not received if there are no
CAN sockets listening the data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
At the moment there is no real address for local CANBUS socket,
but we can still set protocol family of local socket to AF_CAN
so that for example net-shell "net conn" command can show
information about it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We need to dispatch the received CAN frame if there are multiple
sockets interested in the same CAN-IDs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The syscall handler for k_poll() returns error values
instead of killing the caller for various bad arguments,
cover these cases.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If multithreading is disabled, thread_entry() never runs
since we cannot create threads; the non-multithreading case
was simply dead code.
Indicate to code coverage that CODE_UNREACHABLE should be
skipped.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These were never getting called anywhere from user mode,
except for k_queue_alloc_append(), but only by virtue of
some workqueue tests.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Threads that are sleeping forever may be woken up with
k_wakeup(), this shouldn't fail assertions.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
LCOV/gcovr doesn't understand what CODE_UNREACHABLE means.
Adding LCOV_EXCL_LINE to the macro definition unfortunately
doesn't work.
Exclude a bit of code which spins endlessly when multi-
threading is disabled that runs after the coverage report
is dumped.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We don't get any coverage past when we dump the coverage data,
so exclude the end of the function and move setting the main
thread as nonessential to immediately before the coverage dump.
The comment was also amended.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
data copying and bss zero are called from arch code
before z_cstart(), and coverage data gathering doesn't
work properly at that point. Not all arches use this
code anyway, some do it in optimized assembly instead.
Weak main() is also excluded; it does nothing and every
test overrides it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Addresses coverage gaps. Some changes were made so that exited
threads do not have k_thread_abort() called on them.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Reversed revised ticker implementation pending new design which resolves
the issues described in GH issues #16830.
Signed-off-by: Morten Priess <mtpr@oticon.com>
stm32wb is not yet supported on openocd.
But support on pyocd can be enabled thanks to "pack" feature.
Configure board runner with pyocd and provide guidelines
to configure pyocd.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Swap_type field implementation is the new mcuboot's trailer field.
This patch makes using of it optional which keeps possibility of being
compatible with older versions of MCUBoot.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Mcuboot changed TLV in PR: Fix double swap on interrupted revert
(https://github.com/JuulLabs-OSS/mcuboot/pull/485)
Above bugfix changes a little way for upgrade request.
This path introduces re-formatted original mcuboot bootutil_misc.c
code as much as it was reasonable which includes the bugfix
adaptation and support for devices witch have bite erased sate different
than 1 as well.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
TEST configurations don't need to be warned that they're using test
techniques with some side-effects.
On a typical sanitycheck invocation, this warning is one of the only two
that appears in most test runs. In other words this commit gets rid of
half of the entire grep -ri '[[:blank:]]warn' noise that obscures any
work-in-progress warnings or platform specific warnings in the
logs (typically: device tree warnings).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add board suppor for 96Boards Meerkat96 board from Novtech based on
NXP i.MX7 multi core processor. Zephyr is ported to run on the single
core Cortex-M co-processor on this board.
More information about this board can be found in 96Boards website:
https://www.96boards.org/product/imx7-96/
By default Zephyr console output is available via UART1 available at
the 40pin LS connector.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
- Even one-liner statement if () need { }
- you can coalesce assignment and condition if the later tests the
earlier only.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
As title says, struct wdt_config and enum wdt_clock_timeout_cycles are
not used anymore so they can be removed.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
As seen previously, some toolchain are willing to insert padding
at section changes to apply greater alignments by default. This is
especially true with 64-bit builds. USB structures are marked with the
packed attribute and therefore the linker section they land into
must also be byte aligned.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit updates counter Kconfig to use logger template to define
COUNTER_LOG_LEVEL option.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Added support for the STM32L496XE series with 512KB internal flash and
256KB SRAM of contiguous addresses.
Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
stm32l496zg_disco and nucleo_l496zg were depending on STM32L496XG SOC.
With the recent change to STM32L496XX, the dependency should be updated.
Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
Create source directory for IA32-subarch specific files, and move
qualifying files to that subdirectory.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Parameter of set_interface_status is no more the interface index
but a pointer to interface descriptor.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Prevent to reschedule a transfer if one is already ongoing (occupied).
This happens with USB class drivers scheduling transfer once interface
is enabled (netusb, ACM...) and cause freeze due to infinite loop in
low level driver.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
According to datasheet, there needs to be a minimum of 488µs
between each write to Enable register
Signed-off-by: Alexander Svensen <alsv@nordicsemi.no>
In commit 28a5657f1f we stopped ZEPHYR_BASE from leaking into
__FILE__ and other macros. This works great for apps inside ZEPHYR_BASE
but does nothing for apps outside ZEPHYR_BASE.
-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=CMAKE_SOURCE_DIR does it.
To avoid collisions and for consistency change:
-fmacro-prefix-map=${ZEPHYR_BASE}=.
to:
-fmacro-prefix-map=${ZEPHYR_BASE}=ZEPHYR_BASE
Quickest test/demo:
- Copy samples/hello_word/ to ~/home_world/
- Add "%s", __FILE__ to printf in ~/home_world/src/main.c
cmake -B build -S ~/home_world/ -DBOARD=qemu_x86
make -C build run
Before:
~/home_world/src/main.c says Hello World! qemu_x86
After:
CMAKE_SOURCE_DIR/src/main.c says Hello World! qemu_x86
objdump -h $(find build -name *.c.obj) | grep noinit
9 .noinit."ZEPHYR_BASE/kernel/system_work_q.c".0 0000
17 .noinit."ZEPHYR_BASE/kernel/init.c".2 00000100 000
18 .noinit."ZEPHYR_BASE/kernel/init.c".1 00000400 000
19 .noinit."ZEPHYR_BASE/kernel/init.c".3 00000800 000
16 .noinit."ZEPHYR_BASE/kernel/mailbox.c".2 00000348
18 .noinit."ZEPHYR_BASE/kernel/mailbox.c".1 00000028
20 .noinit."ZEPHYR_BASE/kernel/pipes.c".2 00000280 00
22 .noinit."ZEPHYR_BASE/kernel/pipes.c".1 00000028 00
Signed-off-by: Marc Herbert <marc.herbert@intel.com>