Skip to content

Commit 5d72564

Browse files
committed
[PIO]Fix variant header and path changes
This is is only a workaround to allow the PIO build action. Targets have been changed due to '(' and ')' in their paths which prevent the build even if they are protected. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent d1efc23 commit 5d72564

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/actions/pio-build/entrypoint.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/pl
1313
}
1414

1515
# Fix for variant path change while not updated in PIO
16-
python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/boards/remram_v1.json'), 'r+'); data=json.load(fp); data['build']['variant'] = 'STM32F7xx/REMRAM_V1'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
16+
python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/boards/malyanm300_f070cb.json'), 'r+'); data=json.load(fp); data['build']['variant'] = 'STM32F0xx/F070CBT'; data['build']['extra_flags'] = '-DSTM32F070xB -DVARIANT_H=\\\\\"variant_MALYANMx00_F070CB.h\\\\\"'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
1717
exit 1
1818
}
19-
python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/boards/blackpill_f103c8.json'), 'r+'); data=json.load(fp); data['build']['variant'] = 'STM32F1xx/PILL_F103XX'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
19+
python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/boards/nucleo_l152re.json'), 'r+'); data=json.load(fp); data['build']['variant'] = 'STM32L1xx/L151RET_L152RET_L162RET'; data['build']['extra_flags'] = '-DSTM32L152xE -DVARIANT_H=\\\\\"variant_NUCLEO_L152RE.h\\\\\"'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
2020
exit 1
2121
}
2222

@@ -33,6 +33,6 @@ tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || {
3333
cd "$GITHUB_WORKSPACE/CI/build/" || {
3434
exit 1
3535
}
36-
python3 platformio-builder.py --board=blackpill_f103c8 --board=remram_v1
36+
python3 platformio-builder.py --board=malyanm300_f070cb --board=nucleo_l152re
3737

3838
exit $?

0 commit comments

Comments
 (0)