Skip to content

LLD fixes, warning and handling #2810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3,041 commits into
base: main
Choose a base branch
from
Open

Conversation

tejlmand
Copy link
Contributor

Cherry-pick of: 88970

This PR fixes warnings and handling happening with lld.

First commit fixes the warning:

ld.lld: warning: <internal>:(.eh_frame) is being placed in '.eh_frame'

Zephyr doesn't need the .eh_frame for C code and even discards the section when converting the elf to bin / hex.
gcc/ld per default discards the section, so there is no reason we should keep it for lld.

Second commit fixes the warning:

ld.lld: warning: ignoring memory region assignment for non-allocatable section '.last_section'

This is not just a warning but also results in the LONG(<val>) command inside the linker script to be ignored by lld.
Result is that the last section id is missing in the final output.

To ensure correct and identical behavior between ld and lld, the last section id is now linked into the final image through C code.

anangl and others added 30 commits April 1, 2025 17:38
Non-secure variants for nRF7002 DK were removed from upstream
in commit 10d4973. Revert these
changes downstream, so that the NS variants are still available.

Signed-off-by: Andrzej Głąbek <[email protected]>
…ls header

Fix all docstrings in header to ensure compliance
with Zephyr's documentation guidelines.

Signed-off-by: Triveni Danda <[email protected]>
(cherry picked from commit c9821ff)
…network options

Use getopt API to process arguments for `cred add` command.

Signed-off-by: Triveni Danda <[email protected]>
(cherry picked from commit 7b6f257)
…nfiguration

On nrf54h20 there are additional analog pins (AIN8+). When differential
mode is used they must not be mixed with AIN0-AIN7. Add build time
validation which detects if configuration is invalid.

Upstream PR #: 87405

Signed-off-by: Krzysztof Chruściński <[email protected]>
…vref_mv

Sample is reading vref-mv property to get reference voltage and then if
reference source is set to ADC_REF_INTERNAL this value is overwritten.
If vref-mv property is provided then it should not be overwritten.

Upstream PR #: 87405

Signed-off-by: Krzysztof Chruściński <[email protected]>
…nfiguration

AIN9 source needs special handling (all from AIN8-AIN14). Conversion
result needs to be scaled up by 3.6 additionally to gain and reference
voltage. In order to achieve correct value in the sample vref-mv is
used as reference voltage instead of predefined internal reference
source.

Upstream PR #: 87405

Signed-off-by: Krzysztof Chruściński <[email protected]>
…F54L20 cpuapp

Add Overlay required to run the test on
nrf54l20pdk/nrf54l20/cpuapp.

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit f2cf266)
Add number of channels implemented by the local DPPIC instances.

Upstream PR #: 85853

Signed-off-by: Adam Kondraciuk <[email protected]>
… for DPPIC

The `owned-channels` property specifies which channels are assigned to
a given target. Additionally, the `source-channels` or `sink-channels`
property defines channels that can be used to forward an event outside
the DPPI domain, otherwise they can only be used within it.

Upstream PR #: 85853

Signed-off-by: Adam Kondraciuk <[email protected]>
Add pin control support for the sy1xx soc.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 804e3f6)
Signed-off-by: Sven Ginka <[email protected]>
Add pin ctrl to the sy1xx device tree.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit fb53ea0)
Signed-off-by: Sven Ginka <[email protected]>
Add support for Realtek RTS5912 embedded controller (EC).

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit b83501e)
Signed-off-by: Lin Yu-Cheng <[email protected]>
Add Realtek RTS5912 chip and driver device tree files.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 041bf2e)
Signed-off-by: Lin Yu-Cheng <[email protected]>
…rsion of RTS5912.

Add clock controller driver for Realtek RTS5912.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 6ea7560)
Signed-off-by: Lin Yu-Cheng <[email protected]>
Add pinctrl driver for Realtek RTS5912.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 2c25182)
Signed-off-by: Lin Yu-Cheng <[email protected]>
…5912.

Add swj driver for Realtek RTS5912.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 471cc35)
Signed-off-by: Lin Yu-Cheng <[email protected]>
…5912.

