-
-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow selection of build.core
and build.variant
with variables substitution
#2176
Allow selection of build.core
and build.variant
with variables substitution
#2176
Conversation
d316186
to
9ba7599
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2176 +/- ##
==========================================
+ Coverage 62.53% 62.60% +0.06%
==========================================
Files 223 223
Lines 19488 19490 +2
==========================================
+ Hits 12187 12201 +14
+ Misses 6210 6202 -8
+ Partials 1091 1087 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Hi @cmaglie, @matthijskooijman I've tested this PR and it works same result before and after boards.txt changes. arduino-cli Version:
command line:
boards.txt patch@@ -281,10 +281,11 @@ Nucleo_64.build.board=Nucleo_64
Nucleo_64.build.variant_h=variant_{build.board}.h
Nucleo_64.build.st_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
Nucleo_64.build.flash_offset=0x0
Nucleo_64.upload.maximum_size=0
Nucleo_64.upload.maximum_data_size=0
+Nucleo_64.build.variant={build.series}/{build.subvariant}
# NUCLEO_C031C6 board
Nucleo_64.menu.pnum.NUCLEO_C031C6=Nucleo C031C6
Nucleo_64.menu.pnum.NUCLEO_C031C6.node="NOD_C031C6"
Nucleo_64.menu.pnum.NUCLEO_C031C6.upload.maximum_size=32768
@@ -408,11 +409,11 @@ Nucleo_64.menu.pnum.NUCLEO_F411RE.build.mcu=cortex-m4
Nucleo_64.menu.pnum.NUCLEO_F411RE.build.fpu=-mfpu=fpv4-sp-d16
Nucleo_64.menu.pnum.NUCLEO_F411RE.build.float-abi=-mfloat-abi=hard
Nucleo_64.menu.pnum.NUCLEO_F411RE.build.board=NUCLEO_F411RE
Nucleo_64.menu.pnum.NUCLEO_F411RE.build.series=STM32F4xx
Nucleo_64.menu.pnum.NUCLEO_F411RE.build.product_line=STM32F411xE
-Nucleo_64.menu.pnum.NUCLEO_F411RE.build.variant=STM32F4xx/F411R(C-E)T
+Nucleo_64.menu.pnum.NUCLEO_F411RE.build.subvariant=F411R(C-E)T
Nucleo_64.menu.pnum.NUCLEO_F411RE.build.cmsis_lib_gcc=arm_cortexM4lf_math
# NUCLEO_F446RE board
Nucleo_64.menu.pnum.NUCLEO_F446RE=Nucleo F446RE
Nucleo_64.menu.pnum.NUCLEO_F446RE.node=NODE_F446RE Thanks @cmaglie for this PR. |
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
Allows the properties
build.core
andbuild.variant
to have variable substitution placeholders like{variable}
.What is the current behavior?
The
build.core
andbuild.variant
must be constants, otherwise, the build will fail, see #762.This behavior is different from Arduino IDE 1.8.x which instead allows it.
What is the new behavior?
The variable substitution is performed as expected.
Does this PR introduce a breaking change, and is titled accordingly?
No
Other information
Fix #762