Re: Global variables not initialized properly (Win CE 5.0)
- From: "Dean Ramsier" <ramsiernospam@xxxxxxxxxx>
- Date: Thu, 4 Jan 2007 15:21:23 -0500
You're probably accessing the variable too early. You have to wait until
after the KernelRelocate function has been called.
--
Dean Ramsier - eMVP
BSQUARE Corporation
"E Semmes" <E Semmes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D7742529-E75F-4A31-BDB7-69B898B87589@xxxxxxxxxxxxxxxx
Hello all,
I developed a RAM-based application and was able to build a debug image
successfully. In it I initialize several global variable to set values,
ie.
#define S3C2412_REG_GPCDAT 0x56000024
unsigned long * gpcConData = (unsigned long *) S3C2412_REG_GPCDAT;
However, during execution my global variable, *gpcConData, is not set to
the
correct value, 0x56000024. Instead it's a seemingly random number. Upon
inspection of the S-record file (EBOOT.SRE), I see that the linker is NOT
initializing that value at all. My fix for the time being is to perform
the
initialization in executed code. This applies to all user-defined global
variables. Obviously, this isn't acceptable as I don't want to have to
initialize all my global variables during run-time.
Is there a env var, flag or setting that must be changed to force the
linker
to actually initialize globals with the value I set them to?
Please help!
Thanks,
Emile
The platform is a Samsung S3C2412 ARMV4I-based uC with 32MB SDRAM mapped
at
0x3000 0000. I am using Platform Builder
.
- Prev by Date: Re: Need some clues
- Next by Date: WinCE 6: Link a dll (without WinCE build system) : unresolved external symbol
- Previous by thread: Windows CE Connection Problem
- Next by thread: Re: Global variables not initialized properly (Win CE 5.0)
- Index(es):
Relevant Pages
|