Commit c1f80db44a removed various
now-unused CMake cache variables, but it missed the ones that begin
with ZEPHYR_RUNNER_ARGS. Delete those now.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
In the I2S CAVS driver, the DMA user data simply points to
the device struct. However, after the change to const-ify device
struct, this causes warnings from compiler because the user_data
assignment would discard the const qualifier. The user_data is
being used to point back to the device struct, and the DMA
callbacks are already casting the user data argument into
a const device struct. So it's a simple fix by casting
the device pointer to void pointer at device creation.
Fixes#28016
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Commit 79b1f89f7d causes the WEST
variable to no longer cached in the CMakeCache. However,
the Eclipse plugin needs this WEST variable so that it can
invoke west properly. So tell CMake to put it in the cache.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
lock_runtime is a stack variable whose contents could be completely
garbage, but only the 'locked' member was zeroed. zero the whole
thing to prevent spurious "recursive spinlock" errors from occasionally
popping up as the validation framework gets confused from garbage
data in the other memebers of this data structure.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This fix prevents a scenario when command callback calls shell_fprintf
after the shell cleared the command context flag and before setting
the prompt correctly.
Fixes#27522
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
* Move switched_in into the arch context switch assembly code,
which will correctly record the switched_in information.
* Add switched_in/switched_out for context switch in irq exit.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
Fixed 'line length exceeds 80 columns' warning by shortening the clock
controller device name from NPCX_CLOCK_CONTROL_NAME to
NPCX_CLK_CTRL_NAME.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
Character class functions from ctype.h may be implemented as macros
where the argument is used to index an array of class flags. Using a
char value as an index produces diagnostics in some toolchains.
Explicitly cast the parameter to the type required by the API.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
shell_fprintf requires that formatted output be emitted with a
putchar()-like output function. Newlib does not provide such a
capability. Zephyr provides two solutions: z_prf() which is part of
minimal libc and handles floating point formatting, and z_vprintk()
which is core and does not support floating point.
Move z_prf() out of minimal libc into the core lib area, and use it
unconditionally in the shell.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The smp_shell_rx_byte has been renamed to smp_shell_rx_bytes and now
accepts data buffer pointer and its size as parameters. Return value
has been changed to size_t and represents number of bytes processed from
the given buffer.
The change has been done to more efficiently serve most common scenario
when the function is called in loop to process buffer, byte by byte.
Previously such operation required passing each byte separately,
with the change the function will work directly on source buffer
reducing number of calls and byte copy operations.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This is a follow-up to commit 701e9befe4.
The NRFX_POWER Kconfig option should be enabled together with USB_NRFX,
not with CLOCK_CONTROL_NRF, as the USB driver is the actual user of
the nrfx POWER driver.
This patch adds also missing initialization of the nrfx POWER driver
and refactors a bit the usb_init() function introduced in the commit
mentioned above, so that it does not redefine the DT_DRV_COMPAT macro
and uses for conditional compilation the same Kconfig option that is
the dependency of NRFX_USBREG.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
It should be nrfx_power_clock_irq_handler, not nrfx_clock_irq_handler.
The latter is only present as a function if both nrfx CLOCK and POWER
drivers are used and it is then called from the actual IRQ handler,
which is always named nrfx_power_clock_irq_handler (also when only
the nrfx CLOCK driver is used as in case of this test).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
On SoCs featuring the USBREG peripheral, the nrfx_power driver uses
the nrfx_usbreg one internally, so enable the latter when the former
is enabled.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The device returns 2 bytes for GetStatus(Device) request.
If the device is self-powered then it shall respond with
bit 0 set to 1 when responding to GetStatus(Device) req.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Add a build only test to validate correct compilation of the uart_rtt
driver. No harness that connects to RTT is defined, and therefore the
test can't be run by CI.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Add support for `CONFIG_UART_ASYNC_API` to the uart_rtt driver.
As RTT provides no mechanism for knowing when new data has arrived,
the reception commands all return errors.
This fixes hard faults when asynchronous calls are made on the uart_rtt
driver, in addition to providing a small level of functionality.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Instantiate RTT UART instances from devicetree nodes instead of from
Kconfig symbols. While RTT is implemented using software, not hardware,
it is emulating a hardware device, and thus should be configured through
devicetree. This allows the simulated UART device to be selected via
devicetree aliases and chosen nodes.
The following devicetree snippet will instantiate RTT channels 0 and 2
as UART devices.
```
/ {
rtt0: rtt_terminal {
compatible = "segger,rtt-uart";
label = "rtt_terminal";
status = "okay";
};
rtt2: rtt_secondary {
compatible = "segger,rtt-uart";
label = "rtt_app_specific";
status = "okay";
};
};
```
Fixes the RTT portion of #10621.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The general DMA driver doesn't use kmalloc anymore so it doesn't
need a memory pool. The DMAMUX_SMT32 driver still uses kmalloc,
so move the HEAP_MEM_POOL_SIZE config under DMAMUX_STM32.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Add Kconfig with the following options:
- DMA_LOOP_TRANSFER_DRV_NAME to set the DMA device name, because
some SOCs do not allow memory to memory DMA on all DMA devices
- DMA_LOOP_TRANSFER_CHANNEL_NR some SOCs start counting the DMA
channels at 1 instead of 0.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Use dma_stm32_disable_stream instead of stm32_dma_disable_stream
to check if the disabling of the stream really worked and if
not return an error.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Convert global conversion tables for id-to-stream and slot-to-channel
to functions that use local const static conversion tables.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
- Remove the need for kmalloc
- On hardware that supports it use 1 IRQ handler per stream to
determine the stream ID, so the ISR does not have to loop
over all ID's to see which one is active. On hardware (like
STM32L0 and STM32F0) where up to 7 streams share 3 IRQ's use
the loop to check which stream is active.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Use volatile for flag shared between normal code and ISR to
prevent the compiler from possibly optimizing it away.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
The Health models' shell documentation was mistakenly labeled Heartbeat
Client and Heartbeat Server, and the Heartbeat configuration commands
were mistakenly categorized under these sections.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
nRF53 application core does not have RNG peripheral.
Software implementation must be used instead.
This patch adds config overlay for hid-cdc nRF5340 sample.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
FS_TYPE_END is no longer used as there is no hard-coded limit on the
number of file systems. Replace with the limit used when only in-tree
file systems are enabled.
The test for unsupported file systems is no longer valid. Instead
verify that attempting to register a file system when there is no room
for it fails as expected.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Zephyr allows an application to register additional file systems,
which may have maximum filename lengths different from the in-tree
FatFs and littlefs options. Provide a Kconfig variable that allows
the default inference to be overridden.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The documentation claims that Zephyr supports external file system
implementations, and there's no reason not to do so. Rework the API
to allow this.
Note that the file system type cannot legally be an enum anymore,
since we need to support file system types that don't have an
identifier assigned in that enum. Rely on the implicit conversion of
enum values to int to preserve backwards compatibility.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Reduced the size of tx_buffer_def array to 1 to save
on function stack memory. Here only 1 buffer is
enough to call the transmit function.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
Modify the ethernet driver to use TX complete interrupts.
Adds HAL ethernet TX complete callback and locking semaphore.
Due to changing behavior/content of the TX DMA descriptors
on STM32H7 series, based on the state of the IP,
it is more reliable to wait for the TX complete interrupt to check
for DMA end of transmission event. This avoids polling the
DMA_DESC_OWN bit in the descriptors.
Improves reliability and performance of the ethernet peripheral.
Tested on CoapServer sample, Dumb HTTP server, telnet sample.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
Typically we have ARC core configurations where Fast IRQs (FIRQ) are
enabled together with multiple register files and those we have covered
by testing. But FIRQ & single register bank we only happen to have on
the older EMSK v2.2.it might be a good idea to add a similar
configuration to nSIM "boards" so that we keep it tested regularly.
nsim_em7d_v22 configuration is similar with em_staterkit_em7d_v22,
both configed with FIRQ & single register bank.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
Compile with arm-none-eabi-g++ (10.2.0 with -std=c++17) generates a
warning for every C++ source file:
"cc1plus: warning: command-line option '-Wno-pointer-sign' is valid for
C/ObjC but not for C++"
Get rid of those warnings by adding '-Wno-pointer-sign' to the list of
excluded CXX options.
Signed-off-by: Rihards Skuja <rihardssk@mikrotik.com>