I'm writing a serial boot loader for ARM920T with OMAP1510.
I have written a basic bootloader which has a .s file which does the
hardware initializations. (I have disabled the MMU and Chaches) and
jumps to a main() in a .c file. which calls the BootloaderMain(). I have
implemented only the OEMPlatformInit() which initializes the io such as
UART, flash and EdbgOutputDebugString() is called with a print.
The restof the OEMxxx files are just the stubs for the time being.

My boot.bib file looks like this :-

MEMORY
; Name Start Size Type
; ------- -------- -------- ----
RAM 10000100 00e00000 RAM
;Set aside 128 KB for loader; finalize later.
SBOOT 10e00100 00020000 RAMIMAGE


CONFIG
COMPRESSION=OFF
PROFILE=OFF
KERNELFIXUPS=ON
; SBOOT + ROMOFSET = 0x0
ROMOFFSET=EF1FFF00
SRE=ON
ROMSTART=10e00100
ROMWIDTH=32
ROMSIZE=20000

MODULES
; Name
Path Memory
Type
; --------------
----------------------------------------------
-----------
nk.exe
$(_TARGETPLATROOT)\target\$(_TGTCPU)\$(WINCEDEBUG)\sboot.exe SBOOT

-----------------------------------------------------------------------------------------------------------------------

When i call the build -c, the .bin file is not produced. Its created but
with 0KB.
The build.log gives and exception as this :-

-------------------------------------------Start -------------------
BUILD: Computing Include file dependencies:
BUILD: Examining e:\wince420\platform\eshaarm920t\sboot directory for
files to compile.
Linking e:\wince420\platform\eshaarm920t\sboot directory
********************
'NMAKE.EXE -i -c BUILDMSG=Stop. LINKONLY=1 NOPASS0=1 NTTEST= UMTEST='
makefile.def: BUILDROOT is E:\WINCE420\PLATFORM\EshaArm920T
makefile.def: including E:\WINCE420\PLATFORM\EshaArm920T\sources.cmn
romimage boot.bib

Windows CE ROM Image Builder v4.0.120 Copyright (c) Microsoft
Corporation
Built: Mar 14 2003 09:05:35

Copying E:\wince420\platform\EshaArm920T\target\ARMV4I\retail\sboot.exe
to E:\wince420\platform\EshaArm920T\target\ARMV4I\retail\nk.exe for
debugger
Found pTOC at 00001690
No imports for nk.exe
Processing SBOOT

MODULES Section
Module Section Start Length psize vsize Filler

---------------------- -------- --------- ------- ------- ------- ------

nk.exe .text 10e02000 12288 10752 10668
o32_rva=00001000
nk.exe .pdata 10e05000 4096 512 304
o32_rva=00005000
nk.exe .data 10e049ac 0 0 332
FILLER->10000100
nk.exe E32 10e049ac 108 FILLER
nk.exe O32 10e04a18 72 FILLER

MODULES Section
Module Section Start Length psize vsize Filler

---------------------- -------- --------- ------- ------- ------- ------

nk.exe FileName 10e04a60 7 FILLER

Unfilled ROM holes (address, length):
10e05130 3792 10e04a68 1432
total space 5224 in 2 ranges

Writing E:\wince420\platform\EshaArm920T\target\ARMV4I\retail\SBOOT.bin
Error: Could not find rva 00001690 in nk.exe
o32[0].o32_rva = 00001f00 (len = 00002a00)
o32[1].o32_rva = 00004000 (len = 00000000)
o32[2].o32_rva = 00004f00 (len = 00000200)
Assertion failed: !"rva2ptr() error", file
g:\mckendric\private\winceos\coreos\nk\tools\romimage\romimage\.\module.cpp,
line 155

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
Stop.
BUILD: Done

---------------------------------------------------END---------------------

What is this Assertion ??? and what should i do to get a .bin and .nb0
files ?
I have created the source and the makefile.inc as required to generate a
boot image. (based on the sample eboot of samsung board - SMDK2410 )

Regards
Esha

Re: HELP: Not able to generate a .bin/.nb0 files, gives assertions.. by yyu_77096

yyu_77096
Tue May 04 21:33:23 CDT 2004

Do a 'rva2ptr' search on google. I get this link:

http://www.google.com/groups?q=rva2ptr&hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&scoring=r&selm=OQFP2PLPDHA.3236%40TK2MSFTNGP10.phx.gbl&rnum=3

Hope it helps.

