Skip to content

Allow FQBN to be defined in build profile alone #248

Open

Description

@aliphys

Describe the request

For a given sketch.yml build profile, when the fqbn: is specified inside it, then this should be accounted for by the compile-sketches.

This is one example of a sketch.yml file, in which the fqbn is specified.

profiles:
  envie_m7:
    notes: Portenta H7 family & Portenta Machine Control
    fqbn: arduino:mbed_portenta:envie_m7
    platforms:
      - platform: arduino:mbed_portenta (4.1.1)
    libraries:
      - Arduino_USBHostMbed5 (0.3.1)
      - Arduino_POSIXStorage (1.2.0)
      - Arduino_UnifiedStorage (1.1.0)
      - ArduinoRS485 (1.0.5)

Describe the current behavior

Currently, the compile-sketches workflow disregards the specified fqbn: inside the sketch.yml file. For this step:

- name: Compile examples
  uses: arduino/compile-sketches@v1
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    enable-deltas-report: true
    sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
    cli-compile-flags: |
      - --profile=${{ matrix.board.name }}

We get a build error, inline with the default values of the fqbn entry

  Error during build: Platform 'arduino:avr' not found: platform not installed

See here for a full log.


An interim solution (proposed by @per1234 ) is to manually specify the fqbn like this.

- name: Compile examples
        uses: arduino/compile-sketches@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          enable-deltas-report: true
          sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
          cli-compile-flags: |
            - --profile=${{ matrix.board.name }}
          fqbn: ${{ matrix.board.fqbn }}

While this does result in a correct build (see here), it does not abide to the DRY principles. Additionally, this makes it difficult to link the build profile to the workflow (which is the reason for using the sketch.yml) in the first place.

'arduino/compile-sketches' version

latest

Additional context

When running arduino-cli compile --profile envie_m7 locally, the fqbn is automatically selected from inside the sketch.yml file as expected.

Verbose output

PS C:\Users\Ali Jahangiri\Documents\GitHub\Arduino_UnifiedStorage\examples\AdvancedUSBInternalOperations> arduino-cli compile --profile envie_m7 --verbose

FQBN: arduino:mbed_portenta:envie_m7
Using board 'envie_m7' from platform in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e
Using core 'arduino' from platform in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e

Detecting libraries used...
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o nul
Alternatives for Arduino_UnifiedStorage.h: [Arduino_UnifiedStorage@1.1.0]
ResolveLibrary(Arduino_UnifiedStorage.h)
  -> candidates: [Arduino_UnifiedStorage@1.1.0]
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o nul
Alternatives for Arduino_POSIXStorage.h: [Arduino_POSIXStorage@1.2.0]
ResolveLibrary(Arduino_POSIXStorage.h)
  -> candidates: [Arduino_POSIXStorage@1.2.0]
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage\src -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o nul
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\Arduino_UnifiedStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\Folder.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\InternalStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\Partitioning.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\SDStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\UFile.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\USBStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage\src\Arduino_POSIXStorage.cpp
Alternatives for Arduino_USBHostMbed5.h: [Arduino_USBHostMbed5@0.3.1]
ResolveLibrary(Arduino_USBHostMbed5.h)
  -> candidates: [Arduino_USBHostMbed5@0.3.1]
Alternatives for SDMMCBlockDevice.h: [Portenta_SDCARD@1.0]
ResolveLibrary(SDMMCBlockDevice.h)
  -> candidates: [Portenta_SDCARD@1.0]
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost\USBDeviceConnected.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost\USBEndpoint.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost\USBHost.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost3GModule\WANDongle.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost3GModule\WANDongleSerialPort.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostHID\USBHostKeyboard.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostHID\USBHostMouse.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostHub\USBHostHub.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostMIDI\USBHostMIDI.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostMSD\USBHostMSD.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostSerial\USBHostSerial.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\targets\TARGET_STM\USBEndpoint_STM.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\targets\TARGET_STM\USBHALHost_STM.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD\src\BSP.c
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD\src\SDMMCBlockDevice.cpp
Generating function prototypes...
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD\src -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o C:\Users\Ali Jahangiri\AppData\Local\Temp\4173928976\sketch_merged.cpp
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Ali Jahangiri\AppData\Local\Temp\4173928976\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/cxxflags.txt" -MMD -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\\Arduino_UnifiedStorage\\src" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\Arduino_POSIXStorage_1.2.0_e7053177655041b1\\Arduino_POSIXStorage\\src" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\\Arduino_USBHostMbed5\\src" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\libraries\\Portenta_SDCARD\\src" -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino/api/deprecated" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino/api/deprecated-avr-comp" "-iprefixC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino" "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\sketch\\AdvancedUSBInternalOperations.ino.cpp" -o "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\sketch\\AdvancedUSBInternalOperations.ino.cpp.o"
Compiling libraries...
Compiling library "Arduino_UnifiedStorage"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\Arduino_UnifiedStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\Folder.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\UFile.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\InternalStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\USBStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\SDStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\Partitioning.cpp.o
Compiling library "Arduino_POSIXStorage"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_POSIXStorage\Arduino_POSIXStorage.cpp.o
Compiling library "Arduino_USBHostMbed5"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost\USBDeviceConnected.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost\USBEndpoint.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostHID\USBHostKeyboard.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\targets\TARGET_STM\USBEndpoint_STM.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostMIDI\USBHostMIDI.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost\USBHost.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\targets\TARGET_STM\USBHALHost_STM.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost3GModule\WANDongle.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostHub\USBHostHub.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostMSD\USBHostMSD.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostSerial\USBHostSerial.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostHID\USBHostMouse.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost3GModule\WANDongleSerialPort.cpp.o
Compiling library "Portenta_SDCARD"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Portenta_SDCARD\BSP.c.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Portenta_SDCARD\SDMMCBlockDevice.cpp.o
Compiling core...
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\core\variant.cpp.o
Using precompiled core: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\cores\arduino_mbed_portenta_envie_m7_82d9f75b7c30def42734a5d8276820eb\core.a
Linking everything together...
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++" -E -P -x c -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/linker_script.ld" -o "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/linker_script.ld"
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++" "-LC:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C" -Wl,--gc-sections -w -Wl,--as-needed -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/ldflags.txt" "-TC:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/linker_script.ld" "-Wl,-Map,C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.map" --specs=nosys.specs -o "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.elf" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\sketch\\AdvancedUSBInternalOperations.ino.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\Arduino_UnifiedStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\Folder.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\InternalStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\Partitioning.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\SDStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\UFile.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\USBStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_POSIXStorage\\Arduino_POSIXStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost3GModule\\WANDongle.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost3GModule\\WANDongleSerialPort.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostHID\\USBHostKeyboard.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostHID\\USBHostMouse.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostHub\\USBHostHub.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostMIDI\\USBHostMIDI.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostMSD\\USBHostMSD.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostSerial\\USBHostSerial.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost\\USBDeviceConnected.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost\\USBEndpoint.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost\\USBHost.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\targets\\TARGET_STM\\USBEndpoint_STM.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\targets\\TARGET_STM\\USBHALHost_STM.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Portenta_SDCARD\\BSP.c.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Portenta_SDCARD\\SDMMCBlockDevice.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\core\\variant.cpp.o" -Wl,--whole-archive "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/..\\..\\cores\\arduino_mbed_portenta_envie_m7_82d9f75b7c30def42734a5d8276820eb\\core.a" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/libs/libmbed.a" -Wl,--no-whole-archive -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.elf" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.bin"
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.elf" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.hex"
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\bootloaders\PORTENTA_H7\portentah7_bootloader_mbed_hs_v2.elf syntax error: no colon char on the first line character at line 1 

