-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards, nucleo: THREAD_STACKSIZE_DEFAULT too large #6669
Description
In #6662 I optimized the size of tests/xtimer_drift to fit onto board arduino duemilanove, which has only 2K RAM. In the Makefile of this test the nucleo32-f031 and nucleo32-f042 are blacklisted due to insufficient mem - and @miri64 asked it this is still valid for that tests, so I looked into it.
Simply running make for these boards, resulted in a linker error saying that section .bss would not fit into RAM, with an overflow of 472B for f042 and 2512B for f031 respectively. Btw. f042 has 6k RAM and f032 4K, so 2-3 times more than the arduino.
So why does the test not fit onto the boards, as they sure have enough RAM? Well, the problem is all nucleos share the definition of THREAD_STACKSIZE_DEFAULT in cpu/cortexm_common where it is set to 1024B (+ extra 512B for printf) <- so not surprisingly 4K RAM (f031) are not much for 3 threads and some data.
The two nucleos are blacklisted for many tests and examples, which might just due to the fact of arbitrary large stack sizes. Question to those more experiences with these boards, is there any reason the stack size has to be that large? IMHO it should be adapted for such constrained devices.
See here:
./driver_pir/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./gnrc_sock_ip/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./gnrc_sock_udp/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f042 nucleo32-f031
./irq/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./libfixmath_unittests/Makefile
BOARD_INSUFFICIENT_MEMORY := weio nucleo32-f042 nucleo32-f031
./lwip_sock_tcp/Makefile
BOARD_INSUFFICIENT_MEMORY = nucleo-f030 nucleo32-f031 nucleo32-f042 nucleo-f334 \
./lwip_sock_udp/Makefile
BOARD_INSUFFICIENT_MEMORY = nucleo32-f042 nucleo-f030 nucleo32-f031 nucleo-f042 \
./msg_send_receive/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./msg_try_receive/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./mutex_order/Makefile
BOARD_INSUFFICIENT_MEMORY := stm32f0discovery weio nucleo-f030 nucleo32-f042 nucleo32-f031
./mutex_unlock_and_sleep/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./netdev2_test/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./periph_uart/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./pipe/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./pkg_u8g2/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./pthread_condition_variable/Makefile
BOARD_INSUFFICIENT_MEMORY := stm32f0discovery nucleo32-f031
./pthread_cooperation/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./rmutex/Makefile
BOARD_INSUFFICIENT_MEMORY := stm32f0discovery weio nucleo-f030 nucleo32-f031 \
./sched_testing/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./thread_basic/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./thread_exit/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./thread_flags/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./thread_msg/Makefile
BOARD_INSUFFICIENT_MEMORY := stm32f0discovery nucleo32-f042 nucleo32-f031
./thread_msg_block_w_queue/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./thread_msg_block_wo_queue/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./thread_msg_seq/Makefile
BOARD_INSUFFICIENT_MEMORY := stm32f0discovery nucleo32-f042 nucleo32-f031
./xtimer_drift/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f042 nucleo32-f031
./xtimer_hang/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031
./xtimer_longterm/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f042 nucleo32-f031
./xtimer_msg/Makefile
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031