Forum: Compiler & IDEs AVR32 Cross Compile Problem - Segmentation Fault


von Alex (Gast)


Lesenswert?

Hallo,

ich versuche gerade OpenOCD fuer den AVR32 zu kompilieren. Leider 
bekomme ich bei der Ausfuehrung auf dem AVR32 staendig ein Segmentation 
Fault.

Waere Super wenn ihr mir helfen koenntet! Ich komme so nicht weiter.

Ich habe OpenOCD mit folgenden Befehlen (Cross-)Kompiliert
1
./configure --enable-dummy --host=avr32 --target=avr32 CC=avr32-linux-gcc CFLAGS="-g -O0"
2
make

Ich bekomme folgende Ausgabe von OpenOCD auf dem AVR32
1
openocd: can't resolve symbol
2
'atexit'                                                                           
3
4
Open On-Chip Debugger 1.0 (2009-01-17-19:25)
5
svn:1220M                                                           
6
BUGS? Read
7
http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS                                                 
8
9
$URL:
10
svn://svn.berlios.de/openocd/openocd/branches/openocd_1_0_branch/src/openocd.c
11
$                           
12
Debug:   5 12 configuration.c:88 find_file(): found mechabrick2.cfg                                               
13
Debug:   7 20 command.c:91 script_command(): script_command - telnet_port                                         
14
Debug:   8 21 command.c:108 script_command(): script_command -
15
telnet_port, argv[0]=ocd_telnet_port               
16
Debug:   9 21 command.c:108 script_command(): script_command -
17
telnet_port, argv[1]=4444                         
18
Debug:   11 24 command.c:91 script_command(): script_command -
19
gdb_port                                           
20
Debug:   12 25 command.c:108 script_command(): script_command -
21
gdb_port, argv[0]=ocd_gdb_port                   
22
Debug:   13 26 command.c:108 script_command(): script_command -
23
gdb_port, argv[1]=3333                           
24
Debug:   15 28 command.c:91 script_command(): script_command -
25
interface                                         
26
Debug:   16 29 command.c:108 script_command(): script_command -
27
interface, argv[0]=ocd_interface                 
28
Debug:   17 30 command.c:108 script_command(): script_command -
29
interface, argv[1]=dummy                         
30
Debug:   19 32 command.c:91 script_command(): script_command -
31
jtag_speed                                         
32
Debug:   20 33 command.c:108 script_command(): script_command -
33
jtag_speed, argv[0]=ocd_jtag_speed               
34
Debug:   21 34 command.c:108 script_command(): script_command -
35
jtag_speed, argv[1]=0                             
36
Debug:   22 34 jtag.c:2406 handle_jtag_speed_command(): handle jtag
37
speed                                         
38
User:    23 35 command.c:375 command_print(): jtag_speed:
39
0                                                       
40
Debug:   25 38 command.c:91 script_command(): script_command -
41
reset_config                                       
42
Debug:   26 39 command.c:108 script_command(): script_command -
43
reset_config, argv[0]=ocd_reset_config           
44
Debug:   27 39 command.c:108 script_command(): script_command -
45
reset_config, argv[1]=trst_and_srst               
46
Debug:   28 40 command.c:108 script_command(): script_command -
47
reset_config, argv[2]=srst_pulls_trst             
48
Debug:   30 41 command.c:91 script_command(): script_command -
49
reset_config                                       
50
Debug:   31 42 command.c:108 script_command(): script_command -
51
reset_config, argv[0]=ocd_reset_config           
52
Debug:   32 42 command.c:108 script_command(): script_command -
53
reset_config, argv[1]=trst_and_srst               
54
Debug:   33 43 jtag.c:1741 jim_newtap_cmd(): Creating New Tap, Chip:
55
at91rm9200, Tap: cpu, Dotted: at91rm9200.cpu,s
56
Debug:   34 44 jtag.c:1761 jim_newtap_cmd(): Processing option:
57
-irlen                                           
58
Debug:   35 45 jtag.c:1761 jim_newtap_cmd(): Processing option:
59
-ircapture                                       
60
Debug:   36 46 jtag.c:1761 jim_newtap_cmd(): Processing option:
61
-irmask                                           
62
Debug:   37 46 jtag.c:1761 jim_newtap_cmd(): Processing option:
63
-expected-id                                     
64
Debug:   38 47 jtag.c:1853 jim_newtap_cmd(): Created Tap: at91rm9200.cpu
65
@ abs position 0, irlen 4, capture: 0x1 mf
66
Debug:   39 48 target.c:3950 jim_target(): Target command
67
params:                                                 
68
Debug:   40 49 target.c:3951 jim_target(): target create at91rm9200.cpu
69
arm920t -endian little -chain-position at9
70
Debug:   42 79 command.c:91 script_command(): script_command -
71
init                                               
72
Debug:   43 79 command.c:108 script_command(): script_command - init,
73
argv[0]=ocd_init
74
Segmentation Fault

Ich habe auch versucht, das Programm mit gdb zu Debuggen (vom Host)
1
$ avr32-linux-gdb openocd
2
GNU gdb 6.7.1.atmel.1.0.3
3
Copyright (C) 2007 Free Software Foundation, Inc.
4
License GPLv3+: GNU GPL version 3 or later
5
<http://gnu.org/licenses/gpl.html>
6
This is free software: you are free to change and redistribute it.
7
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
8
and "show warranty" for details.
9
This GDB was configured as "--host=i686-pc-linux-gnu
10
--target=avr32-linux"...
11
(no debugging symbols found)
12
"/home/alex/embedded_linux/openocd/branches/openocd_1_0_branch/src/openocd"
13
is not a core dump: File format not recognized
14
(gdb) target remote 192.168.1.201:3334
15
Remote debugging using 192.168.1.201:3334
16
(no debugging symbols found)
17
0x84b8aa2a in ?? () from /lib/ld-linux.so.2
18
(gdb) continue
19
Continuing.
20
Program received signal SIGSEGV, Segmentation fault.
21
0x00000000 in ?? ()
22
(gdb) where
23
#0  0x00000000 in ?? ()
24
#1  0x223d0000 in ?? ()
25
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Danke.

von Malte (Gast)


Lesenswert?

Hast du beim compilieren -ggdb angegeben um Debugging Symbole zu 
erzeugen?
Ohne jetzt den AVR32 groß zu kennen, könnte es sein, dass das Program 
einfach mehr RAM benötigt als vorhanden und so Daten und Stack Bereiche 
ineinander laufen?

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.