I compile with VSC in windows 1_2_Hello_World_WS_SPIFFS.
Aflter compile the code, I receive the message:
Connecting to WiFi …..192.168.1.3
SPIFFS mounted successfully
But in the browser I receive the message:
This 192.168.1.3 page can’t be found
I have the following code:
initSPIFFS();
server.on(“/”, HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, “/index.html”, “text/html”);
});
server.serveStatic(“/”, SPIFFS, “/”);
Hi.
You probably didn’t upload the files to the filesystem.
See the “Uploading Filesystem Image” section.
Make sure you upload the required files to the filesystem.
Only after that, the ESP will have the files to build the web page.
Regards,
Sara
I am having the same problem. I am using platformIO and get the same messages. The instructions for uploading filesystem image seem to be for the arduino IDE
is this something you have to do even if you are using platformIo.
if so what does
“spiffs successfully mounted” actually mean?
if there is another set of instructions for uploading in platform IO what page is it on
I was successful running the hello world example without the SPIFFS
thanks
Jim
Hi.
The project starts on page 171. It describes all the steps you need to follow to upload files to the filesystem. That’s the purpose of that unit. Make sure you don’t forget to follow the instructions on page 182 “Uploading Filesystem Image”.
Are you having issues with that? Can you better describe what is happening?
“SPIFFS successfully mounted” means that it successfully started the filesystem on the ESP32. It means the ESP32 has now a filesystem and you can upload the files to that place. It is as if you have created a folder inside the ESP32 that can save files as you would do on your computer.
Regards,
Sara
Sara You are right I skipped this step.
I had some trouble finding right devkit file but it did work
I closed the workspace and editors and got a completely different set of files in the devkit hopefully I can find it again next time
Thanks
Jim
Hello Sara,
When I try to compile the 1_2_Hello_World_WS_SPIFFS (VSC), I’m getting these strange errors:
Linking .pio\build\esp32doit-devkit-v1\firmware.elf
c:/users/zenzas/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\lib68e\libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts’
c:/users/zenzas/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\lib68e\libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)’:
C:\Users\zenzas\Desktop\_RandomNerd\TestesAH\1_2_Hello_World_WS_SPIFFS/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32doit-devkit-v1\firmware.elf] Error 1
====================================== [FAILED] Took 24.57 seconds =
Thank you in advance,
AH
Hi.
I think that’s a problem with the board.
First, try uploading a basic sketch to the board. You can use Arduino IDE, for example. And check if that works.
If that doesn’t work…
Try with another board, if you have one.
Then, let me know the results.
Regards,
Sara
HI AH,
This may help; on a Windows computer, go to C:\Users\yourusername\AppData. You may need to unhide the folder. Next; go to C:\Users\yourusername\AppData\Local\Temp, delete all temp files –skip all files that prompt for action in pop-up window. Sometimes for “elf” error you need to rebuild sketch files; once files are deleted, recompile your sketch. You can tell the first time a sketch is compiled; it will take much longer to compile, following recompiles use pre-compiled files, which are much faster.
I have done this in the past; it fixed the issue. However; it could be an issue with your board. Running a Arduino IDE, library example like “Blink” for your board will rule out a board issue, if “Blink” sketch successfully runs.
Apologies; missed the fact your using VSC. I do not know the temp folder path for VSC; not a VSC user.
Regards,
William
Hello Sara,
Thx to your replay. I did several changes:
a) Use another PC with fresh PlatformIO installation;
b) Use another board Wemos LOLIN32 (changing the platformio.ini to work with this board).
Unfortunately I’m getting the same error :(. Any ideas to work around this issue?
Kregards,
AH
Hello Sara,
After a while searching on net, I found the solution: just change on platformio.ini, the platform to espressif32@3.5.0 instead espressif32.
It works without problems with my boards and on my different PC’s.
Hope it helps.
AH
Find the solution explanation here: https://community.platformio.org/t/update-espressif-32-version-4-1-0-leads-to-error-collect2-exe-error-ld-returned-1-exit-status/27742/4
AH
Great!
Thank you so much for sharing!
That will be very useful.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara
I was the same problem.
after update platformio.ini > platform = espressif32@3.5.0
and compile with warm message it works OK
Thank you
Evzen