esphttpd-freertos icon indicating copy to clipboard operation
esphttpd-freertos copied to clipboard

PlatformIO can not compile espfs_image.c not found

Open michox opened this issue 4 years ago • 7 comments

Hi I am trying to compile your example code in platformio and get the following error Compiling .pio\build\esp32doit-devkit-v1\esp-idf\espfs\src\espfs.c.o *** [.pio\build\esp32doit-devkit-v1.pio\build\esp32doit-devkit-v1\esp-idf\espfs\src\espfs_image.c.o] Source .pio\build\esp32doit-devkit-v1\esp-idf\espfs\src\espfs_image.c' not found, needed by target .pio\build\esp32doit-devkit-v1.pio\build\esp32doit-devkit-v1\esp-idf\espfs\src\espfs_image.c.o'.

I have no idea what that means and how to fix it, some guidance would be greatly appreciated

michox avatar May 17 '20 10:05 michox

Thanks for the report. I have not tried to build this with Plaformio before, but I would like to try it and support it.

First, please provide some info about your setup: Environment, ESP-IDF version, ESP32 or ESP8266.

Also please write a short step-by-step instruction of how you setup and build this example on Platformio and I'll give it a try. When we get it working I'll add your instructions to our readme.

phatpaul avatar May 18 '20 18:05 phatpaul

I am on an esp32doit devkit v1 with the latest espressif 32 1.12.1 here is what I did:

  • create an empty project in platformIO
  • clone the example to an empty folder and run git submodule update --init --recursive
  • copy the content into the platformIO project and copy the files from main into src.

I am not really experienced with the ESP-IDF so I might have forgotten or overlooked something major...

michox avatar May 19 '20 06:05 michox

I see. Well it seems this example project (esphttpd-freertos) is not setup like a platformio project.
I'll have to do some searching to find out how platformio manages components which are outside of ESP-IDF.

Are you dead-set on using platformio?
There is also the ESP-IDF Explorer plugin for VSCode which provides some help and tools. It manages ESP-IDF projects in the normal way (not like platformio, not like arduino, etc...). I expect this project should work fine in that environment. I'm installing it myself and it is downloading all the necessary tools and libraries...

phatpaul avatar May 19 '20 18:05 phatpaul

Ok I can confirm I get the same error as you when trying to build on platformio.

The issue seems to be that a build step is missing, the espfs image is not generated before the build looks for it, expecting it to be espfs_image.c. I'm new to CMake so I need some help troubleshooting this. @jkent any ideas?

BTW I added src_dir = main to platformio.ini so I don't have to rename the "main" folder to "src":

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = main

[env:esp32-evb]
platform = espressif32
board = esp32-evb
framework = espidf

When we get this working we can just add platformio.ini file to this repo and it should work out-of-the-box in that environment.

phatpaul avatar May 19 '20 23:05 phatpaul

I'll keep this in my inbox to review when I have more time. I'm not very familiar with PlatformIO; I know its an alternate environment for Arduino development though.

jkent avatar Jun 03 '20 21:06 jkent

Hi jkent, are there any news on that? I would like to use your code in an bigger PlatformIO project. Thx for reply in advance, jomjol

jomjol avatar Nov 07 '20 06:11 jomjol

Sorry, no progress has been made on this. I'm too busy with other things at this time.

jkent avatar Nov 07 '20 06:11 jkent