public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] ROMRAM stand-alone application
@ 2004-04-09  9:11 Alan Bowman
  2004-04-11 11:37 ` Andrew Lunn
  0 siblings, 1 reply; 16+ messages in thread
From: Alan Bowman @ 2004-04-09  9:11 UTC (permalink / raw)
  To: ecos-discuss


> > We have two options. Fix the bitrot so that ROMRAM RedBoot works
> > again, or change the ROMRAM so that it works for standalone
> > applications.
> >
> > Nick says that ROMRAM redboot makes little sense, so i would suggest
> > the second option. Is everybody happy with that?
> 
> Sure - it at least sounds like it's not a step backwards.
> 

I believe that the following should do what we've talked about, i.e. enable ROMRAM applications to work, and accept that Redboot in ROMRAM mode will not work properly.  Do people think that this is suitable?

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/ChangeLog,v
retrieving revision 1.5
diff -r1.5 ChangeLog
0a1,4
> 2004-04-08  Alan Bowman <abowman@synaptics-uk.com>
> 	* include/pkgconf/mlt_arm_at91_eb55_romram.ldi: Alter rom_vectors
> 	section to match the startup code for ROMRAM applications
> 
Index: include/pkgconf/mlt_arm_at91_eb55_romram.ldi
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/include/pkgconf/mlt_arm_at91_eb55_romram.ldi,v
retrieving revision 1.1
diff -r1.1 mlt_arm_at91_eb55_romram.ldi
17c17
<     SECTION_rom_vectors (ram, 0x02008000, LMA_EQ_VMA)
---
>     SECTION_rom_vectors (ram, 0x02000000, LMA_EQ_VMA)

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-09  9:11 [ECOS] ROMRAM stand-alone application Alan Bowman
@ 2004-04-11 11:37 ` Andrew Lunn
  0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2004-04-11 11:37 UTC (permalink / raw)
  To: Alan Bowman; +Cc: ecos-discuss

On Thu, Apr 08, 2004 at 02:46:13PM +0100, Alan Bowman wrote:
> 
> > > We have two options. Fix the bitrot so that ROMRAM RedBoot works
> > > again, or change the ROMRAM so that it works for standalone
> > > applications.
> > >
> > > Nick says that ROMRAM redboot makes little sense, so i would suggest
> > > the second option. Is everybody happy with that?
> > 
> > Sure - it at least sounds like it's not a step backwards.
> > 
> 
> I believe that the following should do what we've talked about,
> i.e. enable ROMRAM applications to work, and accept that Redboot in
> ROMRAM mode will not work properly.  Do people think that this is
> suitable?

I've committed this and also removed the redboot ROMRAM import file.

     Andrew

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08  8:27 Alan Bowman
  2004-04-08  8:52 ` Andrew Lunn
@ 2004-04-22 15:56 ` Marco Aurélio da Cruz
  1 sibling, 0 replies; 16+ messages in thread
From: Marco Aurélio da Cruz @ 2004-04-22 15:56 UTC (permalink / raw)
  To: ecos-discuss

Thank you Mr. Bowman and everyone who gave suggestions.

Finnaly I got an EPROM with the modification in the romram.ldi file.

I needed to do some little modifications in my hal_platform_setup.h to 
meet my board specifications. I cut out the code in LED macro and made 
some PIO initializations.

My board has 256Kx16 of fast SRAM for code and data and 256Kx16 of slow 
battery backuped SRAM. Also I am using part of AT91M55800 internal SRAM 
to save a PDC SPI transmit buffer. My target.ld file has these regions 
defined as .iram, .ram and .nvram. I put it bellow.

But I needed to use a little manoeuvre to make the EPROM possible.

After I generate my .elf file I am using objcopy to generate a .bin and 
a .hex file. It happens that the .hex did not work and the .bin file was 
huge. So, I edited the .bin file and cut out all bytes until the 
beginning of the code, that I supposed should be at 0x0200:0000 but it 
was at 0x1FF:FC00... strange...

Afterwards I saved the new .bin file and recorded my EPROM and voilá, it 
worked!!

Regards,

Marco Aurélio da Cruz


    STARTUP(vectors.o)
    ENTRY(reset_vector)
    INPUT(extras.o)

    GROUP(libtarget.a libgcc.a libsupc++.a)
    MEMORY
    {
        sram : ORIGIN = 0x00000000, LENGTH = 0x400
        sram2 : ORIGIN = 0x00000400, LENGTH = 0x1C00
        ram : ORIGIN = 0x02000000, LENGTH = 0x80000
        ram2 : ORIGIN = 0x03000000, LENGTH = 0x80000
    }

    SECTIONS
    {
        .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : {
    *(.debug_pubnames) } .debug_info 0 : { *(.debug_info) }
    .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : {
    *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 :
    { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0
    : { *(.debug_macinfo) } .note.arm.ident 0 : { KEEP
    (*(.note.arm.ident)) }
        .fixed_vectors 0x20 : { . = .; KEEP (*(.fixed_vectors)) } > sram
        .iram : { __iram_start = ABSOLUTE (.); *(.iram) __iram_end =
    ABSOLUTE (.); } > sram2
        .rom_vectors 0x02000000 : { __rom_vectors_vma = ABSOLUTE(.); . =
    .; KEEP (*(.vectors)) } > ram __rom_vectors_lma =
    LOADADDR(.rom_vectors);
        .text ALIGN (0x4) : { _stext = ABSOLUTE(.); PROVIDE (__stext =
    ABSOLUTE(.)); *(.text*) *(.gnu.warning) *(.gnu.linkonce.t.*)
    *(.init) *(.glue_7) *(.glue_7t) } > ram _etext = .; PROVIDE (__etext
    = .);
        .fini ALIGN (0x4) : { . = .; *(.fini) } > ram
        .rodata ALIGN (0x4) : { . = .; *(.rodata*) *(.gnu.linkonce.r.*)
    } > ram
        .rodata1 ALIGN (0x4) : { . = .; *(.rodata1) } > ram
        .fixup ALIGN (0x4) : { . = .; *(.fixup) } > ram
        .gcc_except_table ALIGN (0x4) : { . = .; *(.gcc_except_table) }
     > ram
        .data ALIGN (0x4) : { __ram_data_start = ABSOLUTE (.); *(.data*)
    *(.data1) *(.gnu.linkonce.d.*) . = ALIGN (4); KEEP(*( SORT
    (.ecos.table.*))) ; . = ALIGN (4); __CTOR_LIST__ = ABSOLUTE (.);
    KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); __DTOR_LIST__
    = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE
    (.); *(.dynamic) *(.sdata*) *(.gnu.linkonce.s.*) . = ALIGN (4);
    *(.2ram.*) } > ram __rom_data_start = LOADADDR (.data);
    __ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .;
    PROVIDE (edata = .); PROVIDE (__rom_data_end = LOADADDR (.data) +
    SIZEOF(.data));
        .bss ALIGN (0x4) : { __bss_start = ABSOLUTE (.); *(.scommon)
    *(.dynsbss) *(.sbss*) *(.gnu.linkonce.sb.*) *(.dynbss) *(.bss*)
    *(.gnu.linkonce.b.*) *(COMMON) __bss_end = ABSOLUTE (.); } > ram
        __heap1 = ALIGN (0x8);
        . = ALIGN(4); _end = .; PROVIDE (end = .);
        .nvram (NOLOAD) : { __nvram_start = ABSOLUTE (.); *(.nvram)
    __nvram_end = ABSOLUTE (.); } > ram2
    }


Alan Bowman wrote:

>I found a discrepancy in the EB55 ROMRAM code, between the section that masks addresses before copying ROM to RAM, and the memory map that the linker uses to determine where to put code.  I used the following patch to adjust the memory map:
>
>Index: mlt_arm_at91_eb55_romram.ldi
>===================================================================
>RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/include/pkgconf/mlt_arm_at91_eb55_romram.ldi,v
>retrieving revision 1.1
>diff -u -r1.1 mlt_arm_at91_eb55_romram.ldi
>--- mlt_arm_at91_eb55_romram.ldi	13 May 2003 18:27:59 -0000	1.1
>+++ mlt_arm_at91_eb55_romram.ldi	17 Dec 2003 14:43:48 -0000
>@@ -14,7 +14,7 @@
> {
>     SECTIONS_BEGIN
>     SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
>-    SECTION_rom_vectors (ram, 0x02008000, LMA_EQ_VMA)
>+    SECTION_rom_vectors (ram, 0x02000000, LMA_EQ_VMA)
>     SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
>
>
>This alters the location that ROMRAM code is linked at (I think) and matches the startup code for the ROMRAM version of the EB55.  Only problem - if you try to use a ROMRAM version of Redboot to load a RAM version of your application, the same bit of memory is used for both and they clash.  However, this change worked perfectly well for us to develop ROMRAM applications for our EB55.
>
>Hope this helps
>
>Alan Bowman
>
>  
>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [ECOS] ROMRAM stand-alone application
@ 2004-04-08 13:40 Alan Bowman
  0 siblings, 0 replies; 16+ messages in thread
From: Alan Bowman @ 2004-04-08 13:40 UTC (permalink / raw)
  To: ecos-discuss


> We have two options. Fix the bitrot so that ROMRAM RedBoot works
> again, or change the ROMRAM so that it works for standalone
> applications.
> 
> Nick says that ROMRAM redboot makes little sense, so i would suggest
> the second option. Is everybody happy with that?
> 
>     Andrew
> 

The second option makes most sense to me (and is what I have been working with) - the change I proposed earlier in the thread should do just that.

Alan

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08 12:25   ` Andrew Lunn
  2004-04-08 12:07     ` Nick Garnett
@ 2004-04-08 12:31     ` Gary Thomas
  1 sibling, 0 replies; 16+ messages in thread
From: Gary Thomas @ 2004-04-08 12:31 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Nick Garnett, Alan Bowman, 'Andrew Lunn',
	Gary Thomas, ecos-discuss


Andrew Lunn said:
>> > I don't think it's ever worked for me (before the changes that I'm
>> > hopefully about to post).  I'm trying to access the CVS server, and
>> > I can't seem to get a response.  Is it working at the moment?
>>
>> The ROMRAM RedBoot fell by the wayside. With so little RAM available
>> on these boards it was felt that it was a waste of resource. Hence the
>> ROMRAM .ldi files have suffered a little bitrot.
>
> We have two options. Fix the bitrot so that ROMRAM RedBoot works
> again, or change the ROMRAM so that it works for standalone
> applications.
>
> Nick says that ROMRAM redboot makes little sense, so i would suggest
> the second option. Is everybody happy with that?

Sure - it at least sounds like it's not a step backwards.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08 12:07 ` Nick Garnett
@ 2004-04-08 12:25   ` Andrew Lunn
  2004-04-08 12:07     ` Nick Garnett
  2004-04-08 12:31     ` Gary Thomas
  0 siblings, 2 replies; 16+ messages in thread
From: Andrew Lunn @ 2004-04-08 12:25 UTC (permalink / raw)
  To: Nick Garnett
  Cc: Alan Bowman, 'Andrew Lunn', Gary Thomas, ecos-discuss

> > I don't think it's ever worked for me (before the changes that I'm
> > hopefully about to post).  I'm trying to access the CVS server, and
> > I can't seem to get a response.  Is it working at the moment?
> 
> The ROMRAM RedBoot fell by the wayside. With so little RAM available
> on these boards it was felt that it was a waste of resource. Hence the
> ROMRAM .ldi files have suffered a little bitrot.

We have two options. Fix the bitrot so that ROMRAM RedBoot works
again, or change the ROMRAM so that it works for standalone
applications.

Nick says that ROMRAM redboot makes little sense, so i would suggest
the second option. Is everybody happy with that?

    Andrew

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08 12:25   ` Andrew Lunn
@ 2004-04-08 12:07     ` Nick Garnett
  2004-04-08 12:31     ` Gary Thomas
  1 sibling, 0 replies; 16+ messages in thread
From: Nick Garnett @ 2004-04-08 12:07 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Alan Bowman, Gary Thomas, ecos-discuss

Andrew Lunn <andrew@lunn.ch> writes:

> > > I don't think it's ever worked for me (before the changes that I'm
> > > hopefully about to post).  I'm trying to access the CVS server, and
> > > I can't seem to get a response.  Is it working at the moment?
> > 
> > The ROMRAM RedBoot fell by the wayside. With so little RAM available
> > on these boards it was felt that it was a waste of resource. Hence the
> > ROMRAM .ldi files have suffered a little bitrot.
> 
> We have two options. Fix the bitrot so that ROMRAM RedBoot works
> again, or change the ROMRAM so that it works for standalone
> applications.
> 
> Nick says that ROMRAM redboot makes little sense, so i would suggest
> the second option. Is everybody happy with that?

I would vote for making it work for standalone apps only. To make
ROMRAM Redboot work would mean moving the load point for RAM apps up
in memory for both RAM and ROMRAM RedBoots. This would waste RAM in
the ROM RedBoot case, and would give RAM apps less room in both cases.

Of course if we were clever, we could put in some CDL to make it
impossible to configure ROMRAM RedBoots.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08  9:09 Alan Bowman
  2004-04-08 11:48 ` Gary Thomas
@ 2004-04-08 12:07 ` Nick Garnett
  2004-04-08 12:25   ` Andrew Lunn
  1 sibling, 1 reply; 16+ messages in thread
From: Nick Garnett @ 2004-04-08 12:07 UTC (permalink / raw)
  To: Alan Bowman; +Cc: 'Andrew Lunn', Gary Thomas, ecos-discuss

Alan Bowman <ABowman@synaptics-uk.com> writes:

> > -----Original Message-----
> > From: Andrew Lunn [mailto:andrew@lunn.ch]
> > Sent: 08 April 2004 09:53
> > To: Gary Thomas
> > Cc: Andrew Lunn; Alan Bowman; ecos-discuss@sources.redhat.com
> > Subject: Re: [ECOS] ROMRAM stand-alone application
> > 
> > 
> > > Also make sure that this change doesn't break the exiting 
> > ROMRAM RedBoot
> > > on the board :-)
> > 
> > Does the ROMRAM redboot actually work? To me it looks like it would
> > not.
> > 
> >         Andrew
> > 
> > 
> 
> I don't think it's ever worked for me (before the changes that I'm
> hopefully about to post).  I'm trying to access the CVS server, and
> I can't seem to get a response.  Is it working at the moment?

The ROMRAM RedBoot fell by the wayside. With so little RAM available
on these boards it was felt that it was a waste of resource. Hence the
ROMRAM .ldi files have suffered a little bitrot.

The sources.redhat.com server is currently experiencing some disk
problems and CVS access has been turned off. We will probably have to
wait until a RedHat person can take a look at it in the morning, US
time.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [ECOS] ROMRAM stand-alone application
  2004-04-08  9:09 Alan Bowman
@ 2004-04-08 11:48 ` Gary Thomas
  2004-04-08 12:07 ` Nick Garnett
  1 sibling, 0 replies; 16+ messages in thread
From: Gary Thomas @ 2004-04-08 11:48 UTC (permalink / raw)
  To: Alan Bowman; +Cc: 'Andrew Lunn', Gary Thomas, ecos-discuss


Alan Bowman said:
>
>
>> -----Original Message-----
>> From: Andrew Lunn [mailto:andrew@lunn.ch]
>> Sent: 08 April 2004 09:53
>> To: Gary Thomas
>> Cc: Andrew Lunn; Alan Bowman; ecos-discuss@sources.redhat.com
>> Subject: Re: [ECOS] ROMRAM stand-alone application
>>
>>
>> > Also make sure that this change doesn't break the exiting
>> ROMRAM RedBoot
>> > on the board :-)
>>
>> Does the ROMRAM redboot actually work? To me it looks like it would
>> not.
>>
>>         Andrew
>>
>>
>
> I don't think it's ever worked for me (before the changes that I'm hopefully about to post).  I'm
> trying to access the CVS server, and I can't seem to get a response.  Is it working at the moment?

It may not be - there were reports of hardware problems on that machine
earlier today and at the moment it may be offline.



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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08  9:03     ` Andrew Lunn
@ 2004-04-08  9:16       ` Gary Thomas
  0 siblings, 0 replies; 16+ messages in thread
From: Gary Thomas @ 2004-04-08  9:16 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Gary Thomas, Andrew Lunn, Alan Bowman, ecos-discuss


Andrew Lunn said:
>> Also make sure that this change doesn't break the exiting ROMRAM RedBoot
>> on the board :-)
>
> Does the ROMRAM redboot actually work? To me it looks like it would
> not.

I've no idea since I've never had one of those beasts.  That said, there
is a ROMRAM configuration in place for RedBoot on the platform, so I'd
expect that someone has made it work.

I just wouldn't want to see a change go in that fixed Alan's problem,
but broke RedBoot on the platform.




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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [ECOS] ROMRAM stand-alone application
@ 2004-04-08  9:09 Alan Bowman
  2004-04-08 11:48 ` Gary Thomas
  2004-04-08 12:07 ` Nick Garnett
  0 siblings, 2 replies; 16+ messages in thread
From: Alan Bowman @ 2004-04-08  9:09 UTC (permalink / raw)
  To: 'Andrew Lunn', Gary Thomas; +Cc: ecos-discuss



> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: 08 April 2004 09:53
> To: Gary Thomas
> Cc: Andrew Lunn; Alan Bowman; ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] ROMRAM stand-alone application
> 
> 
> > Also make sure that this change doesn't break the exiting 
> ROMRAM RedBoot
> > on the board :-)
> 
> Does the ROMRAM redboot actually work? To me it looks like it would
> not.
> 
>         Andrew
> 
> 

I don't think it's ever worked for me (before the changes that I'm hopefully about to post).  I'm trying to access the CVS server, and I can't seem to get a response.  Is it working at the moment?

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08  8:55   ` Gary Thomas
@ 2004-04-08  9:03     ` Andrew Lunn
  2004-04-08  9:16       ` Gary Thomas
  0 siblings, 1 reply; 16+ messages in thread
From: Andrew Lunn @ 2004-04-08  9:03 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Andrew Lunn, Alan Bowman, ecos-discuss

> Also make sure that this change doesn't break the exiting ROMRAM RedBoot
> on the board :-)

Does the ROMRAM redboot actually work? To me it looks like it would
not.

        Andrew



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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08  8:52 ` Andrew Lunn
@ 2004-04-08  8:55   ` Gary Thomas
  2004-04-08  9:03     ` Andrew Lunn
  0 siblings, 1 reply; 16+ messages in thread
From: Gary Thomas @ 2004-04-08  8:55 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Alan Bowman, ecos-discuss


Andrew Lunn said:
> On Thu, Apr 08, 2004 at 08:35:24AM +0100, Alan Bowman wrote:
>> I found a discrepancy in the EB55 ROMRAM code, between the section that masks addresses before
>> copying ROM to RAM, and the memory map that the linker uses to determine where to put code.  I
>> used the following patch to adjust the memory map:
>>
>> Index: mlt_arm_at91_eb55_romram.ldi
>> ===================================================================
>> RCS file:
>> /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/include/pkgconf/mlt_arm_at91_eb55_romram.ldi,v
>> retrieving revision 1.1
>> diff -u -r1.1 mlt_arm_at91_eb55_romram.ldi
>> --- mlt_arm_at91_eb55_romram.ldi	13 May 2003 18:27:59 -0000	1.1
>> +++ mlt_arm_at91_eb55_romram.ldi	17 Dec 2003 14:43:48 -0000
>> @@ -14,7 +14,7 @@
>>  {
>>      SECTIONS_BEGIN
>>      SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
>> -    SECTION_rom_vectors (ram, 0x02008000, LMA_EQ_VMA)
>> +    SECTION_rom_vectors (ram, 0x02000000, LMA_EQ_VMA)
>>      SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
>>      SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>>      SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
>
>
> There does seem to be an inconsistency. The code that actually does
> the relocation is
>
> #if defined(CYG_HAL_STARTUP_ROMRAM)
>         ldr     r0,=0x01000000          // Relocate FLASH/ROM to on-chip RAM
>         ldr     r1,=0x02000000          // RAM base & length
>         ldr     r2,=0x02010000
> 20:     ldr     r3,[r0],#4
>         str     r3,[r1],#4
>         cmp     r1,r2
>         bne     20b
>         ldr     r0,=30f
>         mov     pc,r0
> 30:
> #endif
>
> it is copying from 0x1000000 to 0x2000000. Also note that it only
> copies 0x10000 bytes. If you application is bigger then this you will
> need to modify this like.
>
>> This alters the location that ROMRAM code is linked at (I think) and
>> matches the startup code for the ROMRAM version of the EB55.  Only
>> problem - if you try to use a ROMRAM version of Redboot to load a
>> RAM version of your application, the same bit of memory is used for
>> both and they clash.  However, this change worked perfectly well for
>> us to develop ROMRAM applications for our EB55.
>
> Thats normal. There are two uses of ROMRAM. One is for the application
> and the other is for RedBoot. Normally the _romram.* file are setup
> for one or the other. They cannot do both. It appears these files are
> somewhere in the middle and don't work for either.
>
> Please submit a patch with a ChangeLog entry and i will commit it.

Also make sure that this change doesn't break the exiting ROMRAM RedBoot
on the board :-)



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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [ECOS] ROMRAM stand-alone application
  2004-04-08  8:27 Alan Bowman
@ 2004-04-08  8:52 ` Andrew Lunn
  2004-04-08  8:55   ` Gary Thomas
  2004-04-22 15:56 ` Marco Aurélio da Cruz
  1 sibling, 1 reply; 16+ messages in thread
From: Andrew Lunn @ 2004-04-08  8:52 UTC (permalink / raw)
  To: Alan Bowman; +Cc: ecos-discuss

On Thu, Apr 08, 2004 at 08:35:24AM +0100, Alan Bowman wrote:
> I found a discrepancy in the EB55 ROMRAM code, between the section that masks addresses before copying ROM to RAM, and the memory map that the linker uses to determine where to put code.  I used the following patch to adjust the memory map:
> 
> Index: mlt_arm_at91_eb55_romram.ldi
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/include/pkgconf/mlt_arm_at91_eb55_romram.ldi,v
> retrieving revision 1.1
> diff -u -r1.1 mlt_arm_at91_eb55_romram.ldi
> --- mlt_arm_at91_eb55_romram.ldi	13 May 2003 18:27:59 -0000	1.1
> +++ mlt_arm_at91_eb55_romram.ldi	17 Dec 2003 14:43:48 -0000
> @@ -14,7 +14,7 @@
>  {
>      SECTIONS_BEGIN
>      SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
> -    SECTION_rom_vectors (ram, 0x02008000, LMA_EQ_VMA)
> +    SECTION_rom_vectors (ram, 0x02000000, LMA_EQ_VMA)
>      SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
>      SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>      SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)


There does seem to be an inconsistency. The code that actually does
the relocation is

#if defined(CYG_HAL_STARTUP_ROMRAM)
        ldr     r0,=0x01000000          // Relocate FLASH/ROM to on-chip RAM
        ldr     r1,=0x02000000          // RAM base & length
        ldr     r2,=0x02010000
20:     ldr     r3,[r0],#4
        str     r3,[r1],#4
        cmp     r1,r2
        bne     20b
        ldr     r0,=30f
        mov     pc,r0
30:
#endif

it is copying from 0x1000000 to 0x2000000. Also note that it only
copies 0x10000 bytes. If you application is bigger then this you will
need to modify this like.

> This alters the location that ROMRAM code is linked at (I think) and
> matches the startup code for the ROMRAM version of the EB55.  Only
> problem - if you try to use a ROMRAM version of Redboot to load a
> RAM version of your application, the same bit of memory is used for
> both and they clash.  However, this change worked perfectly well for
> us to develop ROMRAM applications for our EB55.

Thats normal. There are two uses of ROMRAM. One is for the application
and the other is for RedBoot. Normally the _romram.* file are setup
for one or the other. They cannot do both. It appears these files are
somewhere in the middle and don't work for either.

Please submit a patch with a ChangeLog entry and i will commit it.

       Thanks
        Andrew

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [ECOS] ROMRAM stand-alone application
@ 2004-04-08  8:27 Alan Bowman
  2004-04-08  8:52 ` Andrew Lunn
  2004-04-22 15:56 ` Marco Aurélio da Cruz
  0 siblings, 2 replies; 16+ messages in thread
From: Alan Bowman @ 2004-04-08  8:27 UTC (permalink / raw)
  To: ecos-discuss

I found a discrepancy in the EB55 ROMRAM code, between the section that masks addresses before copying ROM to RAM, and the memory map that the linker uses to determine where to put code.  I used the following patch to adjust the memory map:

Index: mlt_arm_at91_eb55_romram.ldi
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/include/pkgconf/mlt_arm_at91_eb55_romram.ldi,v
retrieving revision 1.1
diff -u -r1.1 mlt_arm_at91_eb55_romram.ldi
--- mlt_arm_at91_eb55_romram.ldi	13 May 2003 18:27:59 -0000	1.1
+++ mlt_arm_at91_eb55_romram.ldi	17 Dec 2003 14:43:48 -0000
@@ -14,7 +14,7 @@
 {
     SECTIONS_BEGIN
     SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
-    SECTION_rom_vectors (ram, 0x02008000, LMA_EQ_VMA)
+    SECTION_rom_vectors (ram, 0x02000000, LMA_EQ_VMA)
     SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
     SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)


This alters the location that ROMRAM code is linked at (I think) and matches the startup code for the ROMRAM version of the EB55.  Only problem - if you try to use a ROMRAM version of Redboot to load a RAM version of your application, the same bit of memory is used for both and they clash.  However, this change worked perfectly well for us to develop ROMRAM applications for our EB55.

Hope this helps

Alan Bowman


-----Original Message-----
From: Marco Aurélio da Cruz [mailto:marco@daruma.com.br]
Sent: 08 April 2004 06:31
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] ROMRAM stand-alone application


Hi,

I've developed a board with AT91M55800 (I used EB55 structure to port 
eCos), and since then I've been using a Redboot ROM to load and run a 
RAM image of my application. I changed the ldi, .h and 
hal_plataform_setup.h files to meet my requirements.

Now, I need to record an EPROM to buid a self-booting stand alone 
application. I've created a ROMRAM eCos, based on my working RAM eCos 
files, but it did not work.

Do I need Redboot yet when I want a self-booting application? And ROM 
Monitor and GDB stubs? In the Configtool Template selection, the default 
packages are enough to create a ROMRAM application? And what about de 
grayed Redboot HAL options that appear en the configuration window?

Thank you in advance.

Regards,

Marco Aurélio da Cruz

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

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ECOS] ROMRAM stand-alone application
@ 2004-04-08  8:09 Marco Aurélio da Cruz
  0 siblings, 0 replies; 16+ messages in thread
From: Marco Aurélio da Cruz @ 2004-04-08  8:09 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I've developed a board with AT91M55800 (I used EB55 structure to port 
eCos), and since then I've been using a Redboot ROM to load and run a 
RAM image of my application. I changed the ldi, .h and 
hal_plataform_setup.h files to meet my requirements.

Now, I need to record an EPROM to buid a self-booting stand alone 
application. I've created a ROMRAM eCos, based on my working RAM eCos 
files, but it did not work.

Do I need Redboot yet when I want a self-booting application? And ROM 
Monitor and GDB stubs? In the Configtool Template selection, the default 
packages are enough to create a ROMRAM application? And what about de 
grayed Redboot HAL options that appear en the configuration window?

Thank you in advance.

Regards,

Marco Aurélio da Cruz

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-04-22 12:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-09  9:11 [ECOS] ROMRAM stand-alone application Alan Bowman
2004-04-11 11:37 ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2004-04-08 13:40 Alan Bowman
2004-04-08  9:09 Alan Bowman
2004-04-08 11:48 ` Gary Thomas
2004-04-08 12:07 ` Nick Garnett
2004-04-08 12:25   ` Andrew Lunn
2004-04-08 12:07     ` Nick Garnett
2004-04-08 12:31     ` Gary Thomas
2004-04-08  8:27 Alan Bowman
2004-04-08  8:52 ` Andrew Lunn
2004-04-08  8:55   ` Gary Thomas
2004-04-08  9:03     ` Andrew Lunn
2004-04-08  9:16       ` Gary Thomas
2004-04-22 15:56 ` Marco Aurélio da Cruz
2004-04-08  8:09 Marco Aurélio da Cruz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).