Re: Minimum startup
- From: "Dean Ramsier" <ramsiernospam@xxxxxxxxxx>
- Date: Tue, 22 Nov 2005 09:38:04 -0500
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.
.
- Follow-Ups:
- Re: Minimum startup
- From: Sergeant
- Re: Minimum startup
- References:
- Minimum startup
- From: Sergeant
- Minimum startup
- Prev by Date: Re: decrease turnaround time debugging KITL probs
- Next by Date: Re: passing arguments from bootloader to kernel
- Previous by thread: Minimum startup
- Next by thread: Re: Minimum startup
- Index(es):
Relevant Pages
|