Skip to content

Commit

Permalink
Fix build on some boards due to not directly using printf library
Browse files Browse the repository at this point in the history
  • Loading branch information
playday3008 committed Jan 14, 2025
1 parent 9548056 commit 0506a14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const stdio: pico.Stdio = .{

/// Libraries to link
const link_libs_base = &[_]pico.Lib{
pico.api.runtime.pico.printf,
pico.api.high_level.stdlib,
};

Expand Down
1 change: 1 addition & 0 deletions src/sdk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const pico = @cImport({
});

pub usingnamespace @cImport({
@cInclude("pico/printf.h");
@cInclude("pico/stdlib.h");
// Pico W devices use a GPIO on the WIFI chip for the LED,
// so when building for Pico W, CYW43_WL_GPIO_LED_PIN will be defined
Expand Down

0 comments on commit 0506a14

Please sign in to comment.