Skip to content

Commit eaeb794

Browse files
authoredApr 17, 2021
Merge pull request #1091 from fpistm/subvariant
[variant] Improve variant support and genericity
2 parents 3c414ec + 7ec57a1 commit eaeb794

File tree

3,851 files changed

+482443
-87921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,851 files changed

+482443
-87921
lines changed
 

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ platformio platform install "https://github.com/platformio/platform-ststm32.git"
1111
python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoststm32']['version'] = '*'; del data['packages']['framework-arduinoststm32']['owner']; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
1212
exit 1
1313
}
14+
15+
# 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/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()" || {
17+
exit 1
18+
}
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()" || {
20+
exit 1
21+
}
22+
1423
ln --symbolic "$GITHUB_WORKSPACE" "$HOME/.platformio/packages/framework-arduinoststm32" || {
1524
exit 1
1625
}
@@ -24,6 +33,6 @@ tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || {
2433
cd "$GITHUB_WORKSPACE/CI/build/" || {
2534
exit 1
2635
}
27-
python3 platformio-builder.py --board=blackpill_f103c8 --board=remram_v1
36+
python3 platformio-builder.py --board=malyanm300_f070cb --board=nucleo_l152re
2837

2938
exit $?

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ boards.local.txt
44
platform.local.txt
55
path_config.json
66
update_config.json
7+
variant_config.json
78

89
# Backup
910
*.bak
@@ -34,4 +35,4 @@ __pycache__/
3435
!.vscode/tasks.json
3536
!.vscode/launch.json
3637
!.vscode/extensions.json
37-
*.code-workspace
38+
*.code-workspace

0 commit comments

Comments
 (0)
Please sign in to comment.