Closed maxgerhardt closed 2 years ago
Hi @maxgerhardt ! Thanks for pointing out. I believe SCons wraps upload flags containing whitespaces, so we can rely on this functionality.
By using the platformio.ini
[env:uno_wifi_rev2]
platform = https://github.com/platformio/platform-atmelmegaavr.git
board = uno_wifi_rev2
framework = arduino
[platformio]
packages_dir = package with spaces
This has had the effect of changing the invocation from the form
"-Uflash:w:"C:\Users\Wong Zhi Wei.platformio\packages\framework-arduino-megaavr\bootloaders\atmega4809_uart_bl.hex":i"
to
-U "flash:w:C:\Users\Max\temp\uno_wifi\package with spaces\framework-arduino-megaavr\bootloaders\atmega4809_uart_bl.hex:i"
I'm not sore of this is better or worse with the missing quotes in the path argument, but at least I don't get a
avrdude: error parsing update operation 'flash:w:C:\Users\Wong'
style error anymore, just that no device was found (since I don't have a Uno WiFi Rev2 connected).
Maybe the original user can test this.
Initially reported in the community forum.
With the
platformio.ini
Users with a space in their name experience a failure in uploading.
The problem looks to me like there's a double-qupting of the flashing argument for the bootloader
Per this the argument should have been just
I however don't see where those quotes for the complete command get added..
https://github.com/platformio/platform-atmelmegaavr/blob/365d8bac9ab853ac78a3e2ff54de100732e08ed5/builder/main.py#L214-L218
https://github.com/platformio/platform-atmelmegaavr/blob/365d8bac9ab853ac78a3e2ff54de100732e08ed5/builder/bootloader.py#L87-L87
only add quotes for the bootloader path, which is correct. There must be some auto-escaping that is not in the platform code screwing things up here -- possible quoting any argument which has a space in it, although in this special case only a part of the argument is to be escaped.