1// Copyright 2020 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14syntax = "proto2";
15
16package pw.cpu_exception.cortex_m;
17
18message ArmV7mCpuState {
19  optional uint32 pc = 1;
20  optional uint32 lr = 2;
21  optional uint32 psr = 3;
22  optional uint32 msp = 4;
23  optional uint32 psp = 5;
24  optional uint32 exc_return = 6;
25  optional uint32 cfsr = 7;
26  optional uint32 mmfar = 8;
27  optional uint32 bfar = 9;
28  optional uint32 icsr = 10;
29  optional uint32 hfsr = 25;
30  optional uint32 shcsr = 26;
31  optional uint32 control = 11;
32
33  // General purpose registers.
34  optional uint32 r0 = 12;
35  optional uint32 r1 = 13;
36  optional uint32 r2 = 14;
37  optional uint32 r3 = 15;
38  optional uint32 r4 = 16;
39  optional uint32 r5 = 17;
40  optional uint32 r6 = 18;
41  optional uint32 r7 = 19;
42  optional uint32 r8 = 20;
43  optional uint32 r9 = 21;
44  optional uint32 r10 = 22;
45  optional uint32 r11 = 23;
46  optional uint32 r12 = 24;
47
48  // Next tag: 27
49}
50