This is the mail archive of the ecos-discuss@sourceware.org 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: Adding redboot commands or parameters results in ROM image that won't run (but RAM image that will).


On Fri, 2006-03-10 at 15:32 -0500, Dave Rensberger wrote:
> Hi,
> 
> I'm having a very strange problem with redboot running on an Intel  
> IXP425 platform (I'm using the v1.92 release that Intel adapted for  
> use with the ixdp425).
> 
> I'm trying to add some new commands to the CLI using the  
> local_cmd_entry() macro.  This works fine when I build a RAM based  
> image, but results in a ROM based image that doesn't get very far  
> before it stops running (I don't see any output at all on the  
> console).    If I remove one of the existing commands, and and my new  
> one, everything works fine.   This suggests to me that I'm hitting  
> some sort of space limitation that is only relevant to the ROM based  
> image.   Since the local_cmd_entry() macro appears to really just  
> statically declare a data structure, it seems to me that I'm probably  
> just exceeding some pre-defined boundary for the data segment  
> (although it seems odd to me that this doesn't result in a link error  
> or warning).  Unfortunately, I don't see any obvious way to increase  
> this in any of the files that are used to set up the memory layout.
> 
> Can anyone tell me whether my analysis of the situation seems sound  
> or not, and what I might try to adjust to resolve my problem?

There aren't any inherent size limits on these tables, so that's
probably not your problem.

The main difference between ROM and RAM modes is that in the ROM mode,
all static data (which includes the tables that describe the commands)
is part of the ROM image and must be copied to its proper place in RAM
before the system starts up.  My guess is that this is going wrong
somehow, or that the entries you added are not aligned properly in
the tables (e.g. there's a gap).  I'm surprised that it doesn't
come up at all since the command tables aren't used until you've 
entered a command.  Perhaps they are somehow corrupting the 
initialization tables?

I'd try putting some 'diag_printf()' calls into the RedBoot startup
code (in main.c).  Just start after the console has been setup, etc.
Most importantly, try adding some prints to the loop that calls
the initialization functions.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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


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