Add timer driver for Realtek RTS5912.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit cfb2074)
Signed-off-by: Lin Yu-Cheng <[email protected]>
Add gpio driver for Realtek RTS5912.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 2656029)
Signed-off-by: Lin Yu-Cheng <[email protected]>
…5912.

Add UART driver for Realtek RTS5912.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit a3c0b03)
Signed-off-by: Lin Yu-Cheng <[email protected]>
Add support for Realtek rts5912_evb board

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 7762d3e)
Signed-off-by: Lin Yu-Cheng <[email protected]>
This commit adds api and driver of Realtek EC to maintainers.yml

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit a4d0591)
Signed-off-by: Lin Yu-Cheng <[email protected]>
Introduce Nordic NRFS AudioPLL bindings.

Upstream PR #: 87471

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Add audiopll node to nrf54h20.

Upstream PR #: 87471

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Add NRFS AudioPLL clock control device driver.

Upstream PR #: 87471

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Add audiopll to sample.

Upstream PR #: 87471

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Add a shim that allows using the nRF TDM
(Time division multiplexed audio interface) HAL by I2S Zephyr API.

Upstream PR #: 82144

Signed-off-by: Adam Kondraciuk <[email protected]>
What is the change?
 - Fixes #83660 allowing device to now enter suspend mode even if
   CONFIG_DEBUG_THREAD_INFO is enabled.

Why is this needed?
 - z_sys_post_kernel was cleared as part of #d778d5c
   to "allow debuggers to display the correct thread state after
   the first 3 instructions have run".
   This is not required while resuming from suspend and
   it prevents the device from entering suspend so,
   move it out of resume path.

Signed-off-by: Sudan Landge <[email protected]>
(cherry picked from commit 743fe63)
What is the change?
 - APIs `pm_s2ram_mark_set` and `pm_s2ram_mark_check_and_clear`,
   used to set/check pm_s2ram magic marker,
   no longer have Arm specific limitations.

Why is this needed?
 - These APIs are generic and should not have arch specific dependency.

Signed-off-by: Sudan Landge <[email protected]>
(cherry picked from commit 7beff12)
Regular label are exported in the object file and cause gdb to consider
them as function start. Local labels on the other hand are not exported.
For example, using `disassemble z_arm_pendsv` after this change will
disassemble the whole function rather than stop at the first branch.

Signed-off-by: Wilfried Chauveau <[email protected]>
(cherry picked from commit 5261680)
nordic-segl and others added 24 commits April 22, 2025 12:36
…io clocks on nRF54"

This reverts commit e48bca4.

Signed-off-by: Sebastian Głąb <[email protected]>
…s on nRF54

Added support for audio clock for nRF54L20 and AudioPLL
for nRF54H20 in DMIC PDM driver.

Upstream PR #: 87105

Signed-off-by: Michał Stasiak <[email protected]>

Signed-off-by: Sebastian Głąb <[email protected]>
…tion

Commit add tcat related function implementation

Signed-off-by: Przemyslaw Bida <[email protected]>
(cherry picked from commit 150af78)
Signed-off-by: Adrian Gielniewski <[email protected]>
…weak

Allow relocate_vector_table() to be overwritten. This is necessary if
the IRQ vector table is handled proprietary, e.g. before the zephyr
kernel is initialized. In this case we want this function to be empty to
avoid overriding the previous configuration.

Co-authored-by: Krzysztof Chruściński <[email protected]>
Signed-off-by: Eivind Jølsgard <[email protected]>
(cherry picked from commit ab341e0)
Use PPI resources information from SoftDevice when it is present.

Co-authored-by: Krzysztof Chruściński <[email protected]>
Signed-off-by: Eivind Jølsgard <[email protected]>
Pull the preliminary nRF71 support.

Upstream PR #: 88816

Signed-off-by: Chaitanya Tata <[email protected]>
nRF7120 PDK support that uses IPC as comms b/w APP and Wi-Fi domains.

Upstream PR #: 88816

Signed-off-by: Chaitanya Tata <[email protected]>
…guration

Do not allow CONFIG_PM_DEVICE_SYSTEM_MANAGED when fast PWM instance
is used.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit fc77abc)
Add compile time detection if fast SPIM instances are used
and system managed device PM is enabled. This configuration is
not supported.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit d8dc241)
… SPIM instances

Add FOREACH macro which iterates over all SPIM instances and creates
device instances for each enabled instance.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 9d59e03)
Add support to read identity and private key password if
configured in Enterprise mode.

Signed-off-by: Triveni Danda <[email protected]>
(cherry picked from commit 589333e)
Fix the kconfig check for enterprise crypto support in AP mode.
Also, remove the unnecessary Hostapd enterprise crypto check in
credentials code.

Signed-off-by: Triveni Danda <[email protected]>
(cherry picked from commit b3ea4f8)
Based on few tests, it was observed that WPA supplicant's maximum usage
for connection and disconnection is 4360.

This would save ~4K which is huge as we have a crunch for RAM.

This was missed when hostap was upstreamed from NCS.

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit 83592e8)
When connecting to a WPA3 connection, the max stack size observed was
5456, fix the SoF by increasing by 200bytes (cushion added).

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit 24cbc88)
During experiments it was observed that workqueue uses a maximum of
3872 bytes, so, with cushion added set it to 4096.

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit 96dc3d3)
In case interface is UP, the interface is added to WPA supplicant in the
iface_wq itself and the max stack size is 4264, so, increase the stack
size of the iface_wq.

If the interface is added via net_mgmt thread then it works fine.

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit e2bf746)
…tion

Increase stack size of supplicant thread to fix crash seen during
enterprise mode connection. Increase heap requirement of hostap
to handle TLS processing failures.

Signed-off-by: Ravi Dondaputi <[email protected]>
(cherry picked from commit d073e62)
… security

Add support for configuring enterprise mode security.
Fixes SHEL-3573.

Upstream PR #: 88653

Signed-off-by: Ravi Dondaputi <[email protected]>
Enable Wi-Fi credentials support. Update the heap sizes as
required for enterprise mode.

Upstream PR #: 88653

Signed-off-by: Ravi Dondaputi <[email protected]>
… overflow

Inclusion of CONFIG_WIFI_SHELL_RUNTIME_CERTIFICATES causes build time
RAM overflow issues. Decrease NRF_WIFI_DATA_HEAP_SIZE to accommodate
the RUNTIME_CERTIFICATES feature.

Upstream PR #:88861

Signed-off-by: Ravi Dondaputi <[email protected]>
These are QSPI related which is part of buslib.

Upstream PR #: 88897

Signed-off-by: Chaitanya Tata <[email protected]>
These are applicable for Wi-Fi over QSPI (nRF7002DK) or Flash over QSPI
(nRF52/53 + nRF7002EK) and as most Wi-Fi samples run on 128MHz (for
performance), disable the anomalies for both.

Upstream PR #: 88897

Signed-off-by: Chaitanya Tata <[email protected]>
Discard the eh_frame section when C++ exceptions are disabled.

In principle the eh_frame may be used for other purposes such as
backtracing when linking C programs, then Zephyr compiles each source
file with '-fno-asynchronous-unwind-tables', thus keeping the eh_frame
in the elf output just takes up space.

When using gcc/ld, then the eh_frame is generally generally discarded
per default, however for clang/lld it will be included but give a
warning that the section is auto-placed.

Some platforms already discards the eh_frame, so unify this for all
targets.

As eh_frame is now discarded in linker scripts then post processing step
of removing the section during hex or bin conversion can also be
removed.

Upstream PR #: 88970

Signed-off-by: Torsten Rasmussen <[email protected]>
Move creation of last section id from ld linker script LONG() usage to
C code with last section attribute.

The use of `LONG()` works correctly with ld but lld emits a warning
because .last_section section is not allocated as there are no matching
input sections and discards the `LONG()` call, meaning the last section
identifier will not be present in the flash.
> ld.lld: warning: ignoring memory region assignment for
>                             non-allocatable section '.last_section'

Placing the last section id in `.last_section` in C code makes lld
allocate the memory for the id and thereby create the output section
with the correct output.

Upstream PR #: 88970

Signed-off-by: Torsten Rasmussen <[email protected]>
@tejlmand tejlmand requested a review from nordicjm April 23, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.