Skip to content

Commit

Permalink
default to secure image mode so it works to flash it
Browse files Browse the repository at this point in the history
  • Loading branch information
tact1m4n3 committed Jan 23, 2025
1 parent 3e7ff4d commit 66b1f25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions port/raspberrypi/rp2xxx/src/hal/image_def.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Cpu = enum(u3) {
riscv = 1,
};

const security: Security = if (@hasDecl(app, "image_def_security")) app.image_def_security else .non_secure;
const security: Security = if (@hasDecl(app, "image_def_security")) app.image_def_security else .secure;
const cpu: Cpu = std.meta.stringToEnum(Cpu, @tagName(arch)).?;

const image_def = init();
Expand All @@ -29,7 +29,7 @@ comptime {
fn init() [5]u32 {
return .{
0xffffded3,
0x10010142 | (@as(u32, @intFromEnum(security)) << 21) | (@as(u32, @intFromEnum(cpu)) << 24),
0x10010142 | (@as(u32, @intFromEnum(security)) << 20) | (@as(u32, @intFromEnum(cpu)) << 24),
0x000001ff,
0x00000000,
0xab123579,
Expand Down

0 comments on commit 66b1f25

Please sign in to comment.