Forum: Mikrocontroller und Digitale Elektronik gdb fuer avr Programmierung


von Poseidonius (Gast)


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

von Fritz G. (fritzg)


Lesenswert?

Bei mir gehts.

Ich vermute dass da bei der curses Installation was nicht stimmt,
installier mal das Paket für ncurses (bzw. das devel-Paket).

von Poseidonius (Gast)


Lesenswert?

yum install ncurses / devel

brachte die Meldung dass die aktuellesten Versionen installiert sind.
Reicht das aus um deinen Verdacht zu untersuchen?

Poseidonius

von Fritz G. (fritzg)


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?

von Poseidonius (Gast)


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

????

von Fritz G. (fritzg)


Lesenswert?

../configure --prefix=$PREFIX --target=avr heisst es.

Du hast nicht das gemacht was unter gdb steht, sonder unter avr-libc.

gdb steht darunter :-)

von Poseidonius (Gast)


Lesenswert?

erst mal vielen Dank, Du hast natuerlich richtig gelegen ...
Mit yum install ncurses-devel eingebaut und schon funktionierts ...

Noch mal Danke

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.