Skip to content

Commit

Permalink
[PIO]Fix variant header changes
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Apr 9, 2021
1 parent 8e4832a commit 490c2f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/actions/pio-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/pl
}

# Fix for variant path change while not updated in PIO
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()" || {
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/F765V\\\\\(G-I\\\\\)\\\\\(H-T\\\\\)_F767V\\\\\(G-I\\\\\)\\\\\(H-T\\\\\)_F777VI\\\\\(H-T\\\\\)'; data['build']['extra_flags'] = '-DSTM32F765xx -DCUSTOM_PERIPHERAL_PINS -DVARIANT_H=\\\\\"variant_REMRAM_V1.h\\\\\"'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
exit 1
}
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()" || {
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'; data['build']['extra_flags'] = '-DSTM32F1 -DSTM32F103xB -DVARIANT_H=\\\\\"variant_PILL_F103XX.h\\\\\"'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
exit 1
}

Expand All @@ -33,6 +33,7 @@ tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || {
cd "$GITHUB_WORKSPACE/CI/build/" || {
exit 1
}
python3 platformio-builder.py --board=blackpill_f103c8 --board=remram_v1
# python3 platformio-builder.py --board=blackpill_f103c8 --board=remram_v1
python3 platformio-builder.py --board=blackpill_f103c8

exit $?

0 comments on commit 490c2f0

Please sign in to comment.