Constant sections placement by romimage.exe

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello,
When I build a tiny boot loader for booting from NAND, I need to cut
off the 1st 4kB of zeros in order to fit in the NAND flash's very
first block. Unfortunately, all the constant sections are badly
located including pTOC, which I can fix at runtime by subtracting
0x1000. However, is there a possibility to fix this offset at build
time (with a BIB file option)?

My BIB file:

MEMORY
SPARE 80000000 00001000 RESERVED
BOOT 80001000 00005000 RAMIMAGE
RAM 80006000 00008000 RAM
STACK 8000e000 00004000 RESERVED

CONFIG
ROMSTART=80001000
ROMWIDTH=32
ROMSIZE=00003000

My romimage.exe output:

Found pTOC at 000013bc
No imports for nk.exe
Processing BOOT

Writing D:\ccview\chavosp0_mx31_ce600\visualdev6\WINCE600\platform
\iMX31ADS\target\ARMV4I\retail\BOOT.bin
Table of contents 8000278c 00000020 ( 32)
Writing ROM signature and TOC pointer at 80001040
Kernel data copy section 800027ac 00000010 ( 16)
ROM Header 80002738 00000054 ( 84)
First DLL Address: 4001c001
Last DLL Address: 4001c001
Physical Start Address: 80001000
Physical End Address: 80003018
Start RAM: 80006000
Start of free RAM: 80008000
End of RAM: 8000e000
Number of Modules: 1
Number of Copy Sections: 1
Copy Section Offset: 800027ac
FileSys 4K Chunks/Mbyte: 128 <2Mbyte 128 2-4Mbyte 0 4-6Mbyte 0
6Mbyte
CPU Type: 01c2h
Miscellaneous Flags: 0002h
Total ROM size: 00002018 ( 8216)
Starting ip: 80002000
Raw files size: 00000000
Compressed files size: 00000000
Compacting bin file...
Writing rom file...
Start 80001000 Len 00000004
Start 80001040 Len 00000008
Start 80001048 Len 00000004
Start 80002000 Len 00000738
Start 80002738 Len 00000054
Start 8000278c Len 00000030
Start 80003000 Len 00000018
Creating rom file......

All constant sections (static const global variable) are at
0x80002xxx, but they should be at 0x80001xxx!!!

Peter
.



Relevant Pages

  • Re: WinCE boot from RAM with Lauterbach trace32
    ... No my OS resides at 0x80001000 (RAM). ... Actually my boot sequence is like i ... loader) to CPU internal sram from NAND and executes. ... And eboot shall be responsible to ...
    (microsoft.public.windowsce.embedded)
  • Re: Boot Loader and bib file
    ... bootloader turns the MMU on or not ... to and run from RAM first. ... While developing Boot loader, the files eboot.bib and config.bib play ... And what is the significance of ROM OFFSET and ROMWIDTH in this bib ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Secure Download Boot Loader in Win CE 6.0
    ... RAM 80040000 00010000 RAM ... Bruce.Eitman AT EuroTech DOT com ... I have performed the following to enable the SDBL: ... // Provided by the platform's boot loader at link time. ...
    (microsoft.public.windowsce.platbuilder)
  • BinFs and multi XIP files problem.
    ... whic has a nand controller. ... would like to download nk.bin + apps.bin + chain.bin to the nand. ... The Bin files which i am downloading are chunks of memory with RAM ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Questions about WinCE 6.00 ARM assembler and Linker
    ... When i.MX27 boots from NAND Flash, it reads the first 2kBytes from NAND block 0 and jump to it. ... So the first thing to do in this first to 2ko of code is to copy EBOOT from NAND Flash to RAM and jump to the RAM. ...
    (microsoft.public.windowsce.platbuilder)