Re: Minimum startup

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.

.



Relevant Pages

  • Re: Microcontroller Project
    ... hint though; the first instruction is a jump. ... a bit strange if you want to use all the features but it's not that tough. ...
    (sci.electronics.design)
  • Re: Launch address of image
    ... The build generates a jump to the starting IP as the very first instruction ... smaillet at EmbeddedFusion dot com ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Steppingstone and bootloader - part II
    ... I bet the jump is still there. ... You just created an nb0 file that didn't ... See your RAMIMAGE parameter, it's starting point ... Probably not what you are expecting, due to the 4K offset. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: start addr of nb0 file
    ... Actually 0x80000000 and 0xA0000000 match the exact same addresses from ... If the MMU is off, then you have to use phisical addresses. ... what would be the start address where I have to jump ... Can I jump to the start of the nb0 file ...
    (microsoft.public.windowsce.platbuilder)
  • Re: start addr of nb0 file
    ... nb0 file is just a raw image. ... what would be the start address where I have to jump after ... read the nb0 file into the RAM. ... GD Shukla ...
    (microsoft.public.windowsce.platbuilder)