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]
Other format: [Raw text]

Re: Running from Redboot


On Fri, 2003-08-15 at 14:30, Unni Nair wrote:
> I only have one mlt file (ram mode) since I was using
> only the ram for both redboot and the ecos
> application. Maybe this is my problem and ecos expects
> to see separate mlt files irrespective of where the
> code and data resides..
> 

Indeed.  RedBoot normally runs from ROM or ROMRAM mode.
There is normally only one RAM configuration - that used
for normal applications.  This is how we can stratify
memory between the two different worlds.

I know that the adder platform that you started from worked
this way - since I wrote all the support for that platform!

> 
> --- Gary Thomas <gary@mlbassoc.com> wrote:
> > On Fri, 2003-08-15 at 14:24, Unni Nair wrote:
> > > When I increased the size of the reserved_for_rom,
> > the
> > > available ram reported by redboot (start address)
> > was
> > > changed to reflect the change. 
> > > 
> > > Unfortunately the problem I am facing is with the
> > ECOS
> > > + application linking process, relocating the code
> > to
> > > be loaded to the end of the reserved_for_rom
> > section
> > > (which is not where the available ram resides).
> > > 
> > 
> > You changed the wrong file - change this value in
> > the MLT
> > files for RAM mode startup.
> > 
> > > Unni
> > > 
> > > > Hello Gary:
> > > > 
> > > > Unfortunately I do not know how to post a
> > followup
> > > to
> > > > your response, hence emailing you directly.
> > > 
> > > In that case, why not just send this to the list
> > (and
> > > maybe
> > > copy it to me)?
> > > 
> > > > 
> > > > The reserved_for_rom section is empty (I
> > actually
> > > > modified the adder board code to suit my needs).
> > > > Apparently redboot is using areas after the
> > > > reserved_for_room section to store additional
> > > > sections. These details are not taken into
> > > > consideration when I recompile for ECOS
> > (default)
> > > and
> > > > the linker is generating code located
> > immediately
> > > > after the reserved_for_rom (empty section). I do
> > not
> > > > know if the reserved_for_rom section is needed? 
> > > 
> > > It is indeed - that's how the .ldi file indicates
> > what
> > > memory is
> > > used by RedBoot and what memory can be used by the
> > > application.
> > > 
> > > Looking at the real 'adder' MLT file:
> > > SECTIONS
> > > {
> > >     SECTIONS_BEGIN
> > >     CYG_LABEL_DEFN(__reserved_vectors) = 0; . =
> > > CYG_LABEL_DEFN(__reserved_vectors) + 0x3000;
> > >     CYG_LABEL_DEFN(__reserved_vsr_table) = ALIGN
> > > (0x10); . = CYG_LABEL_DEFN(__reserved_vsr_table) +
> > > 0x200;
> > >     CYG_LABEL_DEFN(__reserved_virtual_table) =
> > ALIGN
> > > (0x10); . =
> > CYG_LABEL_DEFN(__reserved_virtual_table) +
> > > 0x100;
> > >     CYG_LABEL_DEFN(__reserved_for_rom) = ALIGN
> > (0x10);
> > > . = CYG_LABEL_DEFN(__reserved_for_rom) + 0x3cd00;
> > >     SECTION_vectors (ram, ALIGN (0x10),
> > LMA_EQ_VMA)
> > >     SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
> > >     SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
> > >     SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_gcc_except_table (ram, ALIGN (0x1),
> > > LMA_EQ_VMA)
> > >     SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
> > >     SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
> > >     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> > >     SECTIONS_END
> > > }
> > > 
> > > If you do the calculations, you'll see that the
> > > "__reserved_for_rom" segment
> > > extends up through 0x80000.  If your RedBoot
> > reports
> > > an address higher than
> > > this, just change the 0x3cd00 above to an
> > appropriate
> > > value.  E.g. 0x4cd00
> > > would start the user applications 
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > > http://sitebuilder.yahoo.com
> > -- 
> > Gary Thomas <gary@mlbassoc.com>
> > MLB Associates
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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