prusa3d / Prusa-Firmware-ESP32-Cam

Firmware for ESP32 Cam modules to be used in Prusa Connect
GNU General Public License v3.0
97 stars 10 forks source link

cfg.h: no such file or directory #16

Closed jakefreese closed 1 month ago

jakefreese commented 1 month ago

I have been attempting to get my cameras up and going and can not get them to compile. I have tried with the Arduino compiler and VSC with Platform IO and get the same errors. I have the ESP32 by Espressif Systems 2.0.15 installed along with the 4 required libraries. It is probably an error on my end that I have not been able to identify.

Thank you!

johnyHV commented 1 month ago

Sorry, but I don't have problem with compilation in the Arduino IDE 2.3.2, and in the Visual studio code with Arduino plugin. Can you send me output from the console ?

jakefreese commented 1 month ago

From VSC with Platform IO plugin, since I copied the error in to this window I did notice the two warnings that it can not find two packages. This could be my issue. I will work more on it tomorrow, thank you!

Library Manager: Installing syncTCP Warning! Could not find the package with 'syncTCP' requirements for your system 'windows_amd64' Library Manager: Installing ESPAsyncWebSrv Warning! Could not find the package with 'ESPAsyncWebSrv' requirements for your system 'windows_amd64' Found 35 compatible libraries

I do have the "Arduino ESP32 Boards by Arduino 2.0.13 " and "ESP32 by Espressif 2.0.16" installed

`Executing task in folder PRUSA_ESP32_CAMERA: C:\Users\jaker.platformio\penv\Scripts\platformio.exe run

Processing esp32cam (platform: espressif32; board: esp32cam; framework: arduino) ---------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html PLATFORM: Espressif 32 (6.4.0) > AI Thinker ESP32-CAM HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:


Processing esp32cam (platform: espressif32; board: esp32cam; framework: arduino) ---------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html PLATFORM: Espressif 32 (6.4.0) > AI Thinker ESP32-CAM HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:


Processing esp32cam (platform: espressif32; board: esp32cam; framework: arduino) ---------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html PLATFORM: Espressif 32 (6.4.0) > AI Thinker ESP32-CAM HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:


Processing esp32cam (platform: espressif32; board: esp32cam; framework: arduino) ---------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html PLATFORM: Espressif 32 (6.4.0) > AI Thinker ESP32-CAM HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:


From Arduino IDE 2.3.2

`C:\Users\jaker\OneDrive\Documents\Arduino\Prusa_ESP32_cam\Prusa_ESP32_cam.ino:53:10: fatal error: cfg.h: No such file or directory 53 | #include "cfg.h" | ^~~ compilation terminated. exit status 1

Compilation error: cfg.h: No such file or directory`

johnyHV commented 1 month ago

Hello. Did you try to install the missing packages? It helped ?

jakefreese commented 1 month ago

I still have not been able to figure out where the packages need to be in PlatformIO and have them linked. I am going to keep looking today. I have the file with all the packages in the "include" folder, I think I need to add something to the platformio.ini file to point the where the files are located.

jakefreese commented 1 month ago

It was completely on my side ( I would starve if I did this for a living.)

I needed to have all the ".h" files in the "include" file in the project

The platform.ini file needed

build_flags = -I "where the files are locally stored" lib_deps = "where the files are locally stored"

I also had to go into "sys_led.h" and change the "arduino.h" to "Arduino.h"

It compiled, now I just need to do the rest of the setup. Thank you again!