[ECOS] Adding redboot commands or parameters results in ROM image that won't run (but RAM image that will).
Dave Rensberger
dave@thingmagic.com
Fri Mar 10 20:56:00 GMT 2006
Gary,
Thanks for the suggestion. I keep thinking that it must be something
more basic than that. I've attached a copy of my code. I think it's
about as simple as it could possibly be... As far as I can tell,
there isn't anything fundamentally different between the macro call
that adds my new command "pibinit" and any of the macro calls that
add the standard commands.
--Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flash.c
Type: application/octet-stream
Size: 79761 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20060310/a2aeb362/attachment.obj>
-------------- next part --------------
Dave Rensberger - Project Engineer
ThingMagic, Inc., One Broadway, Cambridge, MA 02142
Tel: 617-682-3784
Cell: 617-834-6425
On Mar 10, 2006, at 3:46 PM, Gary Thomas wrote:
> 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
> ------------------------------------------------------------
>
-------------- next part --------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list