For Day 1, go here. The series is tagged advent-2025.
For Box 2 in the calendar, we get an LED, a resistor and a pair of jumper leads. We can connect those up:

And type these lines into the REPL:
place struct { uint32@0x014 gpio_out_set; uint32@0x024 gpio_oe_set; } @xd0000000 sio_hw;
place struct { struct { uint32@0x4 ctrl; }[30] gpio; } @x40014000 io_bank0;
const block_led = 0d14;
const gpio_field = 0x1 << block_led;
poke io_bank0.gpio[block_led].ctrl, 0d5;
poke sio_hw.gpio_oe_set, gpio_field;
poke sio_hw.gpio_out_set, gpio_field;
This is almost the same as hello_led, but I have removed a couple of the constant definitions, to minimise typing.
Of course, typing line-by-line will get old quick, so we need a way to load a whole Yarg file at once. That’s the job of hostyarg, which currently requires go to be installed. This tool will take an existing Yarg uf2 file and add a Yarg file to it.
So head over to the go website, and install go for your O/S. Follow the release README to then install hostyarg.
Once you have that, you’ll want to flash an LED like the MicroPython folks. Let’s stop poking raw registers for GPIO, and use a library. In fact we’ll use two – one for GPIO (called, ‘gpio’!), and one for a sleep function (‘timer’).
Here’s the file (flash.ya) in full, and it’s in this GitHub repo:
import("gpio");
import("timer");
const blocky_LED = 0d14;
gpio_init(blocky_LED);
gpio_set_direction(blocky_LED, GPIO_OUT);
var n = 4;
while (n > 0) {
gpio_put(blocky_LED, !gpio_get(blocky_LED));
sleep_ms(500);
n = n - 1;
}
Yarg files are plain text (officially utf8, but ascii will be fine for this example).
We need to use hostyarg to add it to the uf2 from the release. First we make a copy (I’ll assume you’re using the repo’s file structure), and then add the file:
% cd box2
% cp ../yarg-lang-pico-0.2.1/yarg-lang-pico-0.2.0.uf2 box2.uf2
% hostyarg addfile -fs box2.uf2 -add flash.ya
box2.uf2 now can be flashed onto the pico in the usual way. Once that boots up, and presents the > prompt (maybe press return to get it), use the import function to run it:
> import("flash");
And we see the LED flash! That’s it for box2.
You’ll see a box2.uf2 in the repo if you can’t get hostyarg working. If you want to edit the flash.ya file, you’ll need to copy the base uf2 and use addle each time. There’s no way to edit an existing file at this time.