Skip to content

Commit

Permalink
Properly export startup logic for espressif-riscv (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
DNedic authored May 20, 2024
1 parent f6e759d commit 6b1efed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bsp/espressif/esp/src/cpus/espressif-riscv.zig
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub const startup_logic = struct {

extern fn microzig_main() noreturn;

export fn _start() linksection("microzig_flash_start") callconv(.C) noreturn {
pub fn _start() linksection("microzig_flash_start") callconv(.C) noreturn {
microzig.cpu.disable_interrupts();
asm volatile ("mv sp, %[eos]"
:
Expand Down Expand Up @@ -103,5 +103,7 @@ pub const startup_logic = struct {
};

pub fn export_startup_logic() void {
// no op as it's already being exported
@export(startup_logic._start, .{
.name = "_start",
});
}

0 comments on commit 6b1efed

Please sign in to comment.