Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ protected IStatus run(IProgressMonitor monitor)

private String extractChipFromChipInfoOutput(String chipInfoOutput)
{
Pattern pattern = Pattern.compile("Chip is (ESP32[^\\s]*)"); //$NON-NLS-1$
Pattern pattern = Pattern.compile("(?:Chip is|Chip type:)\\s+(ESP32[^\\s]*)", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it works for now, I think we initially took the wrong approach to parsing the log output, since it’s subject to change. We should request JSON output from esptool instead and look for specific keys. I will raise a request for this.

https://docs.espressif.com/projects/esptool/en/latest/esp32/migration-guide.html#log-format-changes

Make sure to adjust any of your scripts, asserts, CI workflows, or others to accommodate the new/changed format of messages. If you are parsing the log output (not recommended), consider importing esptool as a module and using the public API (see here) to get the information you need.

Matcher matcher = pattern.matcher(chipInfoOutput);
if (matcher.find())
{
Expand Down
Loading