Submitted Questions

  • Where is the function declared as static stored in memory?

    The usage of static with a function or variable restricts their scope.Is this behaviour memory related?

    jbode

    • Jun 5th, 2019

    The static keyword does not affect where or how a function is stored in memory. It only affects whether the function *name* is visible to code outside of the current translation unit (source file).

    Harsha

    • Mar 27th, 2019

    You have to specify where you are going to place it. You can do this in the linker file(.lsl or .ld file). If you place it in the .text section, it goes into the Flash, else by default a static function is placed in the RAM(.data).