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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>