It generates a 'bash script' which it runs, with the 'source' command to activate the virtual environment included, does what it needs to do, and, when it exits, my terminal environment remains how it normally is. Something like this -Based on your tools for the Pico environment?I have a 'zephyr-make' app which builds Zephyr code without needing to manually activate anything and I guess I'll be adding 'zephyr-config' as well.
Code:
#!/usr/bin/bashsource ~/pico/zephyrproject/.venv/bin/activatewest build -t menuconfigUsing the same technique to generate a file to build my code, to save me having to activate the virtual environment and type a humongous command line when using the same compiler as Pico SDK uses -
Code:
#!/usr/bin/bash# ***************************************************************************# * *# * Zephyr build file for rpi_pico 2025-09-12 20:13:27 *# * *# * /tmp/zephyr-samples_basic_blinky-rpi_pico.sh *# * *# ***************************************************************************# * *# * Path = ~/pico/zephyrproject/zephyr *# * *# * Project = samples_basic_blinky *# * *# * Target = Raspberry Pi Pico *# * *# * Source = samples/basic/blinky *# * Output = build *# * Board = rpi_pico *# * *# * Clean = always *# * Compiler = /usr/bin/arm-none-eabi- *# * Library = /usr/lib/arm-none-eabi/newlib *# * *# ***************************************************************************# * *# * -p always Pristine build "always", "auto" or never" *# * -b rpi_pico Board name "rpi_pico", "rpi_pico2", etc *# * -d build Build directory "build", "build-pico2", etc *# * -S cdc-acm-console Snippets "cdc-acm-console", etc *# * -D CONFIG_USB_D... Extra options "CONFIG_GPIO=y", etc *# * *# ***************************************************************************source ~/pico/zephyrproject/.venv/bin/activateZEPHYR_TOOLCHAIN_VARIANT=cross-compile \CROSS_COMPILE=/usr/bin/arm-none-eabi- \west build \ -p always \ -d build \ -b rpi_pico \ -S cdc-acm-console \ samples/basic/blinky \ -- \ -DCONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y \ -DSYSROOT_DIR=/usr/lib/arm-none-eabi/newlibStatistics: Posted by hippy — Fri Sep 12, 2025 7:26 pm