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
wurstnase
Posts: 121
Joined: Tue Oct 17, 2017 2:24 pm
Has thanked: 43 times
Been thanked: 30 times
Contact:

CH_DBG_FILL_THREADS should fill the main stack  Topic is solved

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

Hi,

currently only CH_DBG_ENABLE_STACK_CHECK will fill the main-stack.
Also

Code: Select all

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

User avatar
Giovanni
Site Admin
Posts: 13012
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 745 times
Been thanked: 621 times
Contact:

Re: CH_DBG_FILL_THREADS should fill the main stack

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

Hi,

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:
- CRT0_STACKS_FILL_PATTERN
- CRT0_INIT_STACKS

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 2 guests