Closed
Description
Describe the problem
When the flags --build-path and --output-dir are used together an empty binary is delivered in the output directory.
To reproduce
For example, there is the output of an example sketch from the Arduino_Portenta_OTA
library:
> arduino-cli compile -b arduino:mbed_opta:opta --library ../ArduinoCore-mbed/libraries/Portenta_SDCARD/ --libraries ../ --output-dir ./build/ota_sd --build-path ./build/ota_sd --optimize-for-debug -e --build-property "build.extra_flags=\"-D ARDUINO_PORTENTA_OTA_SDMMC_SUPPORT=1\"" examples/OTA_SD_Portenta/OTA_SD_Portenta.ino
> l build/ota_sd
[...]
-rwxr-xr-x 1 me me 0 Sep 14 18:04 OTA_SD_Portenta.ino.bin
-rwxr-xr-x 1 me me 0 Sep 14 18:04 OTA_SD_Portenta.ino.elf
-rw-r--r-- 1 me me 0 Sep 14 18:04 OTA_SD_Portenta.ino.hex
-rw-r--r-- 1 me me 0 Sep 14 18:04 OTA_SD_Portenta.ino.map
-rw-r--r-- 1 me me 453 Sep 14 18:03 build.options.json
-rw-r--r-- 1 me me 36K Sep 14 18:04 compile_commands.json
[...]
Expected behavior
By omitting the --build-path
flag a correct build is produced.
> l build/ota_sd
[...]
-rwxr-xr-x 1 me me 439K Sep 14 18:02 OTA_SD_Portenta.ino.bin
-rwxr-xr-x 1 me me 5.6M Sep 14 18:02 OTA_SD_Portenta.ino.elf
-rw-r--r-- 1 me me 1.3M Sep 14 18:02 OTA_SD_Portenta.ino.hex
-rw-r--r-- 1 me me 8.9M Sep 14 18:02 OTA_SD_Portenta.ino.map
Arduino CLI version
arduino-cli Version: 0.32.2-arch Commit: 2661f5d Date:
Operating system
Linux
Operating system version
Arch Linux
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details