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: How to build an application that boots from flash?


>>>>> "Daniel" == Daniel Lind <daniel.lind@sth.frontec.se> writes:

Daniel> Hello I use MBX board with PowerPC MPC860. I want to build an
Daniel> executeable image of my application that boots from flash/rom
Daniel> memory, ie the development of program code is finished and I
Daniel> want the program to work without ROM monitor or GDB .Where to
Daniel> start and look for information about this subject?

It should just be a question of selecting ROM startup as you have
done.

Daniel> I have no idea of what to do but I have done the following:
Daniel> First I have tried to prepare the download method. In eCos
Daniel> configuration tool I set the download method to ROM
Daniel> start-up. I would also like to boot from the 32 bit flash
Daniel> device so I set this alternative to. After this I build eCos
Daniel> and my application. Now I have an exe-file of my application
Daniel> which I convert to an s-record file with objcopy.

Daniel> powerpc-eabi-objcopy -O srec --change-address=0x02040000
Daniel> hello.exe hello.srec

Daniel> After this I use EPPCbug, ie I boot the MBX board with EPPCBug
Daniel> and do the following

Hopefully you load the srec file before using the pflash command :)

EPPC-Bug> pflash 40000 60000 fc000000

Looks right.

What does the objdump -h output of the binary look like? And does the
-D output (disassembly) look OK - i.e., are the instructions using the
correct addressing, located properly relative to the start of ROM,
etc.

Jesper

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