Download raw body.
Help with xtensa-esp32-elf-* ports
On Mon, Feb 12, 2024 at 06:42:04PM +0800, Sadeep Madurange wrote: > Hello, > > I'm trying to setup a dev environment for ESP32 microcontrollers. I'm > struggling to compile my application. Appreciate any help on how to use > the xtensa toolchain ports on OpenBSD. > > I installed the following ports: > > xtensa-esp32-elf-binutils-2.35.1.2020.1223p1 > xtensa-esp32-elf-gcc-8.4.0.2021.2p1 > xtensa-esp32-elf-gcc-bootstrap-8.4.0.2021.2p0 > xtensa-esp32-elf-gdb-2.35.1.2021.2p1 > xtensa-esp32-elf-newlib-2021.2p0 > > I also installed the py3-cryptography-41.0.6, which seems to be needed > by the ESP-IDF. I get as far as generating the makefiles using: > > cmake -DPYTHON=python3 .. -G "Unix Makefiles" > > When I run the command above, I see the following warning: > > CMake Warning at > /home/sadeep/esp/esp-idf-v5.1.2/tools/cmake/tool_version_check.cmake:41 > (message): > Can not get version for tool: > /usr/local/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc > > Check Getting Started documentation or proceed at own risk. > > Call Stack (most recent call first): > /home/sadeep/esp/esp-idf-v5.1.2/components/esp_common/project_include.cmake:10 > (check_expected_tool_version) > /home/sadeep/esp/esp-idf-v5.1.2/tools/cmake/build.cmake:398 (include) > /home/sadeep/esp/esp-idf-v5.1.2/tools/cmake/build.cmake:620 > (__build_process_project_includes) > /home/sadeep/esp/esp-idf-v5.1.2/tools/cmake/project.cmake:547 > (idf_build_process) > CMakeLists.txt:6 (project) > > Then I run the command make, which results in the following error: > > /home/sadeep/esp/esp-idf-v5.1.2/components/esp_adc/adc_oneshot.c:47:5: > error: unknown type name '_lock_t' > _lock_t mutex; > ^~~~~~~ > /home/sadeep/esp/esp-idf-v5.1.2/components/esp_adc/adc_oneshot.c: In > function 'adc_oneshot_new_unit': > /home/sadeep/esp/esp-idf-v5.1.2/components/esp_adc/adc_oneshot.c:95:5: > error: implicit declaration of function '_lock_acquire'; did you mean > 'adc_lock_acquire'? [-Werror=implicit-function-declaration] > _lock_acquire(&s_ctx.mutex); > ^~~~~~~~~~~~~ > adc_lock_acquire > /home/sadeep/esp/esp-idf-v5.1.2/components/esp_adc/adc_oneshot.c:97:5: > error: implicit declaration of function '_lock_release'; did you mean > 'adc_lock_release'? [-Werror=implicit-function-declaration] > _lock_release(&s_ctx.mutex); > ^~~~~~~~~~~~~ > adc_lock_release > /home/sadeep/esp/esp-idf-v5.1.2/components/esp_adc/adc_oneshot.c: At top > level: > cc1: warning: unrecognized command line option '-Wno-enum-conversion' > cc1: some warnings being treated as errors > *** Error 1 in . > (esp-idf/esp_adc/CMakeFiles/__idf_esp_adc.dir/build.make:104 > 'esp-idf/esp_adc/CMakeFiles/__idf_esp_adc.dir/adc_oneshot.c.obj') > *** Error 2 in . (CMakeFiles/Makefile2:3900 > 'esp-idf/esp_adc/CMakeFiles/__idf_esp_adc.dir/all': make -s -f > esp-idf/esp_adc/CMakeFiles/__idf_...) > *** Error 2 in /home/sadeep/git.bak/dash/build (Makefile:136 'all': make > -s -f CMakeFiles/Makefile2 all) > > -- > Sadeep Madurange > PGP: 103BF9E3E750BF7E > Greetings Sadeep, The ESP32 xtensa port is really just designed to work with the Arduino environment, using the makeEspArduino port. There is way too much black magick to get the esp-idf to run on OpenBSD, with all its Linuxisms, which is why there is no esp-idf port. I had a version running a few years back, but gave up on the effort since it was too much trouble and wouldn't fit within ports as it was. Thanks, Tracey
Help with xtensa-esp32-elf-* ports