Skip to content

Commit

Permalink
cortex M3 (CMSIS) stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Tralamazza committed Jun 20, 2019
1 parent e9593be commit 04b2875
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions core_cm3.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const SCB_t = packed struct {
CPUID: u32,
ICSR: u32,
VTOR: u32,
AIRCR: u32,
SCR: u32,
CCR: u32,
SHP: [12]u8,
SHCSR: u32,
CFSR: u32,
HFSR: u32,
DFSR: u32,
MMFAR: u32,
BFAR: u32,
AFSR: u32,
PFR: [2]u32,
DFR: u32,
ADR: u32,
MMFR: [4]u32,
ISAR: [5]u32,
};

const SCS_BASE = 0xE000E000;
const SCB_BASE = SCS_BASE + 0x0D00;

pub const SCB = @intToPtr(*volatile SCB_t, SCB_BASE);

0 comments on commit 04b2875

Please sign in to comment.