BasedHardware / omi

AI wearables
https://omi.me
MIT License
3.54k stars 420 forks source link

Fresh firmware-1.0 build in VSCode fails with "No prj.conf file(s) was found" #1045

Open bringert opened 2 days ago

bringert commented 2 days ago

Describe the bug A fresh firmware-1.0 build in VSCode with nRF Toolchain v2.7.0 and SDK v2.7.0 fails with "No prj.conf file(s) was found".

Copying prj_xiao_ble_sense_devkitv1.conf to prj.conf fixes the issue.

This seems like either the README file is unclear or missing a configuration step, or something has changed in how the VS Code nRF Connect Extension, toolchain etc works.

To Reproduce Steps to reproduce the behavior:

  1. Install nRF Connect for Visual Studio Code on a Mac using the instructions at https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation/install_ncs.html (setting git config --global http.postBuffer 104857600 to avoid git errors when checking out Zephyr), roughly:
    1. Install nRF Command Line Tools from https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools
    2. Install VS Code from https://code.visualstudio.com/
    3. In VSCode, install the "nRF Connect for VS Code Extension Pack"
    4. Click on the nRF Connect icon in the VSCode sidebar
    5. Manage Toolchains > Install Toolchain > nRF Connect SDK Toolchain v2.7.0
    6. Manager SDKs > Install SDK > v2.7.0
  2. Clone the Omi repo:
    git clone https://github.com/BasedHardware/omi.git
  3. Open Friend/firmware/firmware_v1.0 in VSCode
  4. Click on the nRF Connect icon in the VSCode sidebar
  5. Under Applications > firmware_v1.0, click on Add build configuration
  6. Under CMake Preset, select "Devkit V1 (build_xiao_ble_sense_devkitv1)"
  7. Under Board, select xiao_ble/nrf52840/sense
  8. Click on "Build configuration" at the bottom
  9. See error: No prj.conf file(s) was found in the /Users/bjorn/src/omi/Friend/firmware/firmware_v1.0 folder(s)
Building firmware_v1.0
west build --build-dir /Users/bjorn/src/omi/Friend/firmware/firmware_v1.0/build/build_xiao_ble_sense_devkitv1 /Users/bjorn/src/omi/Friend/firmware/firmware_v1.0 --pristine --board xiao_ble/nrf52840/sense -- -DNCS_TOOLCHAIN_VERSION=NONE -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -DCMAKE_BUILD_TYPE=Debug -DPLATFORM=nrf52840 -DCACHED_CONF_FILE=/Users/bjorn/src/omi/Friend/firmware/firmware_v1.0/prj_xiao_ble_sense_devkitv1.conf -DBOARD_ROOT=/Users/bjorn/src/omi/Friend/firmware/firmware_v1.0

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/bjorn/src/omi/Friend/firmware/firmware_v1.0
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/python@3.9/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/bjorn/Library/Caches/zephyr
-- Zephyr version: 3.6.99 (/opt/nordic/ncs/v2.7.0/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: xiao_ble, qualifiers: nrf52840/sense
CMake Error at /opt/nordic/ncs/v2.7.0/zephyr/cmake/modules/extensions.cmake:2802 (message):
  No prj.conf file(s) was found in the
  /Users/bjorn/src/omi/Friend/firmware/firmware_v1.0 folder(s), please read
  the Zephyr documentation on application development.
Call Stack (most recent call first):
  /opt/nordic/ncs/v2.7.0/zephyr/cmake/modules/configuration_files.cmake:47 (zephyr_file)
  /opt/nordic/ncs/v2.7.0/zephyr/cmake/modules/zephyr_default.cmake:132 (include)
  /opt/nordic/ncs/v2.7.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.7.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/f8037e9b83/opt/python@3.9/bin/python3.9 -B/Users/bjorn/src/omi/Friend/firmware/firmware_v1.0/build/build_xiao_ble_sense_devkitv1 -GNinja -DBOARD=xiao_ble/nrf52840/sense -DNCS_TOOLCHAIN_VERSION=NONE -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -DCMAKE_BUILD_TYPE=Debug -DPLATFORM=nrf52840 -DCACHED_CONF_FILE=/Users/bjorn/src/omi/Friend/firmware/firmware_v1.0/prj_xiao_ble_sense_devkitv1.conf -DBOARD_ROOT=/Users/bjorn/src/omi/Friend/firmware/firmware_v1.0 -S/Users/bjorn/src/omi/Friend/firmware/firmware_v1.0

Expected behavior The build works when following the instructions in the README

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

bringert commented 2 days ago

It looks like the firmware-1.0/README.md file is just incomplete or out of date.

The instructions in docs/_assembly/Compile_firmware.md are better. Maybe the README should just link to that?

bringert commented 2 days ago

Actually, docs/_assembly/Compile_firmware.md is also a bit out of date. It seems to predate the addition of CMakePresets.json.