@@ -76,30 +76,27 @@ jobs:
76
76
arduino-cli lib update-index
77
77
echo "Installing required libraries..."
78
78
arduino-cli lib install MIDIUSB
79
- arduino-cli lib install "Adafruit FreeTouch"
79
+ arduino-cli lib install Adafruit_FreeTouch # <--- CHANGED THIS LINE
80
80
arduino-cli lib install FlashStorage
81
81
echo "Library installation complete."
82
82
83
- - name : Set Hardware Define in Header # <--- RENAMED STEP TITLE
83
+ - name : Set Hardware Define in Header
84
84
env :
85
- CONFIG_FILE : " config.h" # <--- CHANGED TO config.h
85
+ CONFIG_FILE : " config.h"
86
86
CONFIG_DEFINE : ${{ matrix.hw_define }}
87
87
DEFINES_LIST : " V1_PCB V1_2_PCB V2_ADVANCED_PCB NO_PCB_GITHUB_SPECS"
88
88
run : |
89
89
echo "Setting Hardware Define to: ${CONFIG_DEFINE} in ${CONFIG_FILE}"
90
90
91
- # Check if config.h exists
92
91
if [ ! -f "$CONFIG_FILE" ]; then
93
92
echo "Error: $CONFIG_FILE not found!"
94
93
exit 1
95
94
fi
96
95
97
- # First, ensure all target defines are commented out
98
96
for DEF in $DEFINES_LIST; do
99
97
sed -i -E "s|^(\s*#define\s+${DEF})|//#define ${DEF}|" $CONFIG_FILE
100
98
done
101
99
102
- # Now, uncomment only the desired define
103
100
sed -i -E "s|^(\s*//\s*#define\s+${CONFIG_DEFINE})|#define ${CONFIG_DEFINE}|" $CONFIG_FILE
104
101
105
102
echo "--- Config File ($CONFIG_FILE) after modification ---"
@@ -108,9 +105,8 @@ jobs:
108
105
109
106
- name : Compile Sketch
110
107
env :
111
- SKETCH_DIR : " ." # Assuming firmware.ino and config.h are in the root.
108
+ SKETCH_DIR : " ."
112
109
run : |
113
- # We still compile the directory containing firmware.ino
114
110
arduino-cli compile --fqbn ${{ matrix.fqbn }} --output-dir build_output --export-binaries $SKETCH_DIR
115
111
116
112
- name : Find uf2conv.py
@@ -134,9 +130,9 @@ jobs:
134
130
135
131
- name : Convert to UF2
136
132
env :
137
- SKETCH_NAME : " firmware" # Your sketch name without .ino
138
- UF2_FAMILY_ID : " 0x68ED2B88" # Common for SAMD21 - VERIFY if needed
139
- UF2_BASE_ADDR : " 0x2000" # Common for SAMD21 - VERIFY if needed
133
+ SKETCH_NAME : " firmware"
134
+ UF2_FAMILY_ID : " 0x68ED2B88"
135
+ UF2_BASE_ADDR : " 0x2000"
140
136
run : |
141
137
BIN_FILE="build_output/${SKETCH_NAME}.ino.bin"
142
138
echo "Converting $BIN_FILE to ${{ matrix.uf2_name }}"
0 commit comments