initial commit

wch-ch32v003
Matt Knight 10 months ago
parent 5e2fe60e2d
commit 6dcf11cd30

2
.gitignore vendored

@ -0,0 +1,2 @@
zig-out
zig-cache

@ -0,0 +1,19 @@
Copyright (c) 2022 Zig Embedded Group Contributors
This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use
of this software.
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to
the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product, an
acknowledgment in the product documentation would be appreciated but is not
required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

@ -1 +1,7 @@
# microchip-atsam # microchip-atsam
HALs and register definitions for Microchip ATSAM devices
## What version of Zig to use
0.11.0

@ -0,0 +1,29 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
_ = b;
// Dummy func to make package manager happy
}
fn root() []const u8 {
return comptime (std.fs.path.dirname(@src().file) orelse ".");
}
const build_root = root();
pub const chips = struct {
pub const atsamd51j19 = .{
.name = "ATSAMD51J19A",
.url = "https://www.microchip.com/en-us/product/ATSAMD51J19A",
.cpu = .cortex_m4,
.register_definition = .{
.atdf = .{ .path = build_root ++ "src/chips/ATSAMD51J19A.atdf" },
},
.memory_regions = &.{
.{ .kind = .flash, .offset = 0x00004000, .length = 512 * 1024 }, // Embedded Flash
.{ .kind = .ram, .offset = 0x20000000, .length = 192 * 1024 }, // Embedded SRAM
.{ .kind = .ram, .offset = 0x47000000, .length = 8 * 1024 }, // Backup SRAM
.{ .kind = .flash, .offset = 0x00804000, .length = 512 }, // NVM User Row
},
};
};

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save