Re: romimage problem



Valter Minute <v_a_l_t_e_r.m_i_n_u_t_e@xxxxxxxxxxxxx> wrote in
news:Xns9B36CE03FAAD9VALTERMINUTE@xxxxxxxxxxxxx:

[...]

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
why...
It's the linker allocating those data at the wrong address (0x84000)
or it's romimage that stores the initialization data in the wrong
place?
Or it's something wrong in my code/configuration files?
My .bib file is quite simple:

MEMORY

EBOOT 00070000 00040000 RAMIMAGE
RAM 000B0000 00010000 RAM

DRV_GLB 00000000 00001000 RESERVED

CONFIG
COMPRESSION=OFF
KERNELFIXUPS=OFF

;used to generate .sre and .nb0 files
SRE=ON

ROMSTART=00070000
ROMSIZE=00040000
ROMWIDTH=32

MODULES

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


The only linker-related options in my sources file are:
EXEENTRY=StartUp
EXEBASE=0x00070000

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
www.fortechembeddedlabs.it
Training, support and development for Windows CE
(the reply address of this message is invalid)
.



Relevant Pages

  • Re: blockram init file in spartan 3E
    ... I'm using blockram which is initialized from a .coe file. ... I need to often change the initialization data, and every time I have to go ... a lack of ram which makes the stupid java machine unable to start.. ...
    (comp.arch.fpga)
  • Re: ISE 11.1 - readmemh issues
    ... Size of the initialization data must exactly match the size of the ... Does Xst log of the initial contents of inferred ROMs anywhere? ... can I actually see what's in the ROM without either running the ... incompatible with block and distributed RAM resources available on Xilinx ...
    (comp.arch.fpga)
  • Re: IAR compiler & MSP430 problem
    ... Since the array for initialized data only, that means, I've ... The arrays are located in flash memory and don't use any of your RAM ... The initialization routine doesn't have to copy the initialization ...
    (comp.arch.embedded)
  • Re: BlockROM inference in XST - This is just plain silly
    ... release of ISE has support for "synchronously controlled initialization ... of the RAM data outputs" (pg 218 of XST User Guide) and for RAM ... if RISING_EDGE(Clk) then ...
    (comp.arch.fpga)
  • BlockROM inference in XST - This is just plain silly
    ... As part of a re-engineering of a 15 year old product, I need a ROM ... release of ISE has support for "synchronously controlled initialization ... of the RAM data outputs" and for RAM ... if RISING_EDGE(Clk) then ...
    (comp.arch.fpga)