# Build the application for robokit1 examples/hello_bazel $ bazelisk build :hello_bazel \ --platforms=@zephyr//boards/tdk/robokit1:same70q21b # Test the native_sim build, which can run on the host examples/hello_bazel $ bazelisk test :hello_bazel_native_sim_test \ --platforms=@zephyr//boards/native/native_sim:native # For Pico and Pico 2 targets, there are some additional useful helpers # Build and flash to a connected Raspberry Pi Pico (rp2040) or Pico 2 examples/hello_bazel $ bazelisk run :flash_rp2040 # Build and flash to a connected Raspberry Pi Pico 2 (rp2350) # Note: Uses an ARM Cortex-M33 image. examples/hello_bazel $ bazelisk run :flash_rp2350a_m33 # Build, flash, and tail the debug UART output. examples/hello_bazel $ bazelisk run :run_rp2040 # or run_rp2350a_m33 # Build the Pico image and perform some basic validation checks that it should # boot. examples/hello_bazel $ bazelisk test :verify_rp2040 # or verify_rp2350a_m33
Some files like autoconf.h and kobj-types-enum.h are generated by the Zephyr build process. While that has been replicated by the Bazel build, if needed those files can be generated as part of the Zephyr build toolchain using, and listed with:
$ west build -p -b robokit1 samples/cpp/hello_world $ ls ./build/zephyr/include/generated/zephyr
(Just be sure to use the same SHA for Zephyr as in MODULE.bazel)
Using a build log we can scan to see which files were generated using:
grep -oP '\-o [\w_\-+/\.]+\.o(bj)?' ${log_file} | sort -u