gdb fuer avr Programmierung

Gast #276625
Lesenswert?
• ▲
▼
Hallo zusammen,

ich moechte mit dem Gnu Debugger meine Programme checken nur leider
habe ich bei der Installation so meine Probleme. Da ich von Linux nicht
die grosse Ahnung habe, beschreibe ich euch mal den Weg den ich gegangen
bin, vielleicht hat jemand eine Idee ...

gdb-6.4 runterladen, entpacken, in Verzeichnis /temporary/gdb-6.4,
verschieben,

Ordner /temporary/gdb anlegen, in den Ordner wechseln,
Pfad legen export PATH=/usr/local/avr/bin:$PATH,

dann ../gdb-6.4/configure --target=avr --prefix=/usr/local/avr

wenn ich nun das make-File ausfuehre kommt die Fehlermeldung

gcc -c -g -O2     -I. -I../../gdb-6.4/gdb -I../../gdb-6.4/gdb/config
-DLOCALEDIR="\"/usr/local/avr/share/locale\"" -DHAVE_CONFIG_H
-I../../gdb-6.4/gdb/../include/opcode
-I../../gdb-6.4/gdb/../readline/.. -I../bfd -I../../gdb-6.4/gdb/../bfd
-I../../gdb-6.4/gdb/../include -I../intl -I../../gdb-6.4/gdb/../intl
-DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs
-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral
-Wunused-label -Wunused-function -Wuninitialized
../../gdb-6.4/gdb/tui/tui-command.c
In file included from ../../gdb-6.4/gdb/tui/tui-command.c:28:
../../gdb-6.4/gdb/tui/tui-data.h:40: error: syntax error before
‘WINDOW’
../../gdb-6.4/gdb/tui/tui-data.h:40: warning: no semicolon at end of
struct or union
../../gdb-6.4/gdb/tui/tui-data.h:52: error: syntax error before ‘}’
token
../../gdb-6.4/gdb/tui/tui-data.h:228: error: field ‘data_window’ has
incomplete type
../../gdb-6.4/gdb/tui/tui-data.h:282: error: field ‘generic’ has
incomplete type

was mir nach einem Fehler in tui-command.c scheint, aber dass will ich
nicht so recht glauben ;-)

Auf Hinweise und Anmerkungen jeder Art freut sich

Poseidonius
#276628
Lesenswert?
• ▲
▼
Hab jetzt das WINDOW kaputtgemacht:

In file included from ../../gdb/tui/tui-command.c:28:
../../gdb/tui/tui-data.h:40: error: syntax error before "WFFINDOW"
../../gdb/tui/tui-data.h:40: warning: no semicolon at end of struct or
union
../../gdb/tui/tui-data.h:52: error: syntax error before '}' token
../../gdb/tui/tui-data.h:228: error: field `data_window' has
incomplete type
../../gdb/tui/tui-data.h:282: error: field `generic' has incomplete
type
make[2]: *** [tui-command.o] Fehler 1

Also kennt er das WINDOW nicht, das gehört aber m.W. zu ncurses.

Mach mal wie in der Installanleitung der avr-libc beschrieben ein
obj-avr Verzeichnis und da drin ein:

../configure --prefix=$PREFIX --target=avr
dann nochmal "make"

Wenns wieder passiert mach:

cd gdb
grep CURSES config.h
Bei mir kommt:

ganter@fritz:~/mikrocontroller/toolchain/gdb-6.4/obj-avr/gdb> grep
CURSES config.h
/* #undef HAVE_CURSESX_H */
#define HAVE_CURSES_H 1
#define HAVE_NCURSES_H 1
/* #undef HAVE_NCURSES_NCURSES_H */
/* #undef HAVE_NCURSES_TERM_H */


Also bei mir hat er NCURSES, bei dir auch?
Gast #276629
Lesenswert?
• ▲
▼
Ok, sorry wenn ich mich ein bisschen prasslig anstelle ...

ich habe die Schritte wie unter

http://www.nongnu.org/avr-libc/user-manual/install_tools.html

beschrieben durchgefuehrt und nach

./configure --build=`./config.guess` --host=avr --prefix=$PREFIX

ist nach "make" Schluss bei

onfig.status: executing default commands
make[2]: Entering directory `/temporary/gdb-6.4/libiberty'
if [ x"" != x ]; then \
  avr-gcc -c -DHAVE_CONFIG_H -g -O2  -I. -I.././libiberty/../include
-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes
.././libiberty/cplus-dem.c -o pic/cplus-dem.o; \
else true; fi
avr-gcc -c -DHAVE_CONFIG_H -g -O2  -I. -I.././libiberty/../include  -W
-Wall -pedantic -Wwrite-strings -Wstrict-prototypes
.././libiberty/cplus-dem.c -o cplus-dem.o
.././libiberty/cplus-dem.c:48:23: error: sys/types.h: No such file or
directory
.././libiberty/cplus-dem.c: In function 'demangle_prefix':
.././libiberty/cplus-dem.c:2652: warning: implicit declaration of
function 'strspn'
.././libiberty/cplus-dem.c:2652: warning: incompatible implicit
declaration of built-in function 'strspn'
.././libiberty/cplus-dem.c: In function 'gnu_special':
.././libiberty/cplus-dem.c:2849: warning: implicit declaration of
function 'strcspn'
.././libiberty/cplus-dem.c:2849: warning: incompatible implicit
declaration of built-in function 'strcspn'
.././libiberty/cplus-dem.c:2855: warning: implicit declaration of
function 'strpbrk'
.././libiberty/cplus-dem.c:2855: warning: incompatible implicit
declaration of built-in function 'strpbrk'
.././libiberty/cplus-dem.c:2875: warning: incompatible implicit
declaration of built-in function 'strpbrk'
make[2]: *** [cplus-dem.o] Error 1
make[2]: Leaving directory `/temporary/gdb-6.4/libiberty'
make[1]: *** [all-libiberty] Error 2
make[1]: Leaving directory `/temporary/gdb-6.4'
make: *** [all] Error 2

????

Antwort schreiben

Hinweis: der ursprüngliche Beitrag ist mehr als 6 Monate alt. Bitte hier nur auf die ursprüngliche Frage antworten, für neue Fragen einen neuen Beitrag erstellen.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.