Make stacks smaller (#1055)
* remove factually incorrect comment * shrinky stacky * shuffle comments
This commit is contained in:
parent
aa1b7e2c6b
commit
003c1c17f0
|
@ -44,12 +44,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define PORT_IDLE_THREAD_STACK_SIZE 64/*768*//*1024*/
|
||||
#define PORT_IDLE_THREAD_STACK_SIZE 32
|
||||
|
||||
// rusEfi main processing happens on IRQ so PORT_INT_REQUIRED_STACK has to be pretty large.
|
||||
// see also a strange comment about PORT_INT_REQUIRED_STACK in global_shared.h
|
||||
// See global_shared.h notes about stack requirements
|
||||
// see also http://www.chibios.org/dokuwiki/doku.php?id=chibios:kb:stacks
|
||||
#define PORT_INT_REQUIRED_STACK 512/*768*/
|
||||
#define PORT_INT_REQUIRED_STACK 128
|
||||
|
||||
#define CHPRINTF_USE_FLOAT TRUE
|
||||
|
||||
|
|
|
@ -41,12 +41,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define PORT_IDLE_THREAD_STACK_SIZE 1024
|
||||
#define PORT_IDLE_THREAD_STACK_SIZE 32
|
||||
|
||||
// rusEfi main processing happens on IRQ so PORT_INT_REQUIRED_STACK has to be pretty large.
|
||||
// see also a strange comment about PORT_INT_REQUIRED_STACK in global_shared.h
|
||||
// See global_shared.h notes about stack requirements
|
||||
// see also http://www.chibios.org/dokuwiki/doku.php?id=chibios:kb:stacks
|
||||
#define PORT_INT_REQUIRED_STACK 768
|
||||
#define PORT_INT_REQUIRED_STACK 128
|
||||
|
||||
#define CHPRINTF_USE_FLOAT TRUE
|
||||
|
||||
|
@ -605,7 +604,7 @@
|
|||
* tickless mode.
|
||||
*/
|
||||
#if !defined(CH_DBG_THREADS_PROFILING)
|
||||
#define CH_DBG_THREADS_PROFILING FALSE
|
||||
#define CH_DBG_THREADS_PROFILING TRUE
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -41,12 +41,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define PORT_IDLE_THREAD_STACK_SIZE 1024
|
||||
#define PORT_IDLE_THREAD_STACK_SIZE 32
|
||||
|
||||
// rusEfi main processing happens on IRQ so PORT_INT_REQUIRED_STACK has to be pretty large.
|
||||
// see also a strange comment about PORT_INT_REQUIRED_STACK in global_shared.h
|
||||
// See global_shared.h notes about stack requirements
|
||||
// see also http://www.chibios.org/dokuwiki/doku.php?id=chibios:kb:stacks
|
||||
#define PORT_INT_REQUIRED_STACK 768
|
||||
#define PORT_INT_REQUIRED_STACK 128
|
||||
|
||||
#define CHPRINTF_USE_FLOAT TRUE
|
||||
|
||||
|
|
|
@ -13,11 +13,13 @@
|
|||
/**
|
||||
* The following obscurantism is a hack to reduce stack usage, maybe even a questionable performance
|
||||
* optimization.
|
||||
*
|
||||
* rusEfi main processing happens on IRQ so PORT_INT_REQUIRED_STACK has to be pretty large. Problem
|
||||
* is that PORT_INT_REQUIRED_STACK is included within each user thread stack, thus this large stack multiplies
|
||||
* and this consumes a lot of valueable RAM. While forcing the compiler to inline helps to some degree,
|
||||
* it would be even better not to waste stack on passing the parameter.
|
||||
*
|
||||
* Of note is that interrupts are NOT serviced on the stack of the thread that was running when the
|
||||
* interrupt occurred. The only thing that happens on that thread's stack is that its registers are
|
||||
* pushed (by hardware) when an interrupt occurs, just before swapping the stack pointer out for the
|
||||
* main stack (currently 0x400=1024 bytes), where the ISR actually runs.
|
||||
*
|
||||
* see also http://www.chibios.org/dokuwiki/doku.php?id=chibios:kb:stacks
|
||||
*
|
||||
* In the firmware we are using 'extern *Engine' - in the firmware Engine is a signleton
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue