Forum: Mikrocontroller und Digitale Elektronik ARM: OpenOCD Problem


von Daniel D. (Gast)


Lesenswert?

Moin,

ich benutze OpenOCD um einen AT91SAM7 zu flashen und zum debuggen. Das 
ganze unter Linux. Nachdem sich beim Update auf Ubuntu 9.04 das ganze 
System zerschossen hat, bin ich jetzt zur 8.04 zurück und versuche 
OpenOCD wieder zum laufen zu bringen. Wenn ich jetzt versuche mit den 
vorhandenen Konfig-Scripten zu flashen, dann bringt er folgende 
Fehlermeldung:

Error:   arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the 
new JTAG instruction failed, debugging is likely to be broken

Telnet öffnen und Register am Target auslesen geht. Version vom OpenOCD 
ist r211. Ich habe auch mal die neueste Version gesaugt und compiliert, 
da passt dann aber das Script nicht mehr, da sich da wohl einige 
Kommandos geändert haben. Ich würde daher gerne bei der alten Version 
bleiben und den alten Scripts bleiben, da das ja schonmal funktioniert 
hat. Ich habe aber keine Idee mehr, wo ich jetzt dran drehen kann?! 
Anbei noch die config-scripts.

MfG, Daniel
1
#
2
# Flash AT91SAM7S memory using openocd 
3
# and a FTDI FT2232-based JTAG-interface
4
#
5
# created by Martin Thomas 
6
# based on information from Dominic Rath
7
#
8
9
#daemon configuration
10
telnet_port 4444
11
gdb_port 3333
12
13
#interface
14
#interface ft2232
15
#ft2232_device_desc "Amontec JTAGkey A"
16
#ft2232_layout jtagkey
17
#ft2232_vid_pid 0x0403 0xcff8
18
#jtag_speed 0
19
#jtag_nsrst_delay 200
20
#jtag_ntrst_delay 200
21
22
interface ft2232
23
ft2232_device_desc "Dual RS232"
24
ft2232_layout oocdlink
25
ft2232_vid_pid 0x0403 0x6010
26
jtag_speed 4
27
reset_config trst_and_srst
28
29
#use combined on interfaces or targets that can't set TRST/SRST separately
30
#reset_config srst_only srst_pulls_trst
31
32
#jtag scan chain
33
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
34
jtag_device 4 0x1 0xf 0xe
35
36
#target configuration
37
daemon_startup reset
38
39
#target  
40
#target arm7tdmi    
41
target arm7tdmi little run_and_init 0 arm7tdmi
42
run_and_halt_time 0 30
43
44
# flash-options AT91
45
target_script 0 reset flash.script
46
working_area 0 0x00200000 0x4000 nobackup
47
flash bank at91sam7 0 0 0 0 0
48
49
# For more information about the configuration files, take a look at:
50
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

Und hier noch flash.script:
1
# 
2
# The following commands will be executed on
3
# reset (because of run_and_init in the config-file)
4
# - halt target
5
# - init ecr
6
# - flash content of file main.bin into target-memory
7
# - shutdown openocd
8
#
9
# created by Martin Thomas 
10
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
11
# based on information from Dominic Rath 
12
#
13
14
halt
15
sleep 10
16
17
# Init - taken form the script openocd_at91sam7_ecr.script 
18
mww 0xfffffd44 0x00008000  # disable watchdog
19
mww 0xfffffd08 0xa5000001  # enable user reset
20
mww 0xfffffc20 0x00000601  # CKGR_MOR : enable the main oscillator
21
sleep 10
22
mww 0xfffffc2c 0x00481c0e   # CKGR_PLLR: 96.1097 MHz
23
sleep 10
24
mww 0xfffffc30 0x00000007  # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
25
sleep 10
26
mww 0xffffff60 0x003c0100  # MC_FMR: flash mode (FWS=1,FMCN=60)
27
# arm7_9 force_hw_bkpts enable  # program resides in flash
28
29
# AT91SAM7 flash command-"batch"
30
# adapted by Martin Thomas based on information from Dominic Rath - Thanks
31
arm7_9 dcc_downloads enable
32
sleep 10
33
debug_level 3
34
poll
35
flash probe 0
36
flash protect 0 0 15 off
37
flash erase_sector 0 0 15
38
flash write_image bin/blinky2-flash.bin 0x100000 'bin'
39
# also check flash write_image which can be uses together with flash auto_erase on
40
41
reset run
42
sleep 10
43
shutdown

von Daniel D. (Gast)


Lesenswert?

Keiner ne Ahnung, was die Fehlermeldung zu bedeuten hat? Oder wo es 
stehen könnte, was sie zu bedeuten hat? Auf der Homepage gibts zwar ein 
paar Dokumentationen, aber Infos zu den Fehlermeldungen habe ich nicht 
gesehen.

VG, Daniel

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.