CH_DBG_FILL_THREADS should fill the main stack Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
User avatar
Posts: 121
Joined: Tue Oct 17, 2017 2:24 pm
Has thanked: 43 times
Been thanked: 30 times

CH_DBG_FILL_THREADS should fill the main stack  Topic is solved

Postby wurstnase » Fri Dec 13, 2019 12:32 pm


currently only CH_DBG_ENABLE_STACK_CHECK will fill the main-stack.

Code: Select all

static inline stkalign_t *chThdGetWorkingAreaX(thread_t *tp)
should be available with CH_DBG_FILL_THREADS.
\o/ Nico

User avatar
Site Admin
Posts: 13585
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 876 times
Been thanked: 750 times

Re: CH_DBG_FILL_THREADS should fill the main stack

Postby Giovanni » Fri Dec 13, 2019 1:37 pm


The main stack is not defined in the RTOS code, it is part of the normal C runtime because it is already in use upon main() function entry and before chSysInit() is called (you cannot clear a stack you are running on), the allocation is statically done in the linker file.

The fill options for system stacks are available in the startup file crt0xx.S:


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 1 guest