All of lore.kernel.org
 help / color / mirror / Atom feed
* Building multiple gdb-cross targets
@ 2008-04-04 15:57 Geoffrey Wossum
  2008-04-04 17:48 ` Khem Raj
  0 siblings, 1 reply; 9+ messages in thread
From: Geoffrey Wossum @ 2008-04-04 15:57 UTC (permalink / raw)
  To: openembedded-devel

Hi all,

Another question about build gdb-cross for the AVR32.  Building gdb-cross gets 
me avr32-angstrom-linux-uclibc-gdb.  But over at this page, 
http://avr32linux.org/twiki/bin/view/Main/KernelDebugging, it says you really 
want an standalone gdb for kernel debugging.

How can I get OE to build just an avr32-gdb?  How can I get OE to build both 
avr32-gdb and avr32-linux-gdb (aka avr32-angstrom-linux-uclibc-gdb)?  

TIA,
---
Geoffrey



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

* Re: Building multiple gdb-cross targets
  2008-04-04 15:57 Building multiple gdb-cross targets Geoffrey Wossum
@ 2008-04-04 17:48 ` Khem Raj
  2008-04-04 18:46   ` Geoffrey Wossum
  0 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2008-04-04 17:48 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

Geoffrey Wossum wrote:
> Hi all,
> 
> Another question about build gdb-cross for the AVR32.  Building gdb-cross gets 
> me avr32-angstrom-linux-uclibc-gdb.  But over at this page, 
> http://avr32linux.org/twiki/bin/view/Main/KernelDebugging, it says you really 
> want an standalone gdb for kernel debugging.
> 
> How can I get OE to build just an avr32-gdb?  How can I get OE to build both 
> avr32-gdb and avr32-linux-gdb (aka avr32-angstrom-linux-uclibc-gdb)?  

They are two different configurations of gdb the one OE will build for 
you is the cross gdb which is supposed to cross debug linux applications 
(e.g. arm-*-linux-gnueabi). The one you are intending to have is what I 
call baremetal (e.g. arm-eabi)  debugger. I dont think you will be able 
to build this with ease using OE as they are really two different 
targets for OE to build.

Why would avr-linux gdb not work ?

HTH

-Khem


> 
> TIA,
> ---
> Geoffrey
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 258 bytes --]

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

* Re: Building multiple gdb-cross targets
  2008-04-04 17:48 ` Khem Raj
@ 2008-04-04 18:46   ` Geoffrey Wossum
  2008-04-04 20:54     ` Leon Woestenberg
  2008-04-07 14:54     ` Geoffrey Wossum
  0 siblings, 2 replies; 9+ messages in thread
From: Geoffrey Wossum @ 2008-04-04 18:46 UTC (permalink / raw)
  To: openembedded-devel

On Friday 04 April 2008 12:48:59 pm Khem Raj wrote:
> Geoffrey Wossum wrote:

> > How can I get OE to build just an avr32-gdb?  How can I get OE to build
> > both avr32-gdb and avr32-linux-gdb (aka avr32-angstrom-linux-uclibc-gdb)?
>
> They are two different configurations of gdb the one OE will build for
> you is the cross gdb which is supposed to cross debug linux applications
> (e.g. arm-*-linux-gnueabi). The one you are intending to have is what I
> call baremetal (e.g. arm-eabi)  debugger. I dont think you will be able
> to build this with ease using OE as they are really two different
> targets for OE to build.

It was easy enough to build the bare metal debugger outside OE.  Just seems 
like you should be able to build this with OE, too.  It seems like it might 
need a separate .bb file to pull it off.  Not exactly sure how you'd force 
bitbake to use a different target setting.  Maybe setting the TARGET_OS to be 
blank in the bitbake file?

> Why would avr-linux gdb not work ?

From the avr32linux wiki entry on kernel debugging:
avr32-gdb (the standalone debugger) or avr32-linux-gdb. Preferably the former 
since it has the ability to read and write system registers.

---
Geoffrey




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

* Re: Building multiple gdb-cross targets
  2008-04-04 18:46   ` Geoffrey Wossum
@ 2008-04-04 20:54     ` Leon Woestenberg
  2008-04-07 14:53       ` Geoffrey Wossum
  2008-04-07 14:54     ` Geoffrey Wossum
  1 sibling, 1 reply; 9+ messages in thread
From: Leon Woestenberg @ 2008-04-04 20:54 UTC (permalink / raw)
  To: openembedded-devel

Hello,

On 4/4/08, Geoffrey Wossum <geoffrey@pager.net> wrote:
> On Friday 04 April 2008 12:48:59 pm Khem Raj wrote:
> > Why would avr-linux gdb not work ?
>
Probably because we set the target tripplet only once, and it's
*linux*. (Am I correct?)

> From the avr32linux wiki entry on kernel debugging:
> avr32-gdb (the standalone debugger) or avr32-linux-gdb. Preferably the former
> since it has the ability to read and write system registers.
>
Why would the linux-gdb not be able to touch those registers?

Regards,
-- 
Leon



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

* Re: Building multiple gdb-cross targets
  2008-04-04 20:54     ` Leon Woestenberg
@ 2008-04-07 14:53       ` Geoffrey Wossum
  0 siblings, 0 replies; 9+ messages in thread
From: Geoffrey Wossum @ 2008-04-07 14:53 UTC (permalink / raw)
  To: openembedded-devel

On Friday 04 April 2008 03:54:36 pm Leon Woestenberg wrote:

> > From the avr32linux wiki entry on kernel debugging:
> > avr32-gdb (the standalone debugger) or avr32-linux-gdb. Preferably the
> > former since it has the ability to read and write system registers.
>
> Why would the linux-gdb not be able to touch those registers?

Don't know for sure, but I'd guess it has something to do with how Atmel 
patched gdb.

---
Geoffrey





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

* Re: Building multiple gdb-cross targets
  2008-04-04 18:46   ` Geoffrey Wossum
  2008-04-04 20:54     ` Leon Woestenberg
@ 2008-04-07 14:54     ` Geoffrey Wossum
  2008-04-07 17:58       ` Stelios Koroneos
  1 sibling, 1 reply; 9+ messages in thread
From: Geoffrey Wossum @ 2008-04-07 14:54 UTC (permalink / raw)
  To: openembedded-devel

On Friday 04 April 2008 01:46:08 pm Geoffrey Wossum wrote:

> It was easy enough to build the bare metal debugger outside OE.  Just seems
> like you should be able to build this with OE, too.  It seems like it might
> need a separate .bb file to pull it off.  Not exactly sure how you'd force
> bitbake to use a different target setting.  Maybe setting the TARGET_OS to
> be blank in the bitbake file?

Copied gdb-cross_x.x.bb to gdb-baremetal_x.x.bb.  Added a line:
TARGET_SYS_avr32 = "avr32"

That actually seemed to work.

---
Geoffrey





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

* Re: Building multiple gdb-cross targets
  2008-04-07 14:54     ` Geoffrey Wossum
@ 2008-04-07 17:58       ` Stelios Koroneos
  2008-04-07 18:54         ` Geoffrey Wossum
  0 siblings, 1 reply; 9+ messages in thread
From: Stelios Koroneos @ 2008-04-07 17:58 UTC (permalink / raw)
  To: openembedded-devel

I think you are missing the point

"bare-metal" gdb does not have any bindings with
glibc/uclibc/eglibc/whatever-libc because its (usually) used to build a
system with no OS (standalone apps).
You also need a "bare-metal" toolchain i.e toolchain that generates code
that can run on the board without any OS (this was the case in most embedded
designs before linux become "embedded")


Stelios S. Koroneos

Digital OPSiS - Embedded Intelligence
http://www.digital-opsis.com
 

> -----Original Message-----
> From: openembedded-devel-bounces@openembedded.org 
> [mailto:openembedded-devel-bounces@openembedded.org] On 
> Behalf Of Geoffrey Wossum
> Sent: Monday, April 07, 2008 5:54 PM
> To: openembedded-devel@openembedded.org
> Subject: Re: [oe] Building multiple gdb-cross targets
> 
> On Friday 04 April 2008 01:46:08 pm Geoffrey Wossum wrote:
> 
> > It was easy enough to build the bare metal debugger outside 
> OE.  Just 
> > seems like you should be able to build this with OE, too.  It seems 
> > like it might need a separate .bb file to pull it off.  Not exactly 
> > sure how you'd force bitbake to use a different target 
> setting.  Maybe 
> > setting the TARGET_OS to be blank in the bitbake file?
> 
> Copied gdb-cross_x.x.bb to gdb-baremetal_x.x.bb.  Added a line:
> TARGET_SYS_avr32 = "avr32"
> 
> That actually seemed to work.
> 
> ---
> Geoffrey
> 
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 




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

* Re: Building multiple gdb-cross targets
  2008-04-07 17:58       ` Stelios Koroneos
@ 2008-04-07 18:54         ` Geoffrey Wossum
  2008-04-07 20:23           ` Leon Woestenberg
  0 siblings, 1 reply; 9+ messages in thread
From: Geoffrey Wossum @ 2008-04-07 18:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On Monday 07 April 2008 12:58:42 pm Stelios Koroneos wrote:
> I think you are missing the point
>
> "bare-metal" gdb does not have any bindings with
> glibc/uclibc/eglibc/whatever-libc because its (usually) used to build a
> system with no OS (standalone apps).
> You also need a "bare-metal" toolchain i.e toolchain that generates code
> that can run on the board without any OS (this was the case in most
> embedded designs before linux become "embedded")

Yeah, needing a baremetal gdb to debug makes perfect sense when you stop and 
think about it.  A linux-glibc gdb might want to hook into things like 
libthread_db that don't exist when debugging a kernel.

You don't need a baremetal toolchain (binutils +gcc) to build Linux or u-boot 
in this case (AVR32), though.  Maybe on some platforms you do, but not here.  
Even baremetal compilers usually need a libc, though, like using newlib to 
build a baremetal arm-elf toolchain.  The whole build a bootstrap compiler, 
then the libc, then the final compiler routine.  The AVR (not AVR32) 
toolchain is the one exception I know of to this.  For the AVR, you build 
binutils, then gcc, then avr-libc, and then your done.

---
Geoffrey



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

* Re: Building multiple gdb-cross targets
  2008-04-07 18:54         ` Geoffrey Wossum
@ 2008-04-07 20:23           ` Leon Woestenberg
  0 siblings, 0 replies; 9+ messages in thread
From: Leon Woestenberg @ 2008-04-07 20:23 UTC (permalink / raw)
  To: openembedded-devel

Hello,

On Mon, Apr 7, 2008 at 8:54 PM, Geoffrey Wossum <geoffrey@pager.net> wrote:
> On Monday 07 April 2008 12:58:42 pm Stelios Koroneos wrote:
>  > I think you are missing the point
>  >
>  > "bare-metal" gdb does not have any bindings with
>  > glibc/uclibc/eglibc/whatever-libc because its (usually) used to build a
>  > system with no OS (standalone apps).
>  > You also need a "bare-metal" toolchain i.e toolchain that generates code
>  > that can run on the board without any OS (this was the case in most
>  > embedded designs before linux become "embedded")
>
>  Yeah, needing a baremetal gdb to debug makes perfect sense when you stop and

I think we should try to achieve the other-way-around-approach, which is:

Add system register support to the Linux GDB for AVR32.

This way, we are done and don't need the bare-metal stuff. I'll look
into that some more once I start on AVR32 myself.

Regards,
-- 
Leon



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

end of thread, other threads:[~2008-04-07 20:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 15:57 Building multiple gdb-cross targets Geoffrey Wossum
2008-04-04 17:48 ` Khem Raj
2008-04-04 18:46   ` Geoffrey Wossum
2008-04-04 20:54     ` Leon Woestenberg
2008-04-07 14:53       ` Geoffrey Wossum
2008-04-07 14:54     ` Geoffrey Wossum
2008-04-07 17:58       ` Stelios Koroneos
2008-04-07 18:54         ` Geoffrey Wossum
2008-04-07 20:23           ` Leon Woestenberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.