Hello all, I'm trying to compile and upload my sketch using the following commands: arduino-cli compile --build-path $PWD/ArduinoOutput -b esp8266:esp8266:generic sketch
and then arduino-cli upload -p port -b esp8266:esp8266:generic sketch
It used to work just fine, but now I'm having an upload error: Error during Upload: Compiled sketch not found in /private/var/folders/gg/...
--build-path string Path where to save compiled files. If omitted, a directory will be created in the default temporary path of your OS.
With this flag, you can instructing the compile command to put the compiled binaries in a custom location. The arduino-cli upload command doesn't know anything about that custom location unless you tell it about it. So if you use a custom build path in your compile command, then you must also use a custom input directory in your upload command: https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_upload/#options
--input-dir string Directory containing binaries to upload.
So the correct upload command would be:
arduino-cli upload -p port -b esp8266:esp8266:generic --input-dir "$PWD/ArduinoOutput"