[ECOS] problem building application
Gary D. Thomas
gary.thomas@mind.be
Wed May 21 14:48:00 GMT 2003
On Tue, 2003-05-20 at 09:41, Aaron Richardson wrote:
> For some reason the configuration is now using the correct memory files to
> generate the target.ld file. This file looks good. However, I believe I am
> still doing something wrong.
>
> I dont think I should get a compiled file size of 1.2M with a hello world
> program. Should I?
>
If this is just from "ls -l", then yes, this is quite reasonable. The
reason is that the file contains *lots* of debug information. None of
this is actually loaded into memory when it runs. To determine the
actual memory requirements, use "size". For example:
[gthomas@hermes tests]$ ls -l nc_test_slave
-rwxr-xr-x 1 gthomas wheel 2214753 Mar 24 17:05 nc_test_slave
[gthomas@hermes tests]$ powerpc-eabi-size nc_test_slave
text data bss dec hex filename
274800 23056 497824 795680 c2420 nc_test_slave
This shows one of the network test programs. The raw size (the file
which includes debug info, etc) is over 2.2MB. However, the program
will only consume some 300KB of actual downloaded code+data.
> I dont think it should be compiled with the jump vectors, redboot already
> occupies this space.
>
> This is what I get when I try to download the srec to redboot:
>
>
> RedBoot(tm) bootstrap and debug environment [ROMRAM]
> Non-certified release, version UNKNOWN - built 16:12:54, May 19 2003
>
>
> RAM: 0x00000000-0x10000000, 0x00200000-0x0ffdd000 available
> FLASH: 0xc4000000 - 0xc5000000, 128 blocks of 0x00020000 bytes each.
> RedBoot> load -v -m y
> *** Abort! Attempt to load S-record to address: 0x00020000, which is not in
> RAM
> xyzModem - CRC mode, 3(SOH)/0(STX)/0(CAN) packets, 2 retries
>
I know that you've already worked around this, but my real question is
why is the ROMRAM version of RedBoot consuming 2MB? On most platforms,
this is more like 512KB.
>
>
> thanks,
> Aaron
>
>
> On Tuesday 20 May 2003 01:52 am, Eric de Jong wrote:
> > >> address 0xc4000040 of a.out section .rom_vectors is not within region
> > >> ram
> >
> > Well, address 0xc4000040 is indeed not within your RAM region. Check the
> > target.ld file which is generated by the config tool, and see what is wrong
> > there. The ram.ldi and ram.h files are nothing more than templates to
> > generate the target.ldi file. Edit the target.ld file to fiddle around,
> > e.g. to put .rom_vectors back in ram put the line
> > .=0x20
> > before the line with .rom_vectors. (.vectors / .fixed_vectors?)
> > you can find more information about linker scripts with "info ld"
> >
> > Eric de Jong
> >
> >
> >
> > ----- Original Message -----
> > From: "Aaron Richardson"
> > Sent: Monday, May 19, 2003 10:35 PM
> > Subject: [ECOS] problem building application
> >
> >
> > So I got redboot mostly working on the ixp2400. But now I am running into
> > a problem trying to build the hello world application. I get errors like
> > this from the linker (for all the sections):
> >
> > address 0xc4000040 of a.out section .rom_vectors is not within region ram
> >
> > I had to create the ram.ldi and ram.h files. All I had was the romram
> > files to work from.
> >
> > Any idea on why I would get this? I have attached the mlt files...
>
> --
>
>
> Aaron Richardson
> aarichar@cisco.com
> 512-378-1286
--
Gary D. Thomas <gary.thomas@mind.be>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list