Was bedeuten diese OpenOCD-CPU-Zustände?

Hier ist, was die Dokumentation zu sagen hat:

— Command: reset
— Command: reset run
— Command: reset halt
— Command: reset init

    Perform as hard a reset as possible, using SRST if possible. All defined
    targets will be reset, and target events will fire during the reset sequence.

    The optional parameter specifies what should happen after the reset. If there is 
    no parameter, a reset run is executed. The other options will not work on all 
    systems. See Reset Configuration.

        run Let the target run
        halt Immediately halt the target
        init Immediately halt the target, and execute the reset-init script 

Von OpenOCD-Befehlen

Ich öffne OpenOCD, dann führe ich in einem anderen Terminal arm-none-eabi-gdb end execute aus, monitor reset haltum das Ziel anzuweisen, den Prozessor zurückzusetzen und anzuhalten, um später Haltepunkte einzurichten und auszuführen.

Die Antwort des Verarbeiters ist jedoch oft unterschiedlich:

(gdb) monitor reset halt
JTAG tap: sam7x512.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
srst pulls trst - can not reset into halted mode. Issuing halt after reset.
target state: halted
target halted in ARM state due to debug-request, current mode: FIQ
cpsr: 0x600000d1 pc: 0x00000050
NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.

Andere Male geht es so:

target state: halted
target halted in ARM state due to debug-request, current mode: Abort
cpsr: 0x600000d7 pc: 0x00000044

Noch ein anderes Mal (innerhalb desselben Laufs habe ich gerade gdb geöffnet und einige Male monitor reset halt ausgeführt):

target state: halted
target halted in ARM state due to debug-request, current mode: Undefined instruction
cpsr: 0x600000db pc: 0x00000038

Was sind das für Zustände?

Führt der Prozessor ein gültiges Programm aus, in dem alle Trap-Handler konfiguriert sind?
Es wurden keine Ereignishandler deklariert.

Antworten (1)

Ich habe mein Problem umgangen. Trotzdem sehr daran interessiert, mehr über diese Zustände zu erfahren!

Ich habe die Verbindung über Port 3333 verpfuscht und die Rohrleitungsfunktionen von openocd verwendet:

.gdbinit

# Open openocd and pipe data throudh stdin/stdout.
# Openocd quits after gdb exits.
target remote | /usr/local/bin/openocd -f linux_config.cfg

openocd.cfg:

gdb_port pipe

Und es hat auf magische Weise funktioniert.