public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot ROM version
@ 2001-07-12  7:02 Christoph Csebits
  2001-07-12  7:13 ` Gary Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Csebits @ 2001-07-12  7:02 UTC (permalink / raw)
  To: ecos-discuss

hi

i have ported RedBoot to my custom MPC860
board (based on MBX) to run in RAM.

Now i started to generate a ROM version
and burned it into flash.

After powerup, the board hangs somewhere in
cyg_hal_invoke_constructors (called in vectors.S)

I have adjusted the ROM bounds
I have added 

cdl_option CYGSEM_HAL_ROM_MONITOR {
    user_value 1
};

to my .ecm file.

Thats all I have changed from RAM version
Is there some vital thing missing?

Can anybody show me a working way how to copy
(powerpc-eabi-objcopy) the necessary
things out of the elf binary?

thanks for advice, christoph
-- 
cd /pub
more beer

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

* RE: [ECOS] RedBoot ROM version
  2001-07-12  7:02 [ECOS] RedBoot ROM version Christoph Csebits
@ 2001-07-12  7:13 ` Gary Thomas
  2001-07-13  1:10   ` Christoph Csebits
  0 siblings, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2001-07-12  7:13 UTC (permalink / raw)
  To: Christoph Csebits; +Cc: ecos-discuss

On 12-Jul-2001 Christoph Csebits wrote:
> hi
> 
> i have ported RedBoot to my custom MPC860
> board (based on MBX) to run in RAM.
> 
> Now i started to generate a ROM version
> and burned it into flash.
> 
> After powerup, the board hangs somewhere in
> cyg_hal_invoke_constructors (called in vectors.S)
> 
> I have adjusted the ROM bounds
> I have added 
> 
> cdl_option CYGSEM_HAL_ROM_MONITOR {
>     user_value 1
> };
> 
> to my .ecm file.
> 
> Thats all I have changed from RAM version
> Is there some vital thing missing?

HAL_STARRTUP == ROM ?

> 
> Can anybody show me a working way how to copy
> (powerpc-eabi-objcopy) the necessary
> things out of the elf binary?

You really shouldn't try to short circuit things like this.  The best
way to create a ROM based application is to use the configuration
tools to set ROM startup mode.

For example, here's how to build ROM based RedBoot for the PowerPC mbx860:

  % ecosconfig new mbx redboot
  % ecosconfig import startup_ROM
  % ecosconfig tree
  % make

where the file 'startup_ROM' looks like this (without the --- lines):
-----------------------------------------------------------
cdl_component CYG_HAL_STARTUP {
    user_value ROM
};
-----------------------------------------------------------

Look at other platforms to see how to make use of objcopy for what
you want.  The MBX is a good choice as it makes use of them when
building RedBoot.

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

* Re: [ECOS] RedBoot ROM version
  2001-07-12  7:13 ` Gary Thomas
@ 2001-07-13  1:10   ` Christoph Csebits
  2001-07-13  4:27     ` Gary Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Csebits @ 2001-07-13  1:10 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

On Thu, Jul 12, 2001 at 08:13:04AM -0600, Gary Thomas wrote:
> > Thats all I have changed from RAM version
> > Is there some vital thing missing?
> 
> Look at other platforms to see how to make use of objcopy for what
> you want.  The MBX is a good choice as it makes use of them when
> building RedBoot.

Thanks, i used a wrong binary for burning it into flash.

Now i have the problem, that redboot hangs in the FEC driver
initialization. (on a simple memory access: E.g.: qi->fec=txbase )

Changing the value of

cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE {
    user_value 6144
};

to 10144 let me go further in my fec code. 

Whats the maximum value, and how does it depends on what?

Disabling the whole network support is working
fine in flash, but not very satisfying.

thanks for advice,

brest regards, christoph
-- 

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

* Re: [ECOS] RedBoot ROM version
  2001-07-13  1:10   ` Christoph Csebits
@ 2001-07-13  4:27     ` Gary Thomas
  2001-07-16  1:55       ` Christoph Csebits
  2001-07-16  7:32       ` Christoph Csebits
  0 siblings, 2 replies; 8+ messages in thread
From: Gary Thomas @ 2001-07-13  4:27 UTC (permalink / raw)
  To: Christoph Csebits; +Cc: ecos-discuss

On 13-Jul-2001 Christoph Csebits wrote:
> On Thu, Jul 12, 2001 at 08:13:04AM -0600, Gary Thomas wrote:
>> > Thats all I have changed from RAM version
>> > Is there some vital thing missing?
>> 
>> Look at other platforms to see how to make use of objcopy for what
>> you want.  The MBX is a good choice as it makes use of them when
>> building RedBoot.
> 
> Thanks, i used a wrong binary for burning it into flash.
> 
> Now i have the problem, that redboot hangs in the FEC driver
> initialization. (on a simple memory access: E.g.: qi->fec=txbase )
> 
> Changing the value of
> 
> cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE {
>     user_value 6144
> };
> 
> to 10144 let me go further in my fec code. 

Can you tell why?  If you look at the system stack, does it really
get this full?

> 
> Whats the maximum value, and how does it depends on what?

There is no maximum value, it simply depends on how much memory you
want to reserve for RedBoot to use.

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

* Re: [ECOS] RedBoot ROM version
  2001-07-13  4:27     ` Gary Thomas
@ 2001-07-16  1:55       ` Christoph Csebits
  2001-07-16  7:32       ` Christoph Csebits
  1 sibling, 0 replies; 8+ messages in thread
From: Christoph Csebits @ 2001-07-16  1:55 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

On Fri, Jul 13, 2001 at 05:27:14AM -0600, Gary Thomas wrote:
> Can you tell why?  If you look at the system stack, does it really
> get this full?
I dont really know how to do this...

But,
in the FEC init function there is a call to intitialize the eth driver:

// Initialize upper level driver
(sc->funs->eth_drv->init)(sc, (unsigned char *)&enaddr);

in RAM startup the chain is resolved to:
fec_eth0_sc -> fec_eth0_sc_funcs -> eth_drv_funcs -> eth_drv_init

in ROM startup the chain is resolved to:
fec_eth0_sc -> nop_service -> (#$'%'!°)

Any idea?
regards, christoph

-- 

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

* Re: [ECOS] RedBoot ROM version
  2001-07-13  4:27     ` Gary Thomas
  2001-07-16  1:55       ` Christoph Csebits
@ 2001-07-16  7:32       ` Christoph Csebits
  2001-07-16  7:40         ` Gary Thomas
  1 sibling, 1 reply; 8+ messages in thread
From: Christoph Csebits @ 2001-07-16  7:32 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

On Fri, Jul 13, 2001 at 05:27:14AM -0600, Gary Thomas wrote:
> 
> Can you tell why?  If you look at the system stack, does it really
> get this full?

I found the reason why RedBoot didnt work in ROM startup.

there was a line missing in the memory layout file *rom.ldi

CYG_LABEL_DEFN(__reserved_vectors) = 0; . = CYG_LABEL_DEFN(__reserved_vectors) + 0x3000;
CYG_LABEL_DEFN(__reserved_vsr_table) = ALIGN (0x1); . = CYG_LABEL_DEFN(__reserved_vsr_table) + 0x200;
missing --> CYG_LABEL_DEFN(__reserved_virtual_table) = ALIGN (0x1); . = CYG_LABEL_DEFN(__reserved_virtual_table) + 0x100;
SECTION_data (ram, ALIGN (0x10), FOLLOWING (.gcc_except_table))

so the virtual table was polluting the stack (or vice versa).

-- 

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

* Re: [ECOS] RedBoot ROM version
  2001-07-16  7:32       ` Christoph Csebits
@ 2001-07-16  7:40         ` Gary Thomas
  2001-07-16  8:02           ` Christoph Csebits
  0 siblings, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2001-07-16  7:40 UTC (permalink / raw)
  To: Christoph Csebits; +Cc: ecos-discuss

On 16-Jul-2001 Christoph Csebits wrote:
> On Fri, Jul 13, 2001 at 05:27:14AM -0600, Gary Thomas wrote:
>> 
>> Can you tell why?  If you look at the system stack, does it really
>> get this full?
> 
> I found the reason why RedBoot didnt work in ROM startup.
> 
> there was a line missing in the memory layout file *rom.ldi
> 
> CYG_LABEL_DEFN(__reserved_vectors) = 0; . = CYG_LABEL_DEFN(__reserved_vectors) + 0x3000;
> CYG_LABEL_DEFN(__reserved_vsr_table) = ALIGN (0x1); . = CYG_LABEL_DEFN(__reserved_vsr_table) +
> 0x200;
> missing --> CYG_LABEL_DEFN(__reserved_virtual_table) = ALIGN (0x1); . =
> CYG_LABEL_DEFN(__reserved_virtual_table) + 0x100;
> SECTION_data (ram, ALIGN (0x10), FOLLOWING (.gcc_except_table))
> 
> so the virtual table was polluting the stack (or vice versa).

What platform is this for?

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

* Re: [ECOS] RedBoot ROM version
  2001-07-16  7:40         ` Gary Thomas
@ 2001-07-16  8:02           ` Christoph Csebits
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Csebits @ 2001-07-16  8:02 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

On Mon, Jul 16, 2001 at 08:40:45AM -0600, Gary Thomas wrote:
> What platform is this for?

its a self ported custom MPC860 based one, and it concerns
only my local version.

-- 

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

end of thread, other threads:[~2001-07-16  8:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-12  7:02 [ECOS] RedBoot ROM version Christoph Csebits
2001-07-12  7:13 ` Gary Thomas
2001-07-13  1:10   ` Christoph Csebits
2001-07-13  4:27     ` Gary Thomas
2001-07-16  1:55       ` Christoph Csebits
2001-07-16  7:32       ` Christoph Csebits
2001-07-16  7:40         ` Gary Thomas
2001-07-16  8:02           ` Christoph Csebits

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).