Re: Minimum startup
- From: "Sergeant" <sergey.pochechuev@xxxxxxxxx>
- Date: 22 Nov 2005 08:12:10 -0800
Thanks for your answer!
> 1) MS tools ALWAYS put a 4K block of code at the beginning of the image.
> The first instruction is a jump of 4K to the real code, as you've
> discovered. They use that 4K region to put their own information. Nothing
> you can do about it, at least nothing that works well.
Hmmm... Then I don't understand something... For example, let's
consider ARM-architecture. At address 0x0 the vectors table is located.
At address 0x0 reset vector is located, at address 0x04 - Undefined
instruction vector, at 0x08 - software interrupt vector and so on. So,
how ARM cores can function with MS nb-images, if at address 0x0...0x1c
MS-specific code is located? Then there is no vector table! OK, if
reset exception has occured, then ARM jump to addr 0x00 and jump to
real code (because this jump was writted at addr 0x00 by MS). But... if
software interrupt has occured....ARM jump to 0x08. And there is no
correct jump at this address! I don't understand how it works with 4K
block of code at the beginning of the image....
You are limited to a
> total of 4K, so your options to get around this are to use different tools
> for your initial loader, or to be careful to use only relative addressing
> and extract your 4K of code out of the image and use it. I go for option 2.
You mean that I extract my code for example, with some hex-editor?..
>
> 2) The size of the nb0 file depends on your ROMSIZE/ROMOFFSET/ROMWIDTH
> parameters, not on how much code you actually have. It is intended to
> create an image that matches the ROM, and the code is expected to fit
> inside. Set ROMSTART to the same value as your RAMIMAGE area, ROMWIDTH to
> 32, and ROMSIZE to however big you want your nb0 file to be (at least 8K)
> and ROMOFFSET to 0.
Thanks! But I don't understand something. RAM area correspond to my
SDRAM? I have created boot.bib with the following contents:
MEMORY
EBOOT 8000000 0002000 RAMIMAGE
SDRAM 30000000 4000000 RAM
CONFIG
COMPRESSION=OFF
PROFILE=OFF
KERNELFIXUPS=OFF
SRE=OFF
ROMSTART=8000000
ROMSIZE=2000
ROMWIDTH=32
ROMOFFSET=0
MODULES
nk.exe $(_TARGETPLATROOT)\target\$(_TGTCPU)\$(WINCEDEBUG)\boot.exe
EBOOT
And I have got 8K file. RAM area in bib-file is correct?
Regards
Sergey.
.
- Follow-Ups:
- Re: Minimum startup
- From: Dean Ramsier
- Re: Minimum startup
- References:
- Minimum startup
- From: Sergeant
- Re: Minimum startup
- From: Dean Ramsier
- Minimum startup
- Prev by Date: Re: Getting the tick count from an ISR
- Next by Date: Re: Minimum startup
- Previous by thread: Re: Minimum startup
- Next by thread: Re: Minimum startup
- Index(es):
Relevant Pages
|