昨天配置好了vscode上的esp32环境,今天使用例程进行编译和烧录均没有出现问题,但是使用rtt提供的bsp进行编译时出现了报错,不过我之前成功编译例程的时候父目录都配置好了c环境,bsp里没有配置,不知道是否是这个的原因,在build的时候出现了如下的报错
主要报错 Cannot find source file:
D:/rt-thread-master/rt-thread-master/src/device.c
完整的log如下所示,
-- Found Git: D:/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Check for working C compiler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Check for working C compiler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe
-- Check for working CXX compiler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32c3
-- Project sdkconfig file D:/rt-thread-master/rt-thread-master/bsp/ESP32_C3/sdkconfig
-- Found Python3: D:/.espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe (found version "3.8.7") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "rtthread" version: 1
-- Adding linker script D:/rt-thread-master/rt-thread-master/bsp/ESP32_C3/build/esp-idf/esp32c3/esp32c3_out.ld
-- Adding linker script D:/esp/esp-idf/components/esp32c3/ld/esp32c3.project.ld.in
-- Adding linker script D:/esp/esp-idf/components/esp32c3/ld/esp32c3.peripherals.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.api.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.libgcc.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.version.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib-time.ld
-- Adding linker script D:/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.eco3.ld
-- Components: app_trace app_update bootloader bootloader_support cxx driver efuse esp32c3 esp_common esp_eth esp_event esp_gdbstub esp_hw_support esp_ipc esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py freertos hal heap log lwip main mbedtls newlib nvs_flash partition_table pthread riscv soc spi_flash tcpip_adapter vfs wpa_supplicant
-- Component paths: D:/esp/esp-idf/components/app_trace D:/esp/esp-idf/components/app_update D:/esp/esp-idf/components/bootloader D:/esp/esp-idf/components/bootloader_support D:/esp/esp-idf/components/cxx D:/esp/esp-idf/components/driver D:/esp/esp-idf/components/efuse D:/esp/esp-idf/components/esp32c3 D:/esp/esp-idf/components/esp_common D:/esp/esp-idf/components/esp_eth D:/esp/esp-idf/components/esp_event D:/esp/esp-idf/components/esp_gdbstub D:/esp/esp-idf/components/esp_hw_support D:/esp/esp-idf/components/esp_ipc D:/esp/esp-idf/components/esp_netif D:/esp/esp-idf/components/esp_pm D:/esp/esp-idf/components/esp_ringbuf D:/esp/esp-idf/components/esp_rom D:/esp/esp-idf/components/esp_system D:/esp/esp-idf/components/esp_timer D:/esp/esp-idf/components/esp_wifi D:/esp/esp-idf/components/espcoredump D:/esp/esp-idf/components/esptool_py D:/esp/esp-idf/components/freertos D:/esp/esp-idf/components/hal D:/esp/esp-idf/components/heap D:/esp/esp-idf/components/log D:/esp/esp-idf/components/lwip D:/rt-thread-master/rt-thread-master/bsp/ESP32_C3/main D:/esp/esp-idf/components/mbedtls D:/esp/esp-idf/components/newlib
D:/esp/esp-idf/components/nvs_flash D:/esp/esp-idf/components/partition_table D:/esp/esp-idf/components/pthread D:/esp/esp-idf/components/riscv D:/esp/esp-idf/components/soc D:/esp/esp-idf/components/spi_flash D:/esp/esp-idf/components/tcpip_adapter D:/esp/esp-idf/components/vfs D:/esp/esp-idf/components/wpa_supplicant
-- Configuring done
CMake Error at D:/esp/esp-idf/tools/cmake/component.cmake:475 (add_library):
Cannot find source file:
D:/rt-thread-master/rt-thread-master/src/device.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
main/CMakeLists.txt:1 (idf_component_register)
CMake Error at D:/esp/esp-idf/tools/cmake/component.cmake:475 (add_library):
No SOURCES given to target: __idf_main
Call Stack (most recent call first):
main/CMakeLists.txt:1 (idf_component_register)
CMake Generate step failed. Build files cannot be regenerated correctly.
* 终端进程“C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B d:\rt-thread-master\rt-thread-master\bsp\ESP32_C3\build -S d:\rt-thread-master\rt-thread-master\bsp\ESP32_C3”已终止,退出代码: 1。
请问一下执行之后选择哪个选项,我之前解决过这个问题,后来又忘记了
我执行完之后重新回到vscode进行编译,原来device.c的报错解决了,进到ninja进程,但编译到后面还是因为一个报错卡住了,我使用env执行了一下scons同样也有报错,信息大致相同,这里是vscode内编译的log
这里是执行scons之后的报错信息,
@wha1e_
riscv32-esp-elf-gcc 这个环境变量没有设置,可以试试这个命令能不能用。不能用的话,可以根据README里面的把riscv32-esp-elf-gcc下载下来,并且设置到环境变量里面。
@RTT_逍遥
你好,我在readme里面没有找到相关的下载教程或者链接,上bing查了也没有找到,请问有传送门吗