Because Z_CBPRINTF_STATIC_PACKAGE_GENERIC()'s first argument can be a
static memory location and we have `-Wall`, which implicitly enables
`-Waddress`, we get the following warnings when you enable
`EXTRA_CFLAGS=-save-temps=obj`.
$ west build -b qemu_cortex_m3 samples/hello_world -- \
-DEXTRA_CFLAGS=-save-temps=obj
:
:
zephyr/kernel/fatal.c: In function 'k_sys_fatal_error_handler':
zephyr/kernel/fatal.c:45:1125: warning: the comparison will
always evaluate as 'true' for the address of 'data' will never be NULL
[-Waddress]
45 | LOG_ERR("Halting system");
|
In file included from zephyr/include/zephyr/logging/log_backend.h:9,
from zephyr/include/zephyr/logging/log_ctrl.h:10,
from zephyr/kernel/fatal.c:13:
.../include/zephyr/logging/log_msg.h:94:17: note: 'data' declared here
94 | uint8_t data[];
| ^~~~
The reason why you don't see this warning without the flag is that GCC
tracks tokens and suppress the warning if it's from a macro expansion. You
can disable this feature by adding `-ftrack-macro-expansion=0`:
west build -b qemu_cortex_m3 samples/hello_world -- \
-DEXTRA_CFLAGS=-ftrack-macro-expansion=0
Because `-save-temps` generates .i files, all macros have been expanded and
the information has already been lost. All GCC sees at the compilation
stage are the comparisons of static memory locations.
This commit replaces `buf != NULL` with a static inline function
`___is_null()` to silence the compiler. By passing a static memory
location to a function, the compiler doesn't see the comparisons of a
static memory locations against literal values. But it's still able to
optimize out in the later stage.
There is another way to silence it; By ignoring `-Waddress` with a pragma.
But its effect is the macro wide and it's too wide IMHO. Thus, I've
decided to go with the inline function.
To add one more note: The name `___is_null()` is obviously too generic.
But let's have it here until someone finds it problematic.
This closes#51528.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
To run zdsp tests on nsim_sem and nsim_em7d_v22, FPU feature
is needed to be added in their nsim.props file.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
For socket families that are niether INET/INET6 e.g., PACKET, we cannot
estimate header length, so, if the payload is zero as well, networking
stack drop the packet.
Instead, allow for zero header + payload packets and let L2 take care of
handling them, for some L2's this is still a valid frame.
E..g, In case of Wi-Fi this is sent as 802.11 Header + LLC Header
(no payload).
Add unittests for both AF_INET + Zero payload and AF_PACKET + Zero
payload.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Take an instance that has failed and not whatever was last processed in
the for loop.
Also, change instructions to use `west twister` rather than
`./scripts/twister` to be consistent.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There was a bug where BT_AUDIO_DIR_SINK should have been
BT_AUDIO_DIR_SOURCE when setting supported contexts.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add Kconfig option for running the CAN ISO-TP sample in loopback mode. This
removes the need for a fixture when running the sample via twister.
Exclude the loopback tests for kvaser,pcican. See
836f582664 for more information.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The stm32g081b_eval board does not implement Dead Battery
functionality on PD Port2. Change the sample configuration
so that PD Port1 is used, which has Dead Battery support.
Signed-off-by: Sam Hurst <sbh1187@gmail.com>
The test checks if options are added to a CoAP buffer correctly.
It should eventually check if opstions can be added out of order
e.g. not in increasing order of option codes.
Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
The websocket implementation did not comply with the RFC 6455 when it
comes to connection close. The websocket should send in such case Close
control frame. This commit fixes this behaviour.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The websocket "socket" layer did not handle ZFD_IOCTL_SET_LOCK command,
and just forwarded it to the underlying socket. This overwritten the
mutex pointer used by the underlying socket, resulting in erroneous
behaviour in certain cases.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add code that acts accordingly when a transaction does not complete
in the expected time. It makes sure that the transaction is aborted
so that no unexpected interrupt occurs afterwards and it also cleans
up after that abort so that the driver can handle further requests.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add myself as a maintainer for existing TI platforms,
currently I am an employee with Texas Instruments Inc. in
the Embedded Processors software department and has worked
on the supported simplelink platforms in Zephyr for the last
2 years.
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
UNUSED_L2_START_ALIGNED is a marker of first page not used by the
linker. Starting from this page, the memory may be re-mapped.
assertion <= is banning remapping of the first unused page
changing to <
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Fix sn and nesn values of ISO data when starting a new burst.
When central retransmitted but did not get an ack, it did
not update the sn correctly causing the peripheral to drop
the next ISO data PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
At this point I think it's clear that discord is more important than
email as a discussion forum for the project, so clarify that on the
communication and collaboration page.
Email is still important, though (e.g. Discord is currently not
available in China) -- and we are not deprecating it at all.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This should fix issue like #54337 where architecture code changes were
filtering out kernel tests, where those changes are being tested. Kernel
and arch code is tightly coupled and we need to run kernel tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change expected reason code for cpu exception to be generic and
in compliance with a3774fd51aFixes#54335
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
This is a partial revert of commit
2cee5ff519
("scripts: west_commands: runners: remove deprecated options").
I remarked at the time that the removal of the older way of writing
things from the runners themselves seemed gratuitous since they are
easy to continue to support indefinitely and people may have been used
to the old way of doing things. It didn't seem worth the fight to push
for a revert at the time, though.
Since then I've run into real problems that their removal has caused
in the wild and I am convinced that this part of that patch was wrong.
Restore the original, undeprecated forms of these options, but make it
clear in the command line help that they're just obsolete alternative
spellings at this point.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
The address type in the periodic adveritising sync
established event is incorrectly set to 0x01
(BT_ADDR_LE_RANDOM) when the address is a resolved one,
where it should have been BT_ADDR_LE_RANDOM_ID.
The address type has been fixed by offsetting by 2 to get
BT_ADDR_LE_PUBLIC_ID or BT_ADDR_LE_RANDOM_ID when the
address has been resolved.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The IGMP test cases are designed to use DUMMY L2 and not on real
hardware. Add an "platform_allow" filter to only run on qemu
platforms.
Fixes#54087
Signed-off-by: David Leach <david.leach@nxp.com>
This mirrors the behaviour of MLD packets, the only other ICMPv6 subtype
that is tracked separately.
Inbound ND packets are already counted as received ICMP packets by way of
going through the ICMP receive path.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This caused outgoing MAC address lookups to count as one received and two
sent Neighbour Discovery packets, when it's really one sent Neighbour
Solicitation and one received Neighbour Advertisement.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Update the calculation of the row and column.
Issues were seen when running the LVGL sample.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Enable the input KSCAN device when LVGL is enabled
2. Add LVGL related configuration options
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
When running the blinky example on STM32H747, with the BOOT_CM4 bit set
to 0, the M4 core goes into panic.
Increasing the value of the hardware semaphore retry prevents this.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The functions net_pkt_is_ppp() and net_pkt_set_ppp() are used by
both the l2 ppp subsystem (NET_L2_PPP) and the ppp uart based driver
(NET_PPP), but the function is only included when NET_PPP is enabled.
the l2 ppp subsystem does not depend on the uart based PPP driver, the
ppp uart driver does however depend on the l2 ppp subsystem. Including
the two functions should therefore be dependent on if the l2 ppp
subsystem is enabled using the symbol CONFIG_NET_L2_PPP instead of the
symbol CONFIG_NET_PPP
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
The net_pkt pointer provided to net pkt commands was not validated in
any way. Therefore it was fairly easy to crash an application by
providing invalid address.
This commit adds the pointer validation. It's checked whether the
pointer provided belongs to any net_pkt pools known to the net stack,
and if the pointer offset within the slab actually points to the
beginning of the net_pkt structure.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Currently we just pass in case of the unsupported jtag adapter
is selected. Fix that by rising ValueError as we do in case of
other incorrect arguments.
While I'm at it add few missing test-cases for mdb west runners.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Currently, in case of multi-core target or in case jtag adapter
auto-selectio, we pass unexpected empty argument (empty quotes `''`)
to MDB binary due to argument generation error.
Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Due to recent refactoring following unittests are failing:
tests/bluetooth/df/*
tests/bluetooth/ctrl_user_ext
This commit fixes these by adding the include files containing the
missing type definitions
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
This commit places @stephanosio, the current CI maintainer, at the top
of the maintainer list for the "Continuous Integration" area such that
all CI-related PRs get assigned to @stephanosio.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
When using extended advertising commands, the advertising set is not
considered to be over until we receive `BT_HCI_EVT_LE_ADV_SET_TERMINATED`
from the controller. Only then do we clear the `BT_ADV_ENABLED` flag.
The problem is that `bt_le_adv_resume` is called on connection established,
which can happen before adv set terminated, and in that case it will
early-return because `BT_ADV_ENABLED` is still set.
This change triggers `bt_le_adv_resume` when we get
`BT_HCI_EVT_LE_ADV_SET_TERMINATED`.
Fixes#53048
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The RTIO API test case needs a little extra stack size when run
on the frdm_k64f platform.
Fixes#54086
Signed-off-by: David Leach <david.leach@nxp.com>
Adds event tracing to sysview. This will allow the event related
tracing symbols to be found when CONFIG_SEGGER_SYSTEMVIEW is
enabled.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fixes various unresolved symbols when kernel event object tracking
is enabled via CONFIG_TRACING=y.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Native POSIX target still needs to use the <fcntl.h> header
instead of <zephyr/posix/fcntl.h>
Also removed the include from various files that did not use it.
Also changed fcntl() calls to zsock_fcntl() because we directly
use zsock_* calls elsewhere.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add the pyocd ant the stm32cubeprogrammer as a runner
of the nucleo_f334r8 platforms,
when the openocd gives an flashing error.
Add the pyocd pack if needed : 'pyocd pack install stm32f334
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the pyocd ant the stm32cubeprogrammer as a runner of the
nucleo_f303k8 platforms,
when the openocd gives an flashing error.
Add the pyocd pack if needed : 'pyocd pack install stm32f303'
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patch allows successive reflashing operation on stm32f3
boards by Enabling the Debug Module during SLEEP mode.
This will especially makes reflahing and debugging possible
with pyocd runner on west commands.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Fix missing DF related Radio register reset on radio_reset().
Regression in commit 465a96181d ("Bluetooth: Controller:
Explicitly set all bits of used radio registers") due to the
removal of NRF_RADIO->POWER register use that was used to
reset all Radio registers on every new Radio Event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>