#907 Static Variable Initialization with SDCC 2.4.0

closed-invalid
nobody
5
2013-05-25
2005-04-17
Anonymous
No

I am noticing that SDCC V2.4.0 does not seem to
initialize static variables when building the FreeRTOS
build with the FreeRTOS makefile.

I've had to add code to do initialization on the variables
in the main routine in order to get it to work. (see
attached zip with project Per FreeRTOS documentation
with modifications)

The other possibility is that code within a macro(which
is going to take me some time to debug, due to the
debugger not being able to expand the macro's) is
corrupting the initialized area of static ram.

Any thoughts on this would be appreciated.
wwmurray @ sbcglobal.net (remove spaces before
reply)

Discussion

  • Maarten Brock
    Maarten Brock
    2005-04-18

    Logged In: YES
    user_id=888171

    Can you confirm this still exists in 2.4.8?

     
  • Logged In: NO

    I did some further debugging, and determined that the static
    variables are not being initialized. I did a Fill of memory with
    0xa5, and then ran the debugger to right before the
    initialization point and the static vairiables that should have
    been initialized were still 0xa5.

     
  • Logged In: NO

    The latest build of SDCC from 04-17-2005 is initializing the
    static variables correctly in the FreeRTOS V2.5.4 build.

    A pretty neat compiler and RTOS!

     
  • Maarten Brock
    Maarten Brock
    2005-04-18

    • milestone: --> non_bugs
    • status: open --> closed-invalid
     
  • Logged In: NO

    2.4.8 is problem Free, and initializes the variables correctly