Skip to content

Conversation

@SergioGasquez
Copy link
Member

This approach tries to read project config and see if there is a [connection] or [[ubs_device]] section on it, this would mean that is an old config, and will parse the port_config out of it and write it to espflash_ports.toml file (it will not remove the ports sections from the project file though)

@SergioGasquez SergioGasquez linked an issue Jun 13, 2025 that may be closed by this pull request
@SergioGasquez
Copy link
Member Author

With the current changes, having the following espflash.toml:

baudrate = 460800
[connection]
serial = "/dev/ttyUSB0"

Results in:

[2025-06-16T13:30:02Z INFO ] espflash@3 configuration detected. Migrating port config to port_config_file: "/home/sergio/.config/espflash/espflash_ports.toml"

This is the resulting espflash_ports.toml

usb_device = []

[connection]
serial = "/dev/ttyUSB0"

And espflash.toml got overwritten to:

baudrate = 460800
format = "EspIdf"

[esp_idf_format_args]

[flash]

@SergioGasquez SergioGasquez requested a review from MabezDev June 17, 2025 07:21
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@SergioGasquez SergioGasquez enabled auto-merge June 17, 2025 08:30
@SergioGasquez SergioGasquez added this pull request to the merge queue Jun 17, 2025
Merged via the queue into esp-rs:main with commit fa8932e Jun 17, 2025
25 checks passed
@SergioGasquez SergioGasquez deleted the feat/config-migration branch June 17, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

espflash split config migration

2 participants