Merge branch 'merge_nrf52'

wch-ch32v003
Felix "xq" Queißner 9 months ago
commit 5e44623c5d

2
.gitignore vendored

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

@ -0,0 +1,11 @@
= Nordic nrf5x
HALs and register definitions for nrf5x devices
== What version of Zig to use
Right now we are following https://ziglang.org/download/[master], but once 0.11.0 is released, we will be switching to the latest stable version of Zig.
== Renode supports:
- nrf52840 development kit

@ -0,0 +1,65 @@
const std = @import("std");
fn path(comptime suffix: []const u8) std.Build.LazyPath {
return .{
.cwd_relative = comptime ((std.fs.path.dirname(@src().file) orelse ".") ++ suffix),
};
}
pub const chips = struct {
pub const nrf52840 = .{
.preferred_format = .elf,
.chip = .{
.name = "nrf52840",
.url = "https://www.nordicsemi.com/products/nrf52840",
.cpu = .cortex_m4,
.register_definition = .{
.json = path("/src/chips/nrf52840.json"),
},
.memory_regions = &.{
.{ .offset = 0x00000000, .length = 0x100000, .kind = .flash },
.{ .offset = 0x20000000, .length = 0x40000, .kind = .ram },
// EXTFLASH
.{ .offset = 0x12000000, .length = 0x8000000, .kind = .flash },
// CODE_RAM
.{ .offset = 0x800000, .length = 0x40000, .kind = .ram },
},
},
};
pub const nrf52832 = .{
.preferred_format = .elf,
.chip = .{
.name = "nrf52",
.url = "https://www.nordicsemi.com/products/nrf52832",
.cpu = .cortex_m4,
.register_definition = .{
.json = path("/src/chips/nrf52.json"),
},
.memory_regions = &.{
.{ .offset = 0x00000000, .length = 0x80000, .kind = .flash },
.{ .offset = 0x20000000, .length = 0x10000, .kind = .ram },
},
},
};
};
pub const boards = struct {
pub const nordic = struct {
pub const nRF52840_Dongle = .{
.preferred_format = .elf,
.chip = chips.nrf52840.chip,
.board = .{
.name = "nRF52840 Dongle",
.url = "https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle",
.source_file = path("/src/boards/nrf52840-dongle.zig"),
},
};
};
};
pub fn build(b: *std.build.Builder) void {
_ = b;
}

@ -0,0 +1,5 @@
.{
.name = "microzig-nordic-nrf5x",
.version = "0.1.0",
.dependencies = .{},
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,10 @@
*** Settings ***
Suite Setup Setup
Suite Teardown Teardown
Test Teardown Test Teardown
Resource ${RENODEKEYWORDS}
*** Test Cases ***
Should Print Help
${x}= Execute Command help
Should Contain ${x} Available commands:

@ -0,0 +1,5 @@
const micro = @import("microzig");
pub fn main() void {
// This function will contain the application logic.
}
Loading…
Cancel
Save