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: FW: mbx ecos stub


"Natarajan, Mekala (CTS)" wrote:
> 
> > Hi,
> > I am trying to get ecos gdb stub running on my MBX board.
> > I have built the monitor images.
> > However, the srec image starts at address 0xfe000000.

It should not. The --change-address in the objcopy ensures that. I created
an SREC file that certainly had the correct addresses using the default
build procedure:

S02B00002F6578706F72742F706F742F6563632D6F626A2F7070632F6D62782D73747562732F696E7374616CBF
S2140400007C7143A67C9243A67CB343A67C800026E0
S21404001038A0000054A5D1BE3C60000060633000E8
S2140400207C63282E7CA802A67C6803A638600000A1
S2140400304E800020000000000000000000000000C9
[snip]

> > I could not download this image using eppc-bug since eppc-bug is starting
> > from this location.
> > So, I want to program in flash instead of socketed one at location
> > 0xfc000000.

I'm not an MBX expert, but I believe you still use the gdb_module.srec file
generated by eCos and follow the instructions at
http://sources.redhat.com/ecos/docs-latest/tutorials/ppc/ecos-tutorial.d.html#pgfId=2558094

> > powerpc-eabi-objcopy -O srec --change-address=????? gdb_module.img
> > gdb_module.srec.
> > what is the significance of --change-address option. i want to program at
> > location 0xfc000000.
> > If i give the change address as 0xfc000000
> > the s record is created with address 0xfa000000

The parameter to --change-address is an increment, not an absolute value.
So although the image was linked at 0xfe000000, adding 0x02040000 will mean
that it actually has an address of 0x40000 which is in RAM. This is why you
program the flash with:

EPPC-Bug>pflash 40000 60000 fc000000 

since the SREC image was downloaded to 0x40000. This command therefore
saves the RAM from 0x40000 to 0x60000 at address 0xfc000000 in FLASH.

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]