From 08e7d5b01a8ca6a53e3892f763507f1ff3b07725 Mon Sep 17 00:00:00 2001 From: Matt Knight Date: Tue, 28 Feb 2023 01:44:59 -0800 Subject: [PATCH] add check for void for microzig.hal (#112) * add check for void for microzig.hal * modify github actions to run on every push --- .github/workflows/build.yml | 5 ----- src/modules/cpus/cortex-m.zig | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57245c8..f41ccca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,6 @@ name: Build on: push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: "0 0 * * *" jobs: build: diff --git a/src/modules/cpus/cortex-m.zig b/src/modules/cpus/cortex-m.zig index 4802e9d..3338ff3 100644 --- a/src/modules/cpus/cortex-m.zig +++ b/src/modules/cpus/cortex-m.zig @@ -84,7 +84,7 @@ fn is_valid_field(field_name: []const u8) bool { const VectorTable = if (@hasDecl(root, "microzig_options") and @hasDecl(root.microzig_options, "VectorTable")) root.microzig_options.VectorTable -else if (@hasDecl(microzig.hal, "VectorTable")) +else if (microzig.hal != void and @hasDecl(microzig.hal, "VectorTable")) microzig.hal.VectorTable else microzig.chip.VectorTable;