Skip to content
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

arch/risc-v: Add ARCH_HAVE_RAMFUNCS to ESP32-C6 and ESP32-H2 #15910

Merged

Conversation

tmedicci
Copy link
Contributor

Summary

  • arch/risc-v: Add ARCH_HAVE_RAMFUNCS to ESP32-C6 and ESP32-H2

Following the #14741, add the ARCH_HAVE_RAMFUNCS config to ESP32-C6 and ESP32-H2 to suppress the RWX memory region warning.

Signed-off-by: Tiago Medicci Serrano [email protected]

Impact

Impact on user: NO.

Impact on build: YES. Suppress a warning during the build and prevent it from being understood incorrectly.

Impact on hardware: NO.

Impact on documentation: NO.

Impact on security: NO.

Impact on compatibility: NO.

Testing

Just build any defconfig for these two chips and check for the warning message:

riscv-none-elf-ld: warning: /home/tiago/Documents/work/espressif/projects/nuttx/nuttxspace/nuttx/nuttx has a LOAD segment with RWX permissions

For instance, esp32h2-devkit:nsh

Building

make -j distclean && ./tools/configure.sh esp32h2-devkit:nsh && make -j$(nproc)

Results

Before this patch, the build log shows the warning message:

LD: nuttx
riscv-none-elf-ld: warning: /home/tiago/Documents/work/espressif/projects/nuttx/nuttxspace/nuttx/nuttx has a LOAD segment with RWX permissions
Memory region         Used Size  Region Size  %age Used
             ROM:      240761 B        16 MB      1.44%
     iram0_0_seg:       17168 B     258000 B      6.65%
        irom_seg:      117748 B        16 MB      0.70%
     dram0_0_seg:       27840 B     258000 B     10.79%
        drom_seg:      175228 B        16 MB      1.04%
      lp_ram_seg:          0 GB       4072 B      0.00%
 lp_reserved_seg:          0 GB         24 B      0.00%
CP: nuttx.hex

After this patch, the warning message is gone:

LD: nuttx
Memory region         Used Size  Region Size  %age Used
             ROM:      240761 B        16 MB      1.44%
     iram0_0_seg:       17168 B     258000 B      6.65%
        irom_seg:      117748 B        16 MB      0.70%
     dram0_0_seg:       27840 B     258000 B     10.79%
        drom_seg:      175228 B        16 MB      1.04%
      lp_ram_seg:          0 GB       4072 B      0.00%
 lp_reserved_seg:          0 GB         24 B      0.00%
CP: nuttx.hex

Following the apache#14741, add the
`ARCH_HAVE_RAMFUNCS` config to ESP32-C6 and ESP32-H2 to suppress
the RWX memory region warning.

Signed-off-by: Tiago Medicci Serrano <[email protected]>
@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small labels Feb 25, 2025
@jerpelea jerpelea merged commit fcff16a into apache:master Feb 26, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants