microsoft / devicescript

TypeScript for Tiny IoT Devices (ESP32, RP2040, ...)
https://microsoft.github.io/devicescript/
MIT License
3.24k stars 112 forks source link

Flash tool args #606

Closed godefroi closed 9 months ago

godefroi commented 11 months ago

This pull request adds a simple feature which allows passing arbitrary arguments to esptool.py. This is useful for my specific use-case, which requires me to specify dio flash mode (where qio is the more common option). Note that while the board option is present for all boards (or can be, anyway), it is only passed to esptool.py and therefore would be ineffectual for other architectures (i.e. RP2040).

The motivation around this feature was discussed in #592.

godefroi commented 11 months ago

@microsoft-github-policy-service agree

godefroi commented 11 months ago

I have changed the implementation from a generic-arguments system to a specific flash-mode implementation. This is because the generic-arguments system wasn't ideal, because specific arguments must appear in specific positions (mixed with the existing arguments) and therefore it wasn't as general as it appeared to be.

mmoskal commented 10 months ago

I think most arguments users may want to set, on per-device-type basis, would come right after write_flash, no? I would rather have the version from previous commit with flash arguments, so we can also set flash frequency etc.

pelikhan commented 9 months ago

Thank you for the PR!