• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 Web Server – Code Upload Failed

Q&A Forum › Category: ESP32 › ESP32 Web Server – Code Upload Failed
0 Vote Up Vote Down
Stephen asked 3 years ago

Hello Rui and Sara,
1_1 Hello World WS uploaded ok and browser accessed web page ok.
1_2 Hello World WS SPIFFS – Failed compilation, (after using the downloaded sample files.)
This is the error message:-
Archiving .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a
Linking .pio\build\esp32doit-devkit-v1\firmware.elf
c:/users/steph/.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\libca5\libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts’
c:/users/steph/.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\libca5\libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)’:
C:\Users\steph\1A RANDOM NERD TUTORIALS\1 WEB SERVER COURSE\RND Web Server Course FILES\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 122.07 seconds ===================

7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Can you show me your platformio.ini file?
Regards
Sara

0 Vote Up Vote Down
Stephen answered 3 years ago

Hello Sara, thanks for responding, I hope the HEAT WAVE is not too hard on you both !
I have copied the platformio.ini file as requested.
“Cool” regards, Stephen.

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps = ESP Async WebServer

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
I’m not sure why you have that issue and we don’t.
But here are some workarounds: https://github.com/me-no-dev/ESPAsyncWebServer/issues/1147
instead of

lib_deps = ESP Async WebServer

use

lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

 
Let me know if this solves the issue.
Regards,
Sara

0 Vote Up Vote Down
Stephen answered 3 years ago

Hello Sara,
After updating git and restarting VSCode a couple of times the upload was finally a SUCCESS.
however !!
** After logging in with the new IP address, the page came up totally blank, no title, no icon and no body.
I checked the main.cpp, index.html and style.css files and they appear to be identical to what I downloaded from RNT …ebook RESOURCES.zip , except for ssid & password.
By the way, 1_1_Hello_World_WS uploaded and presents fine.
I am using FireFox as my default browser
–This is the final TERMINAL output:-
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12784
load:0x40080400,len:3032
entry 0x400805e4
[ 4][E][esp32-hal-cpu.c:194] setCpuFrequencyMhz(): Can not switchtch to 240 MHz! Chip CPU frequency rated for 160MHz.
Connecting to WiFi …192.168.0.225
SPIFFS mounted successfully
Kind regards, Stephen

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
The HTML and CSS files don’t upload when you upload code to the board. Did you upload the filesystem image as described on page 183?
Regards,
Sara 

0 Vote Up Vote Down
Stephen answered 3 years ago

Good Morning Sara,
mmmm somehow I skipped that step,
now everything seems to be uploading ok, and the page appears as expected.
Thanks for your patience,
Kind regards,
Stephen

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Great!
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

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.