# 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, use the unified hardware runner # Build and flash to a connected Raspberry Pi Pico (rp2040) examples/hello_bazel $ bazelisk run :hello_bazel \ --platforms=@zephyr//boards/raspberrypi/rpi_pico:rp2040 # Build and flash to a connected Raspberry Pi Pico 2 (rp2350) # Note: Uses an ARM Cortex-M33 image. examples/hello_bazel $ bazelisk run :hello_bazel \ --platforms=@zephyr//boards/raspberrypi/rpi_pico2: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