Skip to content

Commit 0506a14

Browse files
committed
Fix build on some boards due to not directly using printf library
1 parent 9548056 commit 0506a14

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

build.zig

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const stdio: pico.Stdio = .{
1414

1515
/// Libraries to link
1616
const link_libs_base = &[_]pico.Lib{
17+
pico.api.runtime.pico.printf,
1718
pico.api.high_level.stdlib,
1819
};
1920

src/sdk.zig

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const pico = @cImport({
44
});
55

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

0 commit comments

Comments
 (0)