Hallo,
ich weis nicht ob ich das richtig verstanden habe. Ich würde gerne
dieses Beispiel auf meinem ESP32 haben.
Im
README steht:
Building an example is the same as building any other project
Ich bin in das entsprechende Verzeichnis gewechselt, das richtige Gerät ist ja schon als Standardwert hinterlegt da habe ich dann gleich
eingegeben.
Das ging auch erstmal los, endete aber relativ schnell mit einem Fehler. Die ganze Ausgabe:
Code: Alles auswählen
(build-venv) dennis@DESKTOP-CEVO5TA:~/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control$ idf.py menuconfig
Executing action: menuconfig
Running cmake in directory /home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: /usr/bin/git (found version "2.25.1")
-- The C compiler identification is GNU 5.2.0
-- The CXX compiler identification is GNU 5.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_073f2 && [1/2] Building C object CMakeFiles/cmTC_073f2.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_073f2
FAILED: cmTC_073f2
: && /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address CMakeFiles/cmTC_073f2.dir/testCCompiler.c.obj -o cmTC_073f2 && :
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lsim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhandlers-sim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
/home/dennis/esp/esp-idf/tools/cmake/project.cmake:290 (__project)
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
See also "/home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/CMakeOutput.log".
See also "/home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1
Der Inhalt des Verzeichnisses:
Code: Alles auswählen
(build-venv) dennis@DESKTOP-CEVO5TA:~/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control$ ls -l
total 12
-rw-r--r-- 1 dennis dennis 422 Feb 18 18:26 CMakeLists.txt
-rw-r--r-- 1 dennis dennis 4929 Feb 18 18:26 README.md
drwxr-xr-x 1 dennis dennis 4096 Feb 18 18:42 build
drwxr-xr-x 1 dennis dennis 4096 Feb 18 18:26 main
-rw-r--r-- 1 dennis dennis 457 Feb 18 18:26 serial-studio-proto-map.json
Und weil in der Fehlermeldung auch was von der "CMakeLists.txt" steht, habe ich mir die noch angeschaut:
Code: Alles auswählen
(build-venv) dennis@DESKTOP-CEVO5TA:~/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control$ cat CMakeLists.txt
# The following lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/common_components/pid_ctrl"
"$ENV{IDF_PATH}/examples/peripherals/pcnt/rotary_encoder/components")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mcpwm_brushed_dc_control)
Es wird noch auf zweo Log-Dateien hingewiesen:
Code: Alles auswählen
(build-venv) dennis@DESKTOP-CEVO5TA:~/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control$ cat /home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/CMakeOutput.log
The target system is: Generic - -
The host system is: Linux - 4.4.0-19041-Microsoft - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Build flags: -mlongcalls;-Wno-frame-address
Id flags: -c
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
The C compiler identification is GNU, found in "/home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.o"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
Build flags: -mlongcalls;-Wno-frame-address
Id flags: -c
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
The CXX compiler identification is GNU, found in "/home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.o"
Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
und
Code: Alles auswählen
(build-venv) dennis@DESKTOP-CEVO5TA:~/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control$ cat /home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/CMakeError.log
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Build flags: -mlongcalls;-Wno-frame-address
Id flags:
The output was:
1
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lsim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhandlers-sim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
Build flags: -mlongcalls;-Wno-frame-address
Id flags:
The output was:
1
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lsim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhandlers-sim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /home/dennis/esp-idf/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_1094f && [1/2] Building C object CMakeFiles/cmTC_1094f.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_1094f
FAILED: cmTC_1094f
: && /home/dennis/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address CMakeFiles/cmTC_1094f.dir/testCCompiler.c.obj -o cmTC_1094f && :
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lsim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhandlers-sim
/home/dennis/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Wenn ich nach
suche, dann landet man zum Beispiel
hier. Allerdings bringt der Hinweise auf GetStarted nichts, denn genau diese Anleitung habe ich gestern befolgt.
Sagt euch der Fehler vielleicht etwas mehr wie mir und jemand kann mir erklären was da schief läuft?
Und bin ich so überhaupt auf dem richtigen Weg um das Beispiel auf den ESP32 zu kriegen? (Brauche das ja nicht in C sondern MicroPython)
Vielen Dank und Grüße
Dennis