This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX OS_STKSIZE changes static memory use

LPC4078, uVision V4.74.0.22

I have 3 tasks in my system all of which I start with user defined stacks.
I start one with os_sys_init_user() and the other two with os_tsk_create_user().
I therefore didn't expect that changing OS_STKSIZE would have any effect on my static memory use but it does.

OS_STKSIZE defines the number of 32bit entries used for RTX task stacks. When I increase this value the static RAM allocated to rtx_config.o changes by that amount.

I also have OS_PRIVCNT set to 3. ie I have declared that all 3 tasks have user provided stacks.

What is this RAM used for?

Parents
  • Many thanks Robert,

    I've done some experiments and need around 600 bytes to run the idle task containing just

    for (;;);
    

    I'm surprised it is this high. I don't think that interrupts use task stacks so I'm at a loss to know what the 600 bytes is used for. To be sure my delivered code runs reliably I've doubled the figure.

Reply
  • Many thanks Robert,

    I've done some experiments and need around 600 bytes to run the idle task containing just

    for (;;);
    

    I'm surprised it is this high. I don't think that interrupts use task stacks so I'm at a loss to know what the 600 bytes is used for. To be sure my delivered code runs reliably I've doubled the figure.

Children
No data