Building multiple gdb-cross targets
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
Quoted 5 lines · Geoffrey Wossum
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
Quoted 10 lines
TIA,
---
Geoffrey_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 11 lines · Khem Raj
Quoted 2 lines · Geoffrey Wossum
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?
Quoted 1 line
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
Hello,
Quoted 3 lines · Geoffrey Wossum
Quoted 1 line · Khem Raj
Why would avr-linux gdb not work ?
Probably because we set the target tripplet only once, and it's *linux*. (Am I correct?)
Quoted 4 lines
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,
Signature · 1 line
Leon
Quoted 5 lines · Leon Woestenberg
Quoted 3 lines
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
Quoted 5 lines · Geoffrey Wossum
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_OSto 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
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
Quoted 33 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Geoffrey Wossum
Sent: Monday, April 07, 2008 5:54 PM
To: [email protected]
Subject: Re: [oe] Building multiple gdb-cross targetsQuoted 1 line · Geoffrey Wossum
It was easy enough to build the bare metal debugger outside
OE. Just
Quoted 3 lines
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
Quoted 1 line
setting the
TARGET_OSto 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
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 8 lines · Stelios Koroneos
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
Hello,
Quoted 11 lines · Geoffrey Wossum
Quoted 8 lines · Stelios Koroneos
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,
Signature · 1 line
Leon