firefly / pixie-firmware

Firefly Pixie Firmware.
5 stars 2 forks source link

How do I build this? #1

Open eliotstock opened 1 month ago

eliotstock commented 1 month ago

cmake output:

cmake .
CMake Error at CMakeLists.txt:5 (include):
  include could not find requested file:

    /tools/cmake/project.cmake

-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!

From this line, it looks like I need to define IDF_PATH. But what is that?

eliotstock commented 1 month ago

Oh I see, I need this:

https://docs.espressif.com/projects/esp-idf/en/v3.3.5/get-started-cmake/index.html#get-started-setup-toolchain-cmake

ricmoo commented 1 month ago

Oh yes. Thanks for the reminder to add docs on getting started with the Firefly firmware.

We’re also working on a much easier solution than configuring the ESP-IDF yourself.

As a quick question, were you able to get it installed and building? I’d love to hear any info about pain points.

eliotstock commented 1 month ago

No worries. Nope, I hit the next error, which was about simply calling python being ambiguous on a host with pyenv:

cmake .
-- Checking Python dependencies...
pyenv: python: command not found

The `python' command exists in these Python versions:
  2.7.15
  3.9.15
  3.9.15/envs/keyboard
  3.9.15/envs/token
  3.9.15/envs/ts
  3.9.15/envs/venv2
  keyboard
  token
  ts
  venv2

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.
CMake Error at /home/e/r/nm/esp-idf/tools/cmake/idf_functions.cmake:40 (message):
  Some Python dependencies must be installed.  Check above message for
  details.
Call Stack (most recent call first):
  /home/e/r/nm/esp-idf/tools/cmake/project.cmake:5 (include)
  CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!
yuetloo commented 2 weeks ago

@eliotstock Can you try using docker to build the firmware? You'll need the changes in https://github.com/firefly/pixie-firmware/pull/2

docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py build
eliotstock commented 2 weeks ago

I got further but the build didn't finish:

docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py build
Unable to find image 'espressif/idf:latest' locally
latest: Pulling from espressif/idf
31e907dcc94a: Pull complete
a7583c9868ca: Pull complete
b0da15886f19: Pull complete
e08cd113d61a: Pull complete
ac6c1705d87b: Pull complete
876a23481449: Pull complete
451c2b1d5c4b: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:2a6239493cba22576b3bbb7882dd7ebec44eca538a3c8980cfb6019f3e4f474d
Status: Downloaded newer image for espressif/idf:latest
Detecting the Python interpreter
Checking "python3" ...
Python 3.12.3
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
Adding ESP-IDF tools to PATH...
Checking if Python packages are up to date...
Python requirements are satisfied.
Requirement files:
 - /opt/esp/idf/tools/requirements/requirements.core.txt
Python being checked: /opt/esp/python_env/idf5.4_py3.12_env/bin/python
Added the following directories to PATH:
  /opt/esp/idf/components/espcoredump
  /opt/esp/idf/components/partition_table
  /opt/esp/idf/components/app_update
  /opt/esp/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin
  /opt/esp/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin
  /opt/esp/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin
  /opt/esp/tools/riscv32-esp-elf/esp-13.2.0_20240530/riscv32-esp-elf/bin
  /opt/esp/tools/esp32ulp-elf/2.38_20240113/esp32ulp-elf/bin
  /opt/esp/tools/cmake/3.24.0/bin
  /opt/esp/tools/openocd-esp32/v0.12.0-esp32-20240726/openocd-esp32/bin
  /opt/esp/tools/qemu-xtensa/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/tools/qemu-riscv32/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin
  /opt/esp/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin
  /opt/esp/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin
  /opt/esp/tools/riscv32-esp-elf/esp-13.2.0_20240530/riscv32-esp-elf/bin
  /opt/esp/tools/esp32ulp-elf/2.38_20240113/esp32ulp-elf/bin
  /opt/esp/tools/cmake/3.24.0/bin
  /opt/esp/tools/openocd-esp32/v0.12.0-esp32-20240726/openocd-esp32/bin
  /opt/esp/tools/qemu-xtensa/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/tools/qemu-riscv32/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/python_env/idf5.4_py3.12_env/bin
  /opt/esp/idf/tools
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build

CMake Error: The current CMakeCache.txt directory /project/CMakeCache.txt is different than the directory /home/e/r/nm/pixie-firmware where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
HINT: Run 'idf.py fullclean' and try the build again.
cmake failed with exit code 1, output of the command is in the /project/build/log/idf_py_stderr_output_130 and /project/build/log/idf_py_stdout_output_130
Executing action: all (aliases: build)
Running cmake in directory /project/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/opt/esp/python_env/idf5.4_py3.12_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 /project"...
yuetloo commented 2 weeks ago

Oh, if there’s a build folder created previously, try to remove it first.. which is what ‘ idf.py fullclean’ would do as suggested in the hint below.. On Aug 27, 2024, at 12:04 AM, Eliot Stock @.***> wrote: I got further but the build didn't finish: docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py build Unable to find image 'espressif/idf:latest' locally latest: Pulling from espressif/idf 31e907dcc94a: Pull complete a7583c9868ca: Pull complete b0da15886f19: Pull complete e08cd113d61a: Pull complete ac6c1705d87b: Pull complete 876a23481449: Pull complete 451c2b1d5c4b: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:2a6239493cba22576b3bbb7882dd7ebec44eca538a3c8980cfb6019f3e4f474d Status: Downloaded newer image for espressif/idf:latest Detecting the Python interpreter Checking "python3" ... Python 3.12.3 "python3" has been detected Checking Python compatibility Checking other ESP-IDF version. Adding ESP-IDF tools to PATH... Checking if Python packages are up to date... Python requirements are satisfied. Requirement files:

CMake Error: The current CMakeCache.txt directory /project/CMakeCache.txt is different than the directory /home/e/r/nm/pixie-firmware where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt HINT: Run 'idf.py fullclean' and try the build again. cmake failed with exit code 1, output of the command is in the /project/build/log/idf_py_stderr_output_130 and /project/build/log/idf_py_stdout_output_130 Executing action: all (aliases: build) Running cmake in directory /project/build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/opt/esp/python_env/idf5.4_py3.12_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 /project"...

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

eliotstock commented 2 weeks ago

OK, it builds.

Running fullclean didn't actually work, but I grabbed a fresh working directory and switched to that PR branch and it builds from there.

The fullclean result, fwiw:

docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py fullclean
Detecting the Python interpreter
Checking "python3" ...
Python 3.12.3
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
Adding ESP-IDF tools to PATH...
Checking if Python packages are up to date...
Python requirements are satisfied.
Requirement files:
 - /opt/esp/idf/tools/requirements/requirements.core.txt
Python being checked: /opt/esp/python_env/idf5.4_py3.12_env/bin/python
Added the following directories to PATH:
  /opt/esp/idf/components/espcoredump
  /opt/esp/idf/components/partition_table
  /opt/esp/idf/components/app_update
  /opt/esp/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin
  /opt/esp/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin
  /opt/esp/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin
  /opt/esp/tools/riscv32-esp-elf/esp-13.2.0_20240530/riscv32-esp-elf/bin
  /opt/esp/tools/esp32ulp-elf/2.38_20240113/esp32ulp-elf/bin
  /opt/esp/tools/cmake/3.24.0/bin
  /opt/esp/tools/openocd-esp32/v0.12.0-esp32-20240726/openocd-esp32/bin
  /opt/esp/tools/qemu-xtensa/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/tools/qemu-riscv32/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin
  /opt/esp/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin
  /opt/esp/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin
  /opt/esp/tools/riscv32-esp-elf/esp-13.2.0_20240530/riscv32-esp-elf/bin
  /opt/esp/tools/esp32ulp-elf/2.38_20240113/esp32ulp-elf/bin
  /opt/esp/tools/cmake/3.24.0/bin
  /opt/esp/tools/openocd-esp32/v0.12.0-esp32-20240726/openocd-esp32/bin
  /opt/esp/tools/qemu-xtensa/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/tools/qemu-riscv32/esp_develop_9.0.0_20240606/qemu/bin
  /opt/esp/python_env/idf5.4_py3.12_env/bin
  /opt/esp/idf/tools
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build

Directory '/project/build' doesn't seem to be a CMake build directory. Refusing to automatically delete files in this directory. Delete the directory manually to 'clean' it.
Executing action: fullclean
yuetloo commented 2 weeks ago

Glad it worked. The previous failed build must have ended badly that the ‘fullclean’ refused to automatically remove the files in the folder and asked to manually remove it. See the bottom of the log.On Aug 27, 2024, at 5:31 PM, Eliot Stock @.***> wrote: OK, it builds. Running fullclean didn't actually work, but I grabbed a fresh working directory and switched to that PR branch and it builds from there. The fullclean result, fwiw: docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py fullclean Detecting the Python interpreter Checking "python3" ... Python 3.12.3 "python3" has been detected Checking Python compatibility Checking other ESP-IDF version. Adding ESP-IDF tools to PATH... Checking if Python packages are up to date... Python requirements are satisfied. Requirement files:

Directory '/project/build' doesn't seem to be a CMake build directory. Refusing to automatically delete files in this directory. Delete the directory manually to 'clean' it. Executing action: fullclean

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>