[riot-devel] RIOT and static initializers in C++
ludwig.ortmann at fu-berlin.de
Fri Sep 19 18:09:25 CEST 2014
This might have to do with how native is initialized.
I can try looking into it, but I don't really have much time at the
In case someone with experience in linker scripts is reading this and
wants to help out, speak up!
On Fri, Sep 19, 2014 at 03:15:00PM +0000, Hiesgen, Raphael wrote:
> static initializers don’t seem to work on RIOT. Setting a breakpoint in the constructor reveals, that it is never called. I believe the static initialization should occur before calling main. If I am not mistaken, RIOT calls the function startup before the main.
> I attached an example program . To try it on RIOT, copy the code into the cpp example. If foo is initialized correctly, data should be set to 1. However, the example prints 0.
> Usually the compiler should take care of the initialization. Does someone know why this initialization does not happen on RIOT?
> Thank you
>  https://gist.github.com/josephnoir/c948b78bf586ae4fa361
> devel mailing list
> devel at riot-os.org
More information about the devel