-
Notifications
You must be signed in to change notification settings - Fork 7.4k
nrf52810_pca10040 SRAM space not enough #15103
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
Comments
Seeing the same error at 193fb97 |
@andrewboie this is the same issue when PR#15005 run CI test. |
nrf52810 is a low-end SOC - several tests do not run for this device, anyways. I am wondering whether it is a problem of increasing the PRIVILEGED_STACK_SIZE to default of 1024. |
|
My guess as well. How many threads does this test create? |
from priv_stacks_hash.c, sched/preempt has 11 threads and /kernel/poll has 10 threads. |
for sched/preempt/, if PRIVILEGED_STACK_SIZE = 256, zephyr_prebuilt.elf is 15872 Bytes, so if set PRIVILEGED_STACK_SIZE = 1024, zephyr_prebuilt.elf will almost occupy the whole sram. Finally it should add kobjects, so when do the linking for zephyr.elf, there isn't enough space. I see the commit changing priv stack size from 256 to 1024, so the work for proving maximum syscall stack depth is ongoing? @andrewboie |
@wentongwu I can't reproduce the failure in tests/kernel/sched/preempt, can you retry?
|
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps expose stack overflows in test code, activating userspace without putting threads in user mode is of very limited value. Now CONFIG_TEST_USERSPACE is off by default. Any test which puts threads in user mode will need to set CONFIG_TEST_USERSPACE. This should greatly increase sanitycheck build times as there is non-trivial build time overhead to enabling this feature. This also allows some tests which failed the build on RAM-constrained platforms to compile properly. tests/drivers/build_all is a special case; it doesn't put threads in user mode, but we want to ensure all the syscall handlers compile properly. Fixes: zephyrproject-rtos#15103 (and probably others) Signed-off-by: Andrew Boie <[email protected]>
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps expose stack overflows in test code, activating userspace without putting threads in user mode is of very limited value. Now CONFIG_TEST_USERSPACE is off by default. Any test which puts threads in user mode will need to set CONFIG_TEST_USERSPACE. This should greatly increase sanitycheck build times as there is non-trivial build time overhead to enabling this feature. This also allows some tests which failed the build on RAM-constrained platforms to compile properly. tests/drivers/build_all is a special case; it doesn't put threads in user mode, but we want to ensure all the syscall handlers compile properly. Fixes: #15103 (and probably others) Signed-off-by: Andrew Boie <[email protected]>
Describe the bug
it seems nrf52810_pca10040 SRAM space is not enough for current version. It fails on link stage.
To Reproduce
Steps to reproduce the behavior:
Screenshots or console output
for case tests/kernel/sched/preempt on platform nrf52810_pca10040
Memory region Used Size Region Size %age Used
FLASH: 63104 B 192 KB 32.10%
SRAM: 25 KB 24 KB 104.17%
IDT_LIST: 56 B 2 KB 2.73/opt/zephyr-sdk-0.10/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: zephyr/zephyr_prebuilt.elf section
priv_stacks_noinit' will not fit in region
SRAM'/opt/zephyr-sdk-0.10/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: section .intList VMA [0000000020006000,0000000020006037] overlaps section priv_stacks_noinit VMA [0000000020003800,00000000200063ff]
/opt/zephyr-sdk-0.10/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: region `SRAM' overflowed by 1024 bytes
collect2: error: ld returned 1 exit status
for case tests/kernel/poll on platform nrf52810_pca10040
-sdk-0.10/arm-zephyr-eabi/bin/arm-zephyr-eabi-objdump -S zephyr.elf > zephyr.lst && /opt/zephyr-sdk-0.10/arm-zephyr-eabi/bin/arm-zephyr-eabi-readelf -e zephyr.elf > zephyr.stat
/opt/zephyr-sdk-0.10/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: zephyr/zephyr.elf section
priv_stacks_noinit' will not fit in region
SRAM'/opt/zephyr-sdk-0.10/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: region `SRAM' overflowed by 2048 bytes
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: