Rather than stuffing various values in a uintptr_t based on
type using casts, use a union for this instead.
No functional difference, but the semantics of the data member
are now much clearer to the casual observer since it is now
formally defined by this union.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Various kconfig symbols where defined specifically for board
nucleo_l432kc. Though, most are generic to the sample so should moved
directly to sample prj.conf
Some others parts of boards default configuration so could be removed
as well.
Last remove CONFIG_OPENOCD_SUPPORT as sample has no dependency with
this symbol.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert usb_stm32 driver to use of DT_INST macros.
Since driver is compatible with 3 different dt compatibles and
compatible string is included in DT_INST macros, I've kept the
DT_USB_ compatible agnostic macros based on DT_INST ones, which
allowed to remove fixup definitions.
Use of DT_USB symbols is now limited to usb_dc_stm32.
Additionally, compatible "st,stm32-otgfs" is removed from list
of compatibles for usbotg_hs ips.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert driver to use DT_INST_ defines.
In the process, we've removed all UART/USART/LPUART code in
device instanciation code which had no impact.
Since all uart/usart/lpuart nodes declare compatibility with
st,stm32uart, DT_INST_X_ST_STM32_UART_FOO could be used.
Removed DT_UART fixup macros.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On stm32 spi devices, there are 2 main IP variants, with and w/o
fifo. Fifo is not really used today, but still there is some
additional code handling fifo. Today this code is protected under
Kconfig symbol SPI_STM32_HAS_FIFO.
This code carries redundant information vs dedicated compatible
"st,stm32-spi-fifo", which is provided as unique driver compatible
for devices supporting this IP as opposed to use of "st,stm32-spi"
when fifo is not supported.
Having these 2 compatibles defined exclusively is not convenient for
migration to DT_INST as DT_INST macros contain compatible string and
hence it cannot be used to provide common compatible code for devices
defining different compatibles.
Based on these observations, review stm32 spi devices compatible
declarations. Devices supporting fifo will now declare both
compatibles, as proposed by dt spec: "[compatible] property value
consists of a concatenated list of null terminated strings,
from most specific to most general". Hence field will now be:
"st,stm32-spi-fifo", "st,stm32-spi"
This way, fifo enabled stm32 spi devices will generate both:
DT_INST_STM32_SPI_FOO and DT_INST_STM32_SPI_FIFO_FOO
As well as:
DT_COMPAT_ST_STM32_SPI and DT_COMPAT_ST_STM32_SPI_FIFO
So, DT_INST_STM32_SPI_FOO could be used for device initialization.
Also DT_COMPAT_ST_STM32_SPI_FIFO could be used for FIFO handling
code inside driver. Hence use it to replace Kconfig symbol
SPI_STM32_HAS_FIFO.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert driver to use DT_INST_ defines.
Removed DT_FLASH_DEV fixup macros, except DT_FLASH_DEV_NAME
used in applications.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert driver to use DT_INST_ defines.
Removed DT_RTC_0 fixup macros but keep DT_RTC_NAME_0 as it is
still in use across RTC users.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
add lstrip function to delete the '\r' char in front of the
serial output from serail readline, because this '\r'
will influence the result match function in harness.py.
Signed-off-by: peng1 chen <peng1.chen@intel.com>
Actual files make terrible dependency targets in CMake.
Wrap the generation of subsystems.json into a custom
target to get around this. Fixes a problem where
parse_syscalls.py was being called multiple times.
Fixes: #23504
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
No use starting the application if the network interface is down.
So start to listen connection management events and start the
TCP and UDP handlers only after network is up and ready.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the network interface is down, we should timeout properly
and let the application to handle the situation.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a link and a note about the Project Roles' documentation in
contribute/index.rst.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add initial version of Project Roles documentation.
The initial version contains the content that has
already been approved by the TSC on Feb 5, 2020.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix API usage error introduced by the commit c88155fd2d
("usb: mass_storage: fix possible page buffer overflow")'
Fixes: #23295
CID: 208676
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Fix response to unexpected LL_FEATURE_RSP for the case that
BT_CTLR_SLAVE_FEAT_REQ is disabled. Fixes LL/PAC/SLA/BV-01 for such a
configuration.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
The README file was in need of clarification how to set up the
net-tools Docker image and how the IP addresses were assigned.
mqtt_publisher is also mentioned.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
With net-tools and the mqtt_publisher sample updated, add support
for running the sample with the network sample test script.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Modify the mqtt_publisher sample app to return an exit code after
its tests have been run. Add Kconfig options to set the number of
test iterations per TCP connection as well as the number of TCP
connections to make to the server while keeping the default values
intact. Further add a config overlay file to lower the number of
TCP connections and test iterations used.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
It is possible that net_pkt will disappear while we are sending
it, so save link address if we need that information.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we are receiving UDP packet and if there is some error happening
inside zsock_recv_dgram(), then make sure that the net_pkt received
from recv_q is freed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The RX fragment debug print does not work (compile error)
if memory allocation debugging is enabled, so disable it
for time being.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The code was leaking memory in TX side when there was lot of
incoming packets. The reason was that the net_pkt_sent() flag
was manipulated in two threads which caused races. The solution
is to move the sent flag check only to tcp.c.
Fixes#23246
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
TCP code needs to know whether the pkt is sent the first time
or is it a resent one. This information is used when deciding
if the pkt ref count needs to be increased or not. The packet
does not need to increase ref count when sent first time, as
the ref count is already 1 when the pkt is created. But for the
2nd time the packet is sent, we will need to increase the ref
count in order to avoid buffer leak.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This PR provides changes that are required after replacing Tinycbor
with copy of source code from mynewt-core.
The Tinycbor has been replaced with mynewt-core version to reduce
maintenance effort; by replacing it the Zephy specific changes have been
reduced to small patch over mynewt codebase.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The nRF53 has different region size than nRF91.
This patch is aware of Erratum 19 (wrong SPU region size).
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Erratum 19: SPU region size is 32 kB instead of 16 kB.
The config should be used for alignment for data that must follow SPU
region boundaries, and to enable runtime checks when configuring SPU
regions.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
In the DT_INST conversion we introduced a typo bug of accessing port0
instead of port1 in the IRQ config function.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Configure the PWM period and pulse width in timer ticks instead of
calculating the frequency and duty cycle for use in the higher level
MCUX API. This improves the resolution of the PWM output signal
considerably.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The set of interrupt stacks is now expressed as an array. We
also define the idle threads and their associated stacks this
way. This allows for iteration in cases where we have multiple
CPUs.
There is now a centralized declaration in kernel_internal.h.
On uniprocessor systems, z_interrupt_stacks has one element
and can be used in the same way as _interrupt_stack.
The IRQ stack for CPU 0 is now set in init.c instead of in
arch code.
The extern definition of the main thread stack is now removed,
this doesn't need to be in a header.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add a property to the nxp,kinetis-gpio binding that related the GPIO
node to the pinmux PORT node.
For the kl25z we add the pinmux nodes as well since they didn't exist.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fixes#23485
When we create a GATT table dynamically, we also create a hash
identifying this table. This hash can be stored in persistent memory and
we can thus determine after recreating the GATT table whether the
services have changed or not from before the reboot.
When these hashes are identical, it implies that the table has not
changed, wherefore a service changed indication should not be sent to
any bonded clients. The method for achieving this was to remove the
gatt_sc.work entry from the work queue. This work queue entry was to
send an indication to the clients when the table had been allocated.
If the final entry then caused the hashes to match, the indication
would be cancelled.
On unit testing this behaviour in simulation and in practice, we found
that the indication was sent nonetheless, and the issue was located to
be tied to the SERVICE_RANGE_CHANGED flag which is set when the services
are changed and is cleared when the indications are being sent out.
It was the job of the work queue entry to clear this flag, and as the
entry was never serviced, the flag was never cleared, and when
sc_commit() is called at the end of the process, it believes that there
is a new service change pending and therefore starts the job over, thus
creating a redundant indication to the clients.
This commit fixes the issue by clearing the flag when the work entry
is removed due to a hash match. This has been unittested in a live
environment, in a simulation environment, and sanitycheck has been run
on it.
Signed-off-by: Dan Erichsen <daee@demant.com>
Without it, the sample crashes for qemu_x86 with:
[00:00:03.080,000] <err> os: Page fault at address 0x7275632f
(error code 0x10)
[00:00:03.080,000] <err> os: Linear address not present in page tables
[00:00:03.080,000] <err> os: PDPTE: Non-present
...
Increase by reasonable, but small amount, to keep watching stack usage
growth trends in Zephyr.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The IIS2DLPC is a 3D digital accelerometer ultra-low power sensor
for industrial applications, which can be interfaced through either
I2C or SPI bus.
https://www.st.com/resource/en/datasheet/iis2dlpc.pdf
This driver is based on stmemsc i/f v1.02
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Telnet console was move as a shell backend and is not anymore part of
console drivers.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>