mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
The CAN/CAN FD stack requires a worker task per configured queue. Empirical profiling confirms the CAN worker task utilizes ~404 bytes of stack space on 32-bit architectures. This patch introduces CONFIGURE_MAXIMUM_CAN_QUEUES to dynamically inject the required CAN worker tasks into the master _CONFIGURE_TASKS pool. Because the 404-byte usage falls below RTEMS_MINIMUM_STACK_SIZE, provisioning them as standard system tasks automatically guarantees sufficient stack space overhead. Additionally, this patch removes the hardcoded +0x1000 stack padding in rtems_task_create to prevent workspace exhaustion, and adds the spcan01 test to verify the CONFIGURE_MAXIMUM_CAN_QUEUES macro behavior. Closes #5193