Using library Arduino_UnifiedStorage at version 1.1.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage
Using library Arduino_POSIXStorage at version 1.2.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage
Using library Arduino_USBHostMbed5 at version 0.3.1 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5
Using library Portenta_SDCARD at version 1.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD

Used library           Version Path
Arduino_UnifiedStorage 1.1.0   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage
Arduino_POSIXStorage   1.2.0   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage
Arduino_USBHostMbed5   0.3.1   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5
Portenta_SDCARD        1.0     C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD

Used platform         Version Path
arduino:mbed_portenta 4.1.1   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Activity

  1. changed the title [-]When `sketch.yml` specifies `fqbn`, `--profile` should override the default `fqbn` input[/-] [+]Allow FQBN to be defined in build profile alone[/+] on May 14, 2024
  2. 2bndy5 commented on May 12, 2026

    @2bndy5
    Contributor

    I've been thinking about an idiomatic way to support this. Explicitly supporting per-sketch configurations (sketch.yml) would be best served with 2 changes to this GH action's inputs:

    1. The fqbn input can be overridden if a sketch.yml is present, otherwise the default or user-provided value is applied. (the original feature request)

    2. The sketch-paths input should take either

      1. A YAML list of maps in which the keys would describe the sketch path and its corresponding profile(s) in the sketch.yml config. This is my main proposal toward satisfying this feature request; see example snippet below. If a profile name doesn't match any in sketch.yml, then fallback to fqbn with a warning.
      2. A simple YAML list of sketch paths -- the format currently preferred by this GH action since v1 (its python script era)
      3. A one line space-separate list of sketch paths -- the format supported by this GH action before v1 (its bash script days)

    An example of my proposal in point 2i:

    sketch-paths: |-
      - sketch-path: examples/my-example
        profile: a-profile-name
      - sketch-path: examples/my-other-example
        profile: 
          - another-profile-name
          - a-second-profile-name

    Added complexity

    Of course this opens up a whole can of worms about platforms and libraries inputs, specifically how they may conflict with the libraries and/or platforms fields in sketches.yml. The libraries and/or platforms specification in sketches.yml is very different from the action's inputs. This GH action's inputs should probably take precedence over the counterparts in the sketches.yml. For example, this GH action does not require the lib name of deps that originate from a repo, path, or downloaded archive. So how would this GH action know if a lib specified in sketch.yml is already installed by other means? Should this GH action even bother and just delegate the conflict to the arduino-cli?

    Considering compilation of a base ref for size deltas and/or warnings info, what would be the expected behavior if a profile name was changed between the git head and base refs? This is why I was thinking multiple profile names as the new input would be useful (but probably not practical for this scenario).

    Being able to compile several boards in the same workflow run makes putting together a report a lot more complicated because both fqbn (from sketch.yml or action input) and the sketch path has to be accounted for when aggregating compilation result about a single sketch. Currently, only the sketch path is really needed, and the JSON artifacts are saved as separate files per fqbn. Fortunately, the JSON artifacts' format is flexible enough, almost like this idea was planned but never implemented. Moving forward with this requested feature, I think it would be better to name the JSON artifacts using a non-human-friendly workflow ID number prefixing an abbreviated hash of the user-provided inputs: ${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-<8-hex-digit-hash>1 to differentiate from multiple jobs in a single workflow's run.


    Looking at the sketch.yml docs, they don't seem as deterministic as the action's inputs. For example, the sketch.yml library version is optional and would be provided as extra string data at the end of the library's name; whereas this GH action uses dedicated fields for a library's name (required) and version (optional).

    I'd feel more confident about supporting a sketch.yml config if the specification was versioned or allowed specifying a semantic version range of the arduino-cli.

    Footnotes

    1. See GH docs about default env variables (and scroll down the table) ↩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions