Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8051

Zephyr • Re: Very timely addition

$
0
0
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.
Based on your tools for the Pico environment?
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 -

Code:

#!/usr/bin/bashsource ~/pico/zephyrproject/.venv/bin/activatewest build -t menuconfig
I edited out my 'but that's not working' tale of woe because I had 'menueditor' not 'menuconfig' in that file. With the correct name provided it works perfectly.

Using 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/newlib

Statistics: Posted by hippy — Fri Sep 12, 2025 7:26 pm



Viewing all articles
Browse latest Browse all 8051

Trending Articles