Skip to content

Commit 9488be8

Browse files
committed
Build esp examples and rework stack tracing
Vendor parts of StackIterator that use fp based stack tracing
1 parent 6c280e2 commit 9488be8

13 files changed

Lines changed: 212 additions & 972 deletions

File tree

build.zig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ pub fn MicroBuild(port_select: PortSelect) type {
317317

318318
/// Dwarf format option for the firmware executable.
319319
dwarf_format: ?std.dwarf.Format = null,
320+
321+
/// Whether to omit the stack frame pointer.
322+
omit_frame_pointer: ?bool = null,
320323
};
321324

322325
/// Creates a new firmware for a given target.
@@ -399,7 +402,7 @@ pub fn MicroBuild(port_select: PortSelect) type {
399402
cpu_mod.addImport("microzig", core_mod);
400403
core_mod.addImport("cpu", cpu_mod);
401404

402-
const regz_exe = b.dependency("tools/regz", .{ .optimize = .Debug }).artifact("regz");
405+
const regz_exe = b.dependency("tools/regz", .{ .optimize = .ReleaseSafe }).artifact("regz");
403406
const chip_source = switch (target.chip.register_definition) {
404407
.atdf, .svd => |file| blk: {
405408
const regz_run = b.addRunArtifact(regz_exe);
@@ -505,6 +508,7 @@ pub fn MicroBuild(port_select: PortSelect) type {
505508
.unwind_tables = options.unwind_tables,
506509
.error_tracing = options.error_tracing,
507510
.dwarf_format = options.dwarf_format,
511+
.omit_frame_pointer = options.omit_frame_pointer,
508512
}),
509513
.linkage = .static,
510514
}),

0 commit comments

Comments
 (0)