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

mDashBegin(DEVICE_PASSWORD);

in order to have the code back to work.

Is mDash really suitable for VSCode / PlatformIO?

Thank you.
Regards

Details:
VSCode:
Versão: 1.61.2 (Universal)
Confirmar: 6cba118ac49a1b88332f312a8f67186f7f3c1643
Data: 2021-10-19T15:49:28.381Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
SO: Darwin x64 17.7.0

PlatformIO:
Core 5.5.5 - Home 3.3.4

Good afternoon.

Sharing this issue in another forum, I found out that this:

shouldn’t be used anymore. Instead, the platformio.ini should have:

``` lib_deps = cesanta/mDash @ ^1.2.14 build_flags = -lmDash ```

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

`#include <ESP32FTPServer.h>
String FTP_user = “usr”;
String FTP_psw = “psw”;
FtpServer servidorFTP;
…
void setup() {
…
servidorFTP.begin(FTP_user, FTP_psw);mDashBegin(DEVICE_PASSWORD);
…
}

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 1ELF 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)`

`Rebooting…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, 
Flagsnvs,data,nvs,0x9000,0x4000,
otadata,data,ota,0xD000,0x2000,
phy_init,data,phy,0xF000,0x1000,
app0,app,ota_0,0x10000,0x120000,
app1,app,ota_1,0x130000,0x120000,
spiffs,data,spiffs,0x250000,0x1B0000,`

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

Please, could someone give some help on that?
I’m still stuck there.

Thank you.
Regards