Commit Graph

97591 Commits

Author SHA1 Message Date
Francois Ramu 24ff13e92c drivers: watchdog: stm32 wdg driver support stm32H7RS serie
Add the stm32h7rs serie to the stm32 WDG driver

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu 895ef1d6c5 drivers: hwinfo: stm32 driver supports the stm32h7rs serie
Add the support of the stm32h7rs serie to the HWinfo
driver. UID base is 0x8FFF800

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Luca Burelli 08eb314c35 llext: refactor: use cached section headers
The section headers are now available in the loader structure, so we can
use those directly instead of reading them from the ELF file every time.

This commit contains no logic changes; it removes all copies of the
header loading code and replaces them with direct access to the cached
section headers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli 817bbda5cc llext: read all section headers at once
This change reads all section headers at once, instead of reading them
one by one. This is more efficient and allows to further simplify the
code downstream.

The section headers are directly accessed from the file buffer if the
llext_peek() function is supported by the loader. Otherwise, they are
read into a buffer allocated on the heap and used only during the
llext_load() function.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli a976a1a25c llext: llext_load: document memory management policy
The do_llext_load function is responsible for loading an extension from a
file, and for this purpose it calls a number of functions that a) allocate
memory, and b) can fail. This creates the opportunity for memory leaks if
the error paths are not handled correctly.

This commit adds a comment at the beginning of the function to document
the memory management policy that has to be followed in this file:
cleanup is not performed in the error paths, and all memory is freed at
the end of the do_llext_load() function, both in the case of error and of
successful loading.

As an improvement, the symbol table is not freed if the LLEXT log level
is set to debug, so that it can be used, for example, to inspect the
symbols of the loaded extension.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli 89e27b9312 llext: improve debug messages
The recent llext_map_sections() rework changed the way debug messages
are output so that the names of most skipped sections are not printed
at all. This makes debugging harder since the section names are useful
to identify the contents at a glance.

Also print a few additional fields from the section header, and use 0x
prefixes for hex numbers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Sercan Erat 0666fe2a35 boards: rak: Add Rak11720 board
Added support for the Rak11720 board. Rak11720 is a WisBlock Core module
with Apollo3 Blue SoC from Ambiq and a Semtech SX1262 LoRa® transceiver.
For more information about this board please check:
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK11720-Module/Overview/#product-description

There are known issues that have been identified while communicating
with SX1262 transceiver:

- Gpio interrupt handling error: ambiq_gpio_pin_interrupt_configure
function is not able to configure SX1262 Dio1 interrupt pin correctly.
Please check issue 73958.
- Spi communication error: Rak11720 uses a custom CS pin.
Firstly, custom CS pin support is necessary. Secondly, spi_ambiq_xfer
function is not able to communicate with SX1262 transceiver.
Please check issue 73959.

These issues have been documented for future solutions. Despite these
limitations, the current support enables basic functionality.

Examples can be build by below command for Rak11720:
west build -b rak11720 samples/hello_world

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-06-14 11:13:27 +02:00
Declan Snyder 163ddc0e84 boards: lpcxpresso5s69//ns: Fix mbedtls build err
Fix issue where when building with TFM and PSA client
there is an error from want RSA key type not being
defined in mbedTLS library.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Declan Snyder 4bf9e62ba0 boards: nxp: Remove suppression of LPC DTC warns
DTC warnings are useful and we should keep them enabled.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Declan Snyder 801028b763 dts: nxp,lpc-gpio: Fix binding to group ports
LPC GPIO binding was wrong in that the reg address
on the simple soc bus was given as an index of the gpio ports
within a gpio controller. Fix this by putting the GPIO node
on the simple bus as a single node with the correct base address,
and make the ports children of this node.

Change the driver to get the port number from the reg address
instead of a custom property, and get base address from DT instead
of the SDK macro definition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Anke Xiao 4141b7cb64 tests: drivers: i2c: add i2c support for NXP FRDM-KE17Z512
Added support for NXP FRDM-KE17Z512,
and tested i2c_target_api sample.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao fdf39a7ab7 boards: nxp: frdm_ke17z512: enable lpi2c0 and lpi2c1 driver
Added lpi2c support to test i2c samples

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao 89a0ff8f61 soc: nxp: kinetis: soc.c: configure i2c driver clock
Set the i2c driver clock source when it is Okay.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao 5aeeae91e2 dts: arm: nxp: nxp_ke1xz.dtsi: add i2c periperal info
The i2c driver is disabled by default, enabled under board folder
for ke17z512 platform.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Johan Hedberg 1c53726e80 Bluetooth: Host: Fix deprecation and versioning for HCI APIs
Add versioning to the new HCI API so that it shows up officially as
unstable, and add a reference to the new API from the old API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-14 11:12:01 +02:00
Johan Hedberg c9a0ab2587 doc: migration-guide-3.7: Mention the removal of CONFIG_BT_NO_DRIVER
Mention the removal of the BT_NO_DRIVER option, and explain how drivers are
now expected to be enabled or disabled. Also group all bullet points
related to the HCI API changes as a dedicated sub list.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-14 11:12:01 +02:00
Dong Wang 72fa07e0bc manifest: hal_intel: update to lastest revision
The update contains all SEDI driver enhancements ported from ISH code base
for PV release.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-14 11:11:47 +02:00
Riku Karjalainen ff0635d700 drivers: flash: stm32: fix flash write error handling
The stm32 flash driver returns success even though
writing failed when instruction cache was enabled.
Fix by not overriding error code when re-enabling
instruction cache.

Signed-off-by: Riku Karjalainen <riku.karjalainen@vaisala.com>
2024-06-14 11:11:33 +02:00
David Leach d45605e6a3 drivers: apic_tsc: revert add dependency of DYNAMIC_INTERRUPTS
PR #74127 introduced a dependency loop that appeared to not be caught
by CI.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-13 23:54:29 -05:00
Dong Wang af6d790d0e drivers: apic_tsc: add dependency of DYNAMIC_INTERRUPTS
The reason is that this driver needs to call the function
'irq_connect_dynamic()' which  is implemented with DYNAMIC_INTERRUPTS.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-13 21:58:49 -05:00
Jeppe Odgaard b1f2eb9a11 samples: drivers: adc: add nucleo_h563zi
Add Nucleo H563ZI board support to ADC sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-06-13 20:46:44 -04:00
frei tycho b29e8ff0d6 include: toolchain: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-13 20:31:41 -04:00
Benjamin Cabé c9d0f15006 doc: mem_mgmt: Add missing definition for mem_mgmt doxygen group
Avoid warning and properly list memory management APIs in Doxygen
documentation by actually declaring the mem_mgmt doxygen group

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 20:31:16 -04:00
Reto Schneider 1bf5af7e89 kernel: banner: Add option to clear screen on boot
On each reboot, this option causes the serial output to start top-left
on the users terminal, simplifying (human) parsing.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-13 20:30:14 -04:00
Hess Nathan 5120744c8d lib: added blanks between operators
To adhere to general code style, I added some
blanks around operators

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 20:28:23 -04:00
Hess Nathan 974bad6242 coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 20:28:23 -04:00
Hess Nathan 7fb4a748b5 coding guidelines: comply with MISRA Rule 21.15
- made explicit the copied data type

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 20:27:19 -04:00
Paulo Santos 1db7caae56 kernel: update k_work_schedule_for_queue() docstring
This commit updates the missing retval from the underlying call of
`submit_to_queue_locked()` when the work was running and has been queued
to the queue that was running it.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2024-06-13 20:26:35 -04:00
Torsten Rasmussen 644f6b6e97 doc: rpi_pico update to cmsis-dap
Follow-up: #59076

The PR#59076 updated the board.cmake to use cmsis-dap instead of
picoprobe but without updating the documentation.

This commit updates the board documentation to match the code changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-13 20:25:57 -04:00
Prashanth S 59b2ef2739 drivers: timer: Add TI DM TIMER support
TI Dual-Mode timer is used as the arch timer for systick on J721E R5
cores. Add DM Timer for systick timer support.

Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
Signed-off-by: Andrew Davis <afd@ti.com>
2024-06-13 20:25:14 -04:00
Daniel Schultz 4e95fde58c boards: phytec: phyboard_lyra: Add OpenOCD support for M4
The phyBOARD-Lyra AM62x is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Daniel Schultz 680228d5d6 boards: ti: sk_am62: Add OpenOCD support
The SK AM62 EVM is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Daniel Schultz 281500f046 soc: ti: k3: Enable BUILD_NO_GAP_FILL for all M4
By default, a post build step tries to fill gaps in the output
hex file. Since the AM62x, for example, has different,
non-contiguous memory sections, it tries to fill a gap over
multiple GBs. Disable this feature since the K3 architecture has no
dedicated flash for the firmware and stores it in a Linux rootfs.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Daniel Schultz b22c961e5e scripts: west: runner: openocd: Add gdb-client-port
The gdb-port defines the GDB port and the openocd runner passes
this value to openocd as well as gdb. However, the TI AM62x board
provides multiple ports for each subsystem. For example, systick
appears at 3333, A53 as 3334-3337, R5F as 3338 and M4F as 3339.

If we want to connect to the M4F, we need to add another port which
is different to the to the gdb-port value.

This patch adds an additional argument --gdb-client-port to define
the port which GDB should connect to. It defaults to 3333, identical
to gdb-port.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Andrzej Głąbek f73471eaf9 tests: timer_api: Use 64-bit integers in busy slew threshold calculation
32-bit multiplication overflows for the 130000 ppm value used currently
on Nordic SoCs and the duration that is configured to 100000 us.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-06-13 20:22:08 -04:00
Andrzej Głąbek 1cfd57177e tests: timer_api: Use busy slew threshold when checking remaining ticks
On Nordic SoCs, the clock that drives the system timer and the one that
is used in busy-waiting may be significantly skewed, so the test cases
that compare durations derived from those two clocks need to take into
account a proper threshold. After the `z_timeout_expires` function was
corrected in 3d29c9fe54, it turned out
that the threshold was missing in one check and the related test case
started to fail on nRF platforms. This patch adds that threshold there.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-06-13 20:22:08 -04:00
frei tycho 77a3aec34e lib: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-13 20:21:08 -04:00
Andreas Klinger c98760df44 boards: fix openocd deprecated configuration
Replace deprecated settings:
  adapter_khz  -->  adapter speed
  adapter_nsrst  -->  adapter srst delay

Tested on olimex stm32_e407 board with olimex arm-usb-tiny-h adapter

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-06-13 20:18:37 -04:00
Ayush Singh cab48b0743 ieee802154: ieee802154_cc13xx_cc26xx_subg: Fix tcp timeout
- If status == PROP_ERROR_RXBUF, that means rx buffer head is not empty.
  In case of this, RF_EventRxEntryDone is never triggered and thus we
  enter an infinite loop of nothing happening. Due to this, TCP socket
  times out.
- To fix this, we need to free rx buffer current head. However, it seems
  better to free all the elements that are already finished instead of
  just head.
- Before 128354ae17, the buffer was reset
  every time drv_rx_start was called. However, that also seems wrong for
  a ring buffer. So I am freeing the finished buffers instead.
- Tested on Beagleconnect Freedom.
- Fixes https://github.com/zephyrproject-rtos/zephyr/issues/71191

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-13 20:18:12 -04:00
Sadik Ozer ae5a15ab0e tests: drivers: gpio: Enable gpio driver tests for max32672 boards
Enable gpio driver test for max32672evkit and fthr boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Sadik Ozer 63009d7a72 boards: Add MAX32672EVKIT board
Add MAX32672EVKIT board files
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Sadik Ozer 16dda2c092 boards: Add MAX32672FTHR board
Added MAX32672FTHR board
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Sadik Ozer 406764aec6 soc: Add the MAX32672 SoC
Add MAX32672 Kconfig and dts files

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Ioannis Karachalios 774ed60280 drivers: spi: smartbond: Add async API support
This commit should deal with adding support
for asynchronous operations. It also adds
support for DMA acceleration via a Kconfig
variable (enaled by default as DMA should
be considered scales faster than the
interrupt-driven approach).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-13 20:17:04 -04:00
Rubin Gerritsen f78c51d99d checkpatch: Add exception to BRACKED_SPACE rule for macros
When brackets are used in macros, there may sometimes be a space in
front of them. The checkpatch script should allow this.
The change includes the example that triggered the need for this
change.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 20:16:24 -04:00
Francois Ramu 301d24fd88 boards: st: stm32CubeProgrammer runner does not need hex-file path
Do not give the path to the zephyr.hex when flashing with the
STM32CubeProgrammer in MemoryMapped mode.
West flash can retrieve the path and file correctly. Twister cannot
find the build directory, the hex file is found correctly, though.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-13 20:16:05 -04:00
Grant Ramsay 5914c86931 arch: treewide: Remove unnessecary flash size/address defconfig when !XIP
FLASH_SIZE=0 and FLASH_BASE_ADDRESS=0 are now the default values
when XIP=n

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-06-13 20:15:35 -04:00
Grant Ramsay c5642a7b4d arch: kconfig: Set flash size/address to 0 by default when !XIP
Many boards/SoCs in-tree do this:
    if !XIP
    config FLASH_SIZE
        default 0
    config FLASH_BASE_ADDRESS
        default 0
    endif

And many other boards are missing this configuration (e.g. stm32 series).
Making this the default helps get non-XIP just working

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-06-13 20:15:35 -04:00
Nicolas Pitre 13660dd7b9 demand_paging/backing_store/ram.c: misc fixups
First, do align the buffer. The slab code puts pointers in there and it
does not like it if those are not properly aligned.

And return the actual error code from k_mem_slab_alloc() even if errors
shouldn't happen (it did happen to me because of the above ... with
assertions disabled).

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 20:12:23 -04:00
Nicolas Pitre baa70d8d36 arch/arm64/mmu: fix page table reference counting part 2
Commit f7e11649fd ("arch/arm64/mmu: fix page table reference
counting") missed a case where the freeing of a table wasn't propagated
properly to all domains. To fix this, the page freeing logic was removed
from set_mapping() and a del_mapping() was created instead, to be usedby
both by remove_map() and globalize_table().

A test covering this case should definitely be created but that'll come
later. Proper operation was verified through manual debug log
inspection for now.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 17:03:33 -04:00