Forum: Mikrocontroller und Digitale Elektronik OpenOCD 0.4 -> 0.9


von Dirk S. (dirk1000)


Angehängte Dateien:

Lesenswert?

Hallo zusammen,
ich nutze OpenOCD 0.4, openocd-libftdi.exe von wo auch immer, mit dem 
Olimex ARM-USB-OCD-H um einen G45 zu flashen.
Da diese Kombination nicht mehr unter WIN10 64bit läuft, habe ich 
OpenOCD 0.9 geladen und Treiber für den JTAG mit ZADIG 2.7 installiert. 
Das alte Skript läuft nicht durch. Die Ausgabe mit 0.4:

Open On-Chip Debugger 0.4.0....
4 kHz
trst-and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 2000
jtag_ntrst_delay: 2000
Info : max TCK change to: 30000 kHz
Info : clock speed 4 kHz
Info : JTAG tap: at91sam9260.cpu tap/device found 0x0792603f
Info : Embedded ICE version 6
Info : hardware has 2 breakpoint/watchpint units
...
target halted in ARM state due to debug-request, current mode: 
Supervisor
cpsr: 0x200000d3 pc: 0x73f201b0
...
flash 'cfi' found at 0x10000000

Dann über Telnet verbinden und flashen

Mit der Version 0.9 klappt es nicht.

adapter speed: 4 kHz
jtag_nsrst_delay: 2000
jtag_ntrst_delay: 2000
Error: JTAG scan chain interrogation failed: all ones
Error: at91sam9260.cpu: IR capture error, saw 0x0f not 0x01
Info : Embedded ICE version 15
Info : hardware has 2 breakpoint/watchpint units
target state: halted
target halted in ThumbEE state due to debug-request, current mode: 
System
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow 
memory writes. Type 'help dcc'.
Warn : NOTE! Severe performance degradation without fast memory access 
enabled. Type 'help fast'.
  at91sam9260.cpu mww address data [count]
mww ['phys'] address value [count]

Dann endet diese OpenOCD Instanz.

Hat jemand von Euch mehrere Versionen von OpenOCD genutzt und die 
notwendigen Änderungen schrittweise vorgenommen und ist nicht 
gesprungen, so wie ich?

Gibt es die Möglichkeit eine Nachricht auf der Kommandozeile auszugeben, 
als Debughilfe? Ich wieß nicht, an welcher Stelle genau das Skript 
abbricht.

Vielen Dank für jede Hilfe.

von Werner (Gast)


Lesenswert?

Was mir auffällt ist, dass die CPU einmal im Status "System" und einmal 
im Status "Supervisor" angehalten wird... Vielleicht ist das ein 
Unterschied.

Ansonsten hier ein funktionierendes Skript (allerdings für einen älteren 
ARM7)

Vielleicht kannst Du daraus etwas hilfreiches entnehmen:

source [find interface/ftdi/olimex-jtag-tiny.cfg]

# Delays on reset lines
adapter_nsrst_delay 50
jtag_ntrst_delay 1

# Maximum of 1/8 of clock frequency (XTAL = 16 MHz).
# Adaptive clocking through RTCK is not supported.
adapter_khz 500


set HAS_ETB             1
set FLASH_CLOCK         112000

source [find target/lpc2900.cfg]

arm7_9 fast_memory_access enable

# A working area will help speeding the flash programming
$_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 0x2000 
-work-area-backup 0


# Event handlers
$_TARGETNAME configure -event reset-start {
  # Back to the slow JTAG clock
  adapter_khz 1000
}

$_TARGETNAME configure -event reset-init {
  # Flash
  #mww 0x20200010 0x00000007     ;# FBWST: 7 wait states, not chached

  # Use PLL
  #mww 0xFFFF8020 0x00000001     ;# XTAL_OSC_CONTROL: enable, 1-20 MHz
  #mww 0xFFFF8070 0x01000000     ;# SYS_CLK_CONF: Crystal
  #mww 0xFFFF8028 0x00000005     ;# PLL: (power down)
  #mww 0xFFFF8028 0x01060004     ;# PLL: M=7, 2P=2 (power up)
                                 # --> f=112 MHz, fcco=224 MHz
  sleep 100
  #mww 0xFFFF8070 0x02000000     ;# SYS_CLK_CONF: PLL

  # Increase JTAG speed
  #adapter_khz 500
}


proc program_device () {
 # halt the processor
 halt
 wait_halt

 # write file to flash memory
 arm7_9 dcc_downloads enable
 sleep 10
 poll
 flash probe 0

 ### Programm für Ur-Lader programmieren
 program "c:/XXXXXX/XXXXXX/XXXXXX.bin" 0x20000000
 sleep 10

 #start execution of the program just downladed
 reset run
 sleep 10
}

init
reset init
program_device ()
#exit OpenOCD
shutdown

von Dirk S. (dirk1000)


Lesenswert?

Eine Änderung habe ich nicht beschrieben.
Die Zeile:
target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position 
$_TARGETNAME

war vorher

target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position 
$_TARGETNAME -variant arm926ejs

-variant ist nicht mehr bekannt, Fehlermeldung:

embedded:startup.tcl:21: Error: Unknown param: -variant, try one of: 
-type, -event, -work-area-virt, -work-area-phys, -work-area-size, 
-work-area-backup, -endian, -coreid, -chain-position, -dbgbase, or -rtos

Auch -type erzeugt eine Fehlermeldung:

embedded:startup.tcl:21: Error: not settable: -type

Daher habe ich '-variant arm926ejs' rausgenommen.

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.