Re: romimage problem

Valter Minute <v_a_l_t_e_r.m_i_n_u_t_e@xxxxxxxxxxxxx> wrote in


I'll add some information to my previous post.
I'm working on Windows CE 6.0 on an ARM-based device.
I removed the "static" specification from variable declarations to
have them listed inside my .map file.
Now I see that the are from 0x84000 to 0x961A0 (0x84000+0x121A0) is
used to store most of the local variables declared in my loader code
and, since most of them are initialized to 0, the first entry in the
copy tables seems to be correct (0x255 bytes filled with
"meaningful" data and the rest memset-ted to 0).
The problem is that the address where those variables are going to
be stored in RAM overlaps the address where the initializers for
other variables (g_oalAddressTable and others) are stored and so
those variables will never be initialized because KernelRelocate
(invoked by BootloaderMain) will overwrite the initialization data
with zeros.
I can "fix" this specific issue by providing my own version of
KernelRelocate that will process the copy entries table in the
reverse order, but I would like to understand what's happening and
It's the linker allocating those data at the wrong address (0x84000)
or it's romimage that stores the initialization data in the wrong
Or it's something wrong in my code/configuration files?
My .bib file is quite simple:


EBOOT 00070000 00040000 RAMIMAGE
RAM 000B0000 00010000 RAM

DRV_GLB 00000000 00001000 RESERVED


;used to generate .sre and .nb0 files



nk.exe $(_FLATRELEASEDIR)\bootload.exe EBOOT

The only linker-related options in my sources file are:

The loader is stored in flash and copied to RAM (at address 0x70000)
by a small "pre-bootloader" that it's loaded in the processor
internal ram and loads the "real" loader from NAND flash to RAM.

Valter Minute
Training, support and development for Windows CE
(the reply address of this message is invalid)