I’m new to platformio, but not new to ESP development. I’m trying to wrap my head around what platformio does different than the ESP eco-system.
I’m using ESP_LOGx("tag", "text"); calls to log things to the monitor. These work as expected for the most part. (I’m working on an inherited codebase, so I’m still digging into where all the settings and whatnot are set.)
I’ve found a couple issues:
When I click the upload button in VScode, the monitor sometimes shows up and sometimes doesn’t. I’d like it to always show up, but I’m not sure where to set this.
I’m finding that the monitor doesn’t always attach to the log output. I’m used to the ESP-IDF having a pretty consistent behavior when I launch the monitor, which is to reboot the MCU and display all the output. Secondarily, rebooting the MCU using the reset button gets it into a state where logs aren’t appearing. Is this expected?
Finally, the log lines seem to be colliding where two logs lines will both try to write to the output, so in some cases, I will see two lines interleaved. I don’t remember seeing this in ESP-IDF.
Details:
ESP-S3 (direct USB connection, rather than a USB-UART chip) using the Arduino Framework and a handful of libraries like U8g2, OneButton, etc.
Thanks for taking the time to answer my questions.
I just noticed this in the project tasks, and yes, this would be what I’m using. Unfortunately, my install of platformio doesn’t have that icon in the status bar. (I also right clicked on the status bar to see if it’s hidden, and it’s just not listed.) One thing I’m noticing is that the Upload button will
That makes sense. I’m just surprised that it doesn’t try to reconnect, as it used to on previous projects. Is it possible that it’s due to the Arduino Framework (what I’m using now) vs ESP-IDF Framework (the experience I’m referencing)?
I do have multiple tasks running, but that’s never been an issue before. Again, this might be an Arduino vs ESP-IDF thing.
Thanks for teaching me something new today! I’ve put that in place and it’s what I need.
I’ll dig more into the project settings and code to see if I can figure out what’s going on. But generally speaking, if I click the “Serial Monitor” icon, should I expect the monitor to connect and start displaying the log?
At the moment, the only way I’m able to get the log to show up is to do an Upload and Monitor.