Skip to content

Commit

Permalink
cortex-m0plus and fix for missing hal (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnite authored May 27, 2022
1 parent c418db5 commit d253056
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/microzig.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub const board = if (config.has_board) @import("board") else void;
/// Provides access to the low level features of the CPU.
pub const cpu = @import("cpu");

pub const hal = @import("hal");

/// Module that helps with interrupt handling.
pub const interrupts = @import("interrupts.zig");

Expand Down
11 changes: 11 additions & 0 deletions src/modules/cpus.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ pub const avr5 = Cpu{
},
};

pub const cortex_m0plus = Cpu{
.name = "ARM Cortex-M0+",
.path = root_path ++ "cpus/cortex-m/cortex-m.zig",
.target = std.zig.CrossTarget{
.cpu_arch = .thumb,
.cpu_model = .{ .explicit = &std.Target.arm.cpu.cortex_m0plus },
.os_tag = .freestanding,
.abi = .none,
},
};

pub const cortex_m3 = Cpu{
.name = "ARM Cortex-M3",
.path = root_path ++ "cpus/cortex-m/cortex-m.zig",
Expand Down

0 comments on commit d253056

Please sign in to comment.