Does mDash run in VSCode / PlatformIO?

Last year I’ve been doing some experiences with mDash in Arduino IDE 1.8.11 on a ESP32 device.

Now I’m trying to include mDash in a new project developed for ESP32 pico D4 in VSCode / PlatformIO.

I’ve installed mDash library through PIO Home Library Manager and copied the same lines used before to this new project. But it shows many errors during compilation and at the end it’s not flashed.

I found somewhere that it’d be required to add

build_flags = -L.pio/libdeps/YOURENVIRONMENTDIRECTORY/mDash/src/esp32/ -llibmDash -DCORE_DEBUG_LEVEL=5

to platformio.ini file.

Now it compiles and flashes, but keeps reseting the device during setup procedure.

I had to comment out the begin command


in order to have the code back to work.

Is mDash really suitable for VSCode / PlatformIO?

Thank you.

PlatformIO in the newest core version (Process precompiled and ldflags properties of · Issue #3994 · platformio/platformio-core · GitHub) is now capable of recognizing Arduino precompiled libraries if the library properly declares it. As it says on their README page,

for Arduino 1.8.10 […] Change by commenting out the ldflags=-lmDash line

So sadly the library is not all setup to work correctly without either uncommenting the ldflags in .pio\libdeps\<env>\mDash\ or by adding the simpler

build_flags = -lmDash

to the platformio.ini. PlatformIO already puts the correct folder in the library search path now. So,

platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
     cesanta/mDash @ ^1.2.14
build_flags = -lmDash

works just fine for compilation.

I had no such problems. Registered on the website, inputted my correct SSID, password and device token and the device came online

If you have problems with the library, write to the library developers.

Hello Max.

Great. I’ve got a big improvement with your information. Now it looks like it tries to start.

Now it shows some errors. First I thought there could be some conflict with the FTP server:

#include <ESP32FTPServer.h> // henrikste/ESP32FTPServer@^0.0.2
String FTP_user = “usr”;
String FTP_psw = “psw”;
FtpServer servidorFTP;

void setup() {

servidorFTP.begin(FTP_user, FTP_psw);


Doing so, I get this:

/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:4826 (xTaskNotify)- assert failed!
abort() was called at PC 0x4008d104 on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x40089b78:0x3ffb1f00 0x40089df5:0x3ffb1f20 0x4008d104:0x3ffb1f40 0x400d33f2:0x3ffb1f60 0x400e33b6:0x3ffb1fb0 0x4008ae06:0x3ffb1fd0
#0 0x40089b78:0x3ffb1f00 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
#1 0x40089df5:0x3ffb1f20 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
#2 0x4008d104:0x3ffb1f40 in xTaskNotify at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:4999
#3 0x400d33f2:0x3ffb1f60 in setup() at src/main.cpp:1408
#4 0x400e33b6:0x3ffb1fb0 in loopTask(void*) at /Users/cirobruno/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:18
#5 0x4008ae06:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

ets Jun 8 2016 00:22:57

Placing mDashBegin(DEVICE_PASSWORD); as the last instruction in void setup(), I get this:

2021-10-26 21:12:10 E dns.c:124:dns_cb stray DNS reply
2021-10-26 21:12:11 E event.c:18:mg_error 0x3d setup err 0x7f00
2021-10-26 21:12:11 E dns.c:124:dns_cb stray DNS reply
2021-10-26 21:12:12 E event.c:18:mg_error 0x3f setup err 0x7f00
2021-10-26 21:12:12 E dns.c:124:dns_cb stray DNS reply
2021-10-26 21:12:13 E event.c:18:mg_error 0x38 setup err 0x7f00
2021-10-26 21:12:14 E event.c:18:mg_error 0x3b setup err 0x7f00
2021-10-26 21:12:15 E event.c:18:mg_error 0x3a parse(/spiffs/ca.pem) err 0x3f80
2021-10-26 21:12:16 E event.c:18:mg_error 0x3c parse(/spiffs/ca.pem) err 0x3f80
2021-10-26 21:12:17 E event.c:18:mg_error 0x3d parse(/spiffs/ca.pem) err 0x3f80
2021-10-26 21:12:18 E event.c:18:mg_error 0x3f parse(/spiffs/ca.pem) err 0x3f80
2021-10-26 21:12:19 E event.c:18:mg_error 0x38 parse(/spiffs/ca.pem) err 0x3f80

but the device isn’t reboot.

Commenting out servidorFTP.begin(FTP_user, FTP_psw);, the behavior is the same.

SPI drive has an empty partition as big as the code’s itself:

# Name, Type, SubType, Offset, Size, Flags

and mDash doesn’t connect at all:

Btw, should I fill something else in mDash device’s configuration? Or does it fills automatically when the device connects?

Thank you.
Regards, Ciro