blob: ecf685d04458d003a07d1c3c4d43fdc1e2518619 [file] [log] [blame]
// Copyright 2020 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
syntax = "proto2";
package pw.cpu_exception.cortex_m;
message ArmV7mCpuState {
optional uint32 pc = 1;
optional uint32 lr = 2;
optional uint32 psr = 3;
optional uint32 msp = 4;
optional uint32 psp = 5;
optional uint32 exc_return = 6;
optional uint32 cfsr = 7;
optional uint32 msplim = 27;
optional uint32 psplim = 28;
optional uint32 mmfar = 8;
optional uint32 bfar = 9;
optional uint32 icsr = 10;
optional uint32 hfsr = 25;
optional uint32 shcsr = 26;
optional uint32 control = 11;
// General purpose registers.
optional uint32 r0 = 12;
optional uint32 r1 = 13;
optional uint32 r2 = 14;
optional uint32 r3 = 15;
optional uint32 r4 = 16;
optional uint32 r5 = 17;
optional uint32 r6 = 18;
optional uint32 r7 = 19;
optional uint32 r8 = 20;
optional uint32 r9 = 21;
optional uint32 r10 = 22;
optional uint32 r11 = 23;
optional uint32 r12 = 24;
// Next tag: 29
}
// This message overlays the pw.snapshot.Snapshot proto. It's valid to encode
// this message to the same sink that a Snapshot proto is being written to.
message SnapshotCpuStateOverlay {
// TODO(amontanez): Rename this to be Cortex-M arch generic, e.g.:
// optional CpuState cpu_state = 20;
optional ArmV7mCpuState armv7m_cpu_state = 20;
}