This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: help! anyone successfully built a standalone program from RAM?


kiki w wrote:
> 
> Hi,
> 
> I know this has been asked before, but could somebody
> tell me what need to do be doen from going from a RAM
> build to a ROM build? I searched the discussion board
> and seems to do that, I need to :
> 
> 1. Change the option of eCOs configuration tool from
> RAm startup to ROM startup.
> 
> 2. Build the whole install and build tree again.
> 
> 3. Pointed my install directory to the new ROM
> install, and re-made the application program.
> 
> 4. use arm-elf-objcopy -0 binary app_name app_name.bin
> 
> 5. Then I use the code I wrote to move the ROM version
> into the flash memory and reset the board.
> 
> My question is:
> 
> 1. Except the above steps, is there any other
> modification I need to make?

That's all correct for a board where ROM startup is known to already work.
 
> 2. Where exactly  should I put the ROM version into
> the flash memory?assuming at when the board is reset,
> microcontroller will run the instruction saved in
> 0x01000000( the start address of flash memory).

That depends on the board, and if it has anything else in the flash. But
the answer is probably yes - it's your board so you should know ;-).
 
> 3. since the board I am using is a custom board, I
> know I need to change the cyg\hal\hal_platform_setup_h
> file to match the new board, i also noticed seems a
> file named MLT also need to be changed, what is that?

The memory layout. That's where you tell eCos what address the ROM is at.
You can either use the graphical configuration tool on Windows, or you can
edit the mlt*.ldi and mlt*.h files by hand.
 
> BTW, for my application code, it runs prefectly
> without the redboot running on the board,i did not use
> lots of eCos functions, basically, I only use the
> operating system to support multi-threads.

That's a perfectly valid thing to do! In fact unless you want field upgrade
capability, it's very much the intention for eCos programs to be standalone
like that.
 
> Thanks so much. Any reply and recommendation will be
> highly appreciated!

You're welcome!

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]