Re: Minimum startup



Questions aren't confusing, they are due to the nonintuitive way MS has
chosen to implement their tools. A couple of key points that may get you
pointed in the right direction:

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. 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.

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.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Sergeant" <sergey.pochechuev@xxxxxxxxx> wrote in message
news:1132661698.390505.299810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello all!
Excuse for my bad English...
I use Windows CE 4.2. I have some device based on S3C2410A (ARM920
core). On the device there are two types of memory: NAND flash (64M,
begins at 0x8000000) and SDRAM (64M, begins at 0x30000000). The
bootloader placed in NAND flash. At system startup first 4K of NAND
copied into internal RAM (called as SteppingStone) at address 0x0 and
begins his executions.
My goal is to write minimum simple code... let's name his "test". For
example (startup.s):
EXPORT VectorStart
AREA |.astart|,ALIGN=2,CODE
CODE32
VectorStart
ldr PC,=0 ; means nothing, just example
b . ;Here..
b . ; is..
b . ; ARM..
b . ; Vector..
b . ; table.
b . ;
subs PC,LR,#4 ;means nothing
END
Thats all! No kernel. No OEM. No MS libraries....nothing, just one file
and some bytes of a code.
As far as I have understood, I should get file *.nb0 in the size
approximately 32 bytes, beginning with instruction "ldr PC,=0" (at
offset 0x00) and is ending with "subs PC,LR,#4".
Who can explain me, how i should write BIB-file? What values I should
appropriate to RAMIMAGE and RAM areas, ROMSIZE, ROMSTART and ROMOFFSET?
Please help me to understood sence of these values... Where is my RAM
and where is my ROM? :) How can I use ROMSTART and ROMSIZE? Microsoft
documentation only has confused me... All my attempts finished with
creation of a nb0-file in the size 64?. And instruction "ldr PC,=0"
ALWAYS(!!) placed at offset 0x1000, not in 0x00!!!
Please help me to solve this simple task.. Also I am sorry for stupid
questions :)

Regards
Sergey.


.



Relevant Pages

  • Minimum startup
    ... On the device there are two types of memory: NAND flash (64M, ... appropriate to RAMIMAGE and RAM areas, ROMSIZE, ROMSTART and ROMOFFSET? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Why doesnt all the memory show up in Task Mgr.
    ... You think that the task manager showing 4gig when that is what is actually sitting in the ram slots is more confusing to a person who just wants to use the machine and not learn the machine than the same person knowing they have 4gigs in the machine and the task manager saying 3gigs? ... In my experience with a real lot of users from barely able to find the power switch to those who are reasonably competent, they ALL expect to see the computer telling them that the amount of ram they think is there in fact IS there. ...
    (microsoft.public.windows.vista.general)
  • Re: Unusual Christmas presents
    ... Or am I confusing it with a different modernfangled unforgetterygadgetry? ... "The endurance of NAND flash is much greater than that of NOR flash ...
    (uk.rec.sheds)
  • Re: kb/s vs. kbit/s
    ... standard with a confusing meaning: ... storage devices, whether or not they are actually random access, as RAM. ...
    (comp.os.msdos.4dos)
  • Re: Mobo PS fault problem
    ... RAM ... sympathize with the OP's frustration if RAM swaps are giving him a ... confusing result if there are bad caps... ... I'm not ready to post the confusing mixture of reports right now, ...
    (alt.comp.hardware.pc-homebuilt)