Re: HELP: Not able to generate a .bin/.nb0 files, gives assertions.. by Eshanye

Eshanye
Wed May 05 02:29:34 CDT 2004


--------------F19DAECB37CF9ADB41584BB3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Thanx for the link.
The link says that he wanted his RAMIMAGE to be starting at address 0x00000000. But since Wince 3.0 was not supporting he has put a patch
of jumping from address 10. But in my case my start address of the RAMIMAGE is 0x10e00100. (The flash start address is actually
0x00000000 where my booloader sits). If i make the RAMIMAGE address as 0x00000000 then i'm getting the nb0 as well as the bin image, but
then that is not the address where my image should sit ! What do i do now ?

There is a sample code of EBOOT of samsung board (provided by Microsoft with the WinCE 4.0 .NET CD) which uses the ARM920T itself and to
my surprise the eboot RAMIMAGE also sits at a different address that 0x00000000 (its starts at 8c038000). They have a line in the
'source' file which says EXEBASE=0x80000000.

Now if i compile this EBOOT then EBOOT.bin as well as .nb0 is getting created properly. How is this possible ? Have they done something
in the internal (private directory) files of WinCE ? What is the internal stuff which is happening here ? what should i do now ?

Regards
Esha


yuya wrote:

> Do a 'rva2ptr' search on google. I get this link:
>
> http://www.google.com/groups?q=rva2ptr&hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&scoring=r&selm=OQFP2PLPDHA.3236%40TK2MSFTNGP10.phx.gbl&rnum=3
>
> Hope it helps.

--------------F19DAECB37CF9ADB41584BB3
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Thanx for the link.
<br>The link says that he wanted his RAMIMAGE to be starting at address
0x00000000. But since Wince 3.0 was not supporting he has put a patch of
jumping from address 10. But in my case my start address of the RAMIMAGE
is 0x10e00100. (The flash start address is actually 0x00000000 where my
booloader sits).&nbsp; If i make the RAMIMAGE address as 0x00000000 then
i'm getting the nb0 as well as the bin image, but then that is not the
address where my image should sit ! What do i do now ?
<p>There is a sample code of EBOOT of samsung board (provided by&nbsp;
Microsoft with the WinCE 4.0 .NET CD) which uses the ARM920T itself and
to my surprise the eboot RAMIMAGE also sits at a different address that
0x00000000 (its starts at 8c038000). They have a line in the 'source' file
which says EXEBASE=0x80000000.
<p>Now if i compile this EBOOT then EBOOT.bin as well as .nb0 is getting
created properly. How is this possible ? Have they done something in the
internal (private directory) files of WinCE ? What is the internal stuff
which is happening here ? what should i do now ?
<p>Regards
<br>Esha
<br>&nbsp;
<p>yuya wrote:
<blockquote TYPE=CITE>Do a 'rva2ptr' search on google. I get this link:
<p><a href="http://www.google.com/groups?q=rva2ptr&hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&scoring=r&selm=OQFP2PLPDHA.3236%40TK2MSFTNGP10.phx.gbl&rnum=3">http://www.google.com/groups?q=rva2ptr&amp;hl=en&amp;lr=&amp;ie=UTF-8&amp;oe=ISO-8859-1&amp;scoring=r&amp;selm=OQFP2PLPDHA.3236%40TK2MSFTNGP10.phx.gbl&amp;rnum=3</a>
<p>Hope it helps.</blockquote>
</html>

--------------F19DAECB37CF9ADB41584BB3--


Re: HELP: Not able to generate a .bin/.nb0 files, gives assertions.. by yyu_77096

yyu_77096
Wed May 05 12:01:20 CDT 2004

Your RAMIMAGE doesn't start at a 4K (page size) boundary might hurt.
But if you sboot run from RAM, you should be able to modify your code
to start at 4k boundary. If you sboot run from flash, why not just 0
as its start address, as that's your flash real physical address.

Re: HELP: Not able to generate a .bin/.nb0 files, gives assertions.. by Eshanye

Eshanye
Thu May 06 06:42:15 CDT 2004

Thanks, Making it 4K boundary works !
(And this has been mentioned in the help.. its just that i should have
read in between the lines !)

-Esha

yuya wrote:

> Your RAMIMAGE doesn't start at a 4K (page size) boundary might hurt.
> But if you sboot run from RAM, you should be able to modify your code
> to start at 4k boundary. If you sboot run from flash, why not just 0
> as its start address, as that's your flash real physical address.