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

CI twister tests: target has not sufficient memory #83813

Open
lfelten opened this issue Jan 10, 2025 · 2 comments
Open

CI twister tests: target has not sufficient memory #83813

lfelten opened this issue Jan 10, 2025 · 2 comments
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@lfelten
Copy link
Contributor

lfelten commented Jan 10, 2025

Describe the bug
When twister runs automated tests, some (at least one) tests result in binaries that need more memory than the target provides. This will then cause the test to fail.

To Reproduce
west build -p -b m5stack_core2/esp32/appcpu tests/subsys/secure_storage/psa/crypto -T secure_storage.psa.crypto.secure_storage

Error:

 /opt/toolchains/zephyr-sdk-0.17.0/xtensa-espressif_esp32_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32_zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.flash.text' will not fit in region `iram0_1_seg'
/opt/toolchains/zephyr-sdk-0.17.0/xtensa-espressif_esp32_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32_zephyr-elf/bin/ld.bfd: IRAM0 segment data does not fit.
/opt/toolchains/zephyr-sdk-0.17.0/xtensa-espressif_esp32_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32_zephyr-elf/bin/ld.bfd: region `iram0_1_seg' overflowed by 10072 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Expected behavior
The test should build and pass.

Impact
Blocks PR #82474

Logs and console output

Full output is visible in this CI run:
https://github.com/zephyrproject-rtos/zephyr/actions/runs/12602562689/job/35126072161?pr=82474

Environment (please complete the following information):

  • OS: Linux and CI
  • Toolchain Zephyr SDK
  • Commit SHA: current main will fail

Additional context
@valeriosetti did the following analysis:

Since I was not able to understand why the changes I made in my PR (#82859) were causing this issue I used git bisect to find the problematic commit. It turns out that it's this one: 322ab2a (prior to that commit the sample you linked builds, after it does not).

For the records, the changes I introduced in 82859 reduce the overflow amount from 3296 bytes to 1288 (I tried reverting all the commits manually). From the build failure point of view I understand that this is not interesting, but IMO it proves that 82859 is going in the right direction to reduce RAM/ROM footprint.

@lfelten lfelten added the bug The issue is a bug, or the PR is fixing a bug label Jan 10, 2025
Copy link

Hi @lfelten! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

@sylvioalves
Copy link
Collaborator

sylvioalves commented Jan 10, 2025

@lfelten CI should not fail when ram overflows. The issue lies in the way CI detects overflow and it is current missing the regex for iram section. I submitted an update to overcome this: #83822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants