* [U-Boot] Debugging u-boot with bdi3000 basics
@ 2010-05-26 17:07 Mark Fanara
2010-05-27 5:15 ` Alan Carvalho de Assis
0 siblings, 1 reply; 6+ messages in thread
From: Mark Fanara @ 2010-05-26 17:07 UTC (permalink / raw)
To: u-boot
I have read section 10 of the manual which describes debugging u-boot
and have further questions.
1) In section 10.4, Tips and Tricks, it says "To prevent GDB from
jumping around in the code when trying to single step, i. e. when it
seems as if the code is not executing line by line, you can recompile
your code with the following additional compiler options:
"-fno-schedule-insns -fno-schedule-insns"
In the u-boot developer world, what is the best practice for adding
these compiler options? I see CFLAGS in config.mk and assume that is
what needs to be modified. However, I need a HOWTODOITRIGHT
2) I am using a bdi3000. Is there no way to build u-boot so that it is
directly loaded to RAM by the debugger and does not relocate itself?
3) The function board_init_f() in board.c makes calls to debug(). I
cannot determine how to enable debug() output. I saw one reference in
the manual, but it gave no specifics.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Debugging u-boot with bdi3000 basics
2010-05-26 17:07 [U-Boot] Debugging u-boot with bdi3000 basics Mark Fanara
@ 2010-05-27 5:15 ` Alan Carvalho de Assis
2010-05-27 6:56 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Alan Carvalho de Assis @ 2010-05-27 5:15 UTC (permalink / raw)
To: u-boot
Hi Mark,
On 5/27/10, Mark Fanara <mark.fanara@gmail.com> wrote:
...
>
> 2) I am using a bdi3000. Is there no way to build u-boot so that it is
> directly loaded to RAM by the debugger and does not relocate itself?
>
#define CONFIG_SKIP_RELOCATE_UBOOT
BRs,
Alan
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Debugging u-boot with bdi3000 basics
2010-05-27 5:15 ` Alan Carvalho de Assis
@ 2010-05-27 6:56 ` Wolfgang Denk
2010-05-27 9:07 ` Alan Carvalho de Assis
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2010-05-27 6:56 UTC (permalink / raw)
To: u-boot
Dear Alan Carvalho de Assis,
In message <AANLkTik4FYpDAK9bHVKZrNDMvUyCCg-xDaBqTkqyZovL@mail.gmail.com> you wrote:
> Hi Mark,
>
> On 5/27/10, Mark Fanara <mark.fanara@gmail.com> wrote:
> ...
> >
> > 2) I am using a bdi3000. Is there no way to build u-boot so that it is
> > directly loaded to RAM by the debugger and does not relocate itself?
> >
>
> #define CONFIG_SKIP_RELOCATE_UBOOT
Note that this doesn't exist on ll architectures. For example on
PowerPC, we will always relocate.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Die ganzen Zahlen hat der liebe Gott geschaffen, alles andere ist
Menschenwerk... Leopold Kronecker
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Debugging u-boot with bdi3000 basics
2010-05-27 6:56 ` Wolfgang Denk
@ 2010-05-27 9:07 ` Alan Carvalho de Assis
2010-05-27 12:40 ` Mark Fanara
0 siblings, 1 reply; 6+ messages in thread
From: Alan Carvalho de Assis @ 2010-05-27 9:07 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
Yes, it is true.
Currently only for ARMs and i386.
Best Regards,
Alan
On 5/27/10, Wolfgang Denk <wd@denx.de> wrote:
> Dear Alan Carvalho de Assis,
>
> In message <AANLkTik4FYpDAK9bHVKZrNDMvUyCCg-xDaBqTkqyZovL@mail.gmail.com>
> you wrote:
>> Hi Mark,
>>
>> On 5/27/10, Mark Fanara <mark.fanara@gmail.com> wrote:
>> ...
>> >
>> > 2) I am using a bdi3000. Is there no way to build u-boot so that it is
>> > directly loaded to RAM by the debugger and does not relocate itself?
>> >
>>
>> #define CONFIG_SKIP_RELOCATE_UBOOT
>
> Note that this doesn't exist on ll architectures. For example on
> PowerPC, we will always relocate.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Die ganzen Zahlen hat der liebe Gott geschaffen, alles andere ist
> Menschenwerk... Leopold Kronecker
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Debugging u-boot with bdi3000 basics
2010-05-27 9:07 ` Alan Carvalho de Assis
@ 2010-05-27 12:40 ` Mark Fanara
2010-05-27 13:00 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Mark Fanara @ 2010-05-27 12:40 UTC (permalink / raw)
To: u-boot
As my target board is PowerPC based (and therefore skipping relocation
is not possible), I need help with my previously enumerated questions.
1) In section 10.4, Tips and Tricks, it says "To prevent GDB from
jumping around in the code when trying to single step, i. e. when it
seems as if the code is not executing line by line, you can recompile
your code with the following additional compiler options:
"-fno-schedule-insns -fno-schedule-insns"
In the u-boot developer world, what is the best practice for adding
these compiler options? I see CFLAGS in config.mk and assume that is
what needs to be modified. However, I need a HOWTODOITRIGHT
3) The function board_init_f() in board.c makes calls to debug(). I
cannot determine how to enable debug() output. I saw one reference in
the manual, but it gave no specifics.
On Thu, May 27, 2010 at 4:07 AM, Alan Carvalho de Assis
<acassis@gmail.com> wrote:
> Dear Wolfgang Denk,
>
> Yes, it is true.
>
> Currently only for ARMs and i386.
>
> Best Regards,
>
> Alan
>
> On 5/27/10, Wolfgang Denk <wd@denx.de> wrote:
>> Dear Alan Carvalho de Assis,
>>
>> In message <AANLkTik4FYpDAK9bHVKZrNDMvUyCCg-xDaBqTkqyZovL@mail.gmail.com>
>> you wrote:
>>> Hi Mark,
>>>
>>> On 5/27/10, Mark Fanara <mark.fanara@gmail.com> wrote:
>>> ...
>>> >
>>> > 2) I am using a bdi3000. Is there no way to build u-boot so that it is
>>> > directly loaded to RAM by the debugger and does not relocate itself?
>>> >
>>>
>>> #define CONFIG_SKIP_RELOCATE_UBOOT
>>
>> Note that this doesn't exist on ll architectures. For example on
>> PowerPC, we will always relocate.
>>
>> Best regards,
>>
>> Wolfgang Denk
>>
>> --
>> DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
>> Die ganzen Zahlen hat der liebe Gott ?geschaffen, ?alles ?andere ?ist
>> Menschenwerk... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Leopold Kronecker
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Debugging u-boot with bdi3000 basics
2010-05-27 12:40 ` Mark Fanara
@ 2010-05-27 13:00 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2010-05-27 13:00 UTC (permalink / raw)
To: u-boot
Dear Mark Fanara,
In message <AANLkTinA8O1OtqI93hyazU2UDG4QbZzRkt3ql3iP9hCN@mail.gmail.com> you wrote:
> As my target board is PowerPC based (and therefore skipping relocation
> is not possible), I need help with my previously enumerated questions.
>
> 1) In section 10.4, Tips and Tricks, it says "To prevent GDB from
> jumping around in the code when trying to single step, i. e. when it
> seems as if the code is not executing line by line, you can recompile
> your code with the following additional compiler options:
> "-fno-schedule-insns -fno-schedule-insns"
>
> In the u-boot developer world, what is the best practice for adding
> these compiler options? I see CFLAGS in config.mk and assume that is
> what needs to be modified. However, I need a HOWTODOITRIGHT
There is many ways to do this. You may or mayu not want to compile all
files with this option, so you may add it to the glocal CFLAGS, or
just locally in a subdirectory, or manually provide it on the command
line, or ....
Ther eis no single "right" way.
> 3) The function board_init_f() in board.c makes calls to debug(). I
> cannot determine how to enable debug() output. I saw one reference in
> the manual, but it gave no specifics.
You just "#define DEBUG" before the first #include in that file.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Men will always be men -- no matter where they are.
-- Harry Mudd, "Mudd's Women", stardate 1329.8
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-27 13:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 17:07 [U-Boot] Debugging u-boot with bdi3000 basics Mark Fanara
2010-05-27 5:15 ` Alan Carvalho de Assis
2010-05-27 6:56 ` Wolfgang Denk
2010-05-27 9:07 ` Alan Carvalho de Assis
2010-05-27 12:40 ` Mark Fanara
2010-05-27 13:00 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox