Update microzig (#18)

* update microzig

* update cpu

---------

Co-authored-by: mattnite <mattnite@users.noreply.github.com>
wch-ch32v003
Matt Knight 1 year ago committed by GitHub
parent 5e5e11c80f
commit e8cf979268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
deps/microzig vendored

@ -1 +1 @@
Subproject commit 658648b86ba63762ac45665abe0a06ec279225b1 Subproject commit b5edf6da6b540215f03689c3cc07d00478255f7d

@ -29,11 +29,11 @@ pub inline fn clearStatusBit(comptime reg: StatusRegister, bits: u32) void {
); );
} }
pub inline fn cli() void { pub inline fn disable_interrupts() void {
clearStatusBit(.mstatus, 0x08); clearStatusBit(.mstatus, 0x08);
} }
pub inline fn sei() void { pub inline fn enable_interrupts() void {
setStatusBit(.mstatus, 0x08); setStatusBit(.mstatus, 0x08);
} }
@ -62,7 +62,7 @@ pub const startup_logic = struct {
extern fn microzig_main() noreturn; extern fn microzig_main() noreturn;
export fn _start() linksection("microzig_flash_start") callconv(.Naked) noreturn { export fn _start() linksection("microzig_flash_start") callconv(.Naked) noreturn {
microzig.cpu.cli(); microzig.cpu.disable_interrupts();
asm volatile ("mv sp, %[eos]" asm volatile ("mv sp, %[eos]"
: :
: [eos] "r" (@as(u32, microzig.config.end_of_stack)), : [eos] "r" (@as(u32, microzig.config.end_of_stack)),

Loading…
Cancel
Save