Porting UBoot without UART
Hi,
We're using some emulation box to develop our SoC. Somehow the UART will the last component available for firmware development. Without UART, it's very hard to debug UBoot. Can we "easily" drive a car without eyes?
But it's not impossible to do that. My first thought about porting UBoot under this circumstance is to disable the serial driver in UBoot and to redirect all printf to a fixed memory area, just as what a circular log buffer does. I'm wondering how much workload this will be. Is this kind of mechasim already existent in UBoot?
Thank you for your comments.
-Shawn.
Quoted 5 lines · Shawn Jin
My first thought about porting UBoot under this circumstance is to disable the serial driver in UBoot and to redirect all printf to a fixed memory area, just as what a circular log buffer does. I'm wondering how much workload this will be. Is this kind of mechasim already existent in UBoot?
Provide our own console functions. See common/console.c and common/devices.c how it is initialized and used.
Best regards,
ladis
Quoted 3 lines · In message <[email protected]> you wrote:
We're using some emulation box to develop our SoC. Somehow the UART will the last component available for firmware development. Without
What a major mistake of design...
Quoted 2 lines
UART, it's very hard to debug UBoot. Can we "easily" drive a car without eyes?
Easily yes, savely no ;-)
Quoted 5 lines
But it's not impossible to do that. My first thought about porting UBoot under this circumstance is to disable the serial driver in UBoot and to redirect all printf to a fixed memory area, just as what a circular log buffer does. I'm wondering how much workload this will be. Is this kind of mechasim already existent in UBoot?
There is a log driver, yes.
But U-Boot really assumes that you have a working console port. Anything else is a major pain in the ...
Best regards,
Wolfgang Denk
Signature · 6 lines
See us @ Embedded World, Nuremberg, Feb 22 - 24, Hall 10.0 Booth 310 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Nearly everyone is in favor of going to heaven but too many are hoping they'll live long enough to see an easing of the entrance requirements. Never appeal to a man's "better nature." he might not have one.
Quoted 3 lines · In message <[email protected]> you wrote:
Provide our own console functions. See
common/console.candcommon/devices.chow it is initialized and used.
Note thatt he "devices" are intialized pretty late in the boot sequence. Until then, all of the most of the important console
messages have already beeen printed.
Best regards,
Wolfgang Denk
Signature · 4 lines
See us @ Embedded World, Nuremberg, Feb 22 - 24, Hall 10.0 Booth 310 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Emotions are alien to me. I'm a scientist. -- Spock, "This Side of Paradise", stardate 3417.3
Quoted 8 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
Provide our own console functions. See
common/console.candcommon/devices.chow it is initialized and used.Note thatt he "devices" are intialized pretty late in the boot sequence. Until then, all of the most of the important consolemessages have already beeen printed.
Dear Grant,
Quoted 8 lines · in message <[email protected]> you wrote:
Quoted 7 lines
Quoted 3 lines
Provide our own console functions. See
common/console.candcommon/devices.chow it is initialized and used.Note thatt he "devices" are intialized pretty late in the boot sequence. Until then, all of the most of the important consolemessages have already beeen printed.
Quoted 7 lines
Quoted 1 line
From the original post: "We're using some emulation box to develop our
SoC. Somehow the UART will the last component available for firmware development."
I don't think that is the situation that Shawn is describing. To me it sounded like he is starting firmware development before all of the functionality is delivered by the hardware engineers. I don't think
You are right. Then Ladislav Michl suggested to use special console
functions for output, which works, but misses most of the "interesting" startup messages which are printed long before the
device funtions are installed.
Quoted 2 lines
that he is refering to initialization order. Shawn, could you please clarify?
Initialization order plays only a role here as a console device starts working too late. The native console port is the serial port.
Best regards,
Wolfgang Denk
Signature · 4 lines
See us @ Embedded World, Nuremberg, Feb 22 - 24, Hall 10.0 Booth 310
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Cleverness and Style have no place in getting a project completed.
-- Tom ChristiansenQuoted 9 lines · Wolfgang Denk
Dear Grant,
Quoted 6 lines · in message <[email protected]> you wrote:
Quoted 3 lines
From the original post: "We're using some emulation box to develop our
SoC. Somehow the UART will the last component available for firmware development."
Quoted 8 lines
Quoted 3 lines
I don't think that is the situation that Shawn is describing. To me it sounded like he is starting firmware development before all of the functionality is delivered by the hardware engineers. I don't think
You are right. Then Ladislav Michl suggested to use special console
functions for output, which works, but misses most of the "interesting" startup messages which are printed long before thedevice funtions are installed.
Ahh, thank you. I had misunderstood what you were talking about.
Quoted 5 lines
Quoted 2 lines
that he is refering to initialization order. Shawn, could you please clarify?
Initialization order plays only a role here as a console device starts working too late. The native console port is the serial port.
So what needs to be modified to do this? Create new serial_putc, _getc, _init etc. functions that send messages to where he needs them?
Cheers,
g.
Quoted 5 lines
I don't think that is the situation that Shawn is describing. To me it sounded like he is starting firmware development before all of the functionality is delivered by the hardware engineers. I don't think that he is refering to initialization order. Shawn, could you please clarify?
Both of you are right. I'm starting firmware development before all h/w components are ready. H/W folks are pushing to test some of components before UART is delivered.
Thanks,
-Shawn.
Quoted 3 lines · Shawn Jin
Both of you are right. I'm starting firmware development before all h/w components are ready. H/W folks are pushing to test some of components before UART is delivered.
Sounds like some percussive maintenance is needed about the ears of said H/W folks. :-P
g.
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Initialization order plays only a role here as a console device starts working too late. The native console port is the serial port.
So what needs to be modified to do this? Create new
serial_putc,_getc,_initetc. functions that send messages to where he needs them?
Add a working serial port :-)
Best regards,
Wolfgang Denk
Signature · 4 lines
See us @ Embedded World, Nuremberg, Feb 22 - 24, Hall 10.0 Booth 310
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Plan to throw one away. You will anyway."
- Fred Brooks, "The Mythical Man Month"Quoted 7 lines · Wolfgang Denk
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Initialization order plays only a role here as a console device starts working too late. The native console port is the serial port.
So what needs to be modified to do this? Create new
serial_putc,_getc,_initetc. functions that send messages to where he needs them?
For what it's worth, I have recently completed a port of U-Boot to a custom board with no serial port in the design. It does, however, have a functioning ethernet port, which we set up to use as a netconsole. Sure, most of the informative boot up messages are missed, but to paraphrase Wolfgang, "get a BDI 2000"! ;)
Good Luck,
Adam Kent