Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow selection ofbuild.core andbuild.variant with variables substitution#2176

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@cmaglie
Copy link
Member

Please check if the PR fulfills these requirements

Seehow to contribute

  • The PR has no duplicates (please search among thePull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • 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 propertiesbuild.core andbuild.variant to have variable substitution placeholders like{variable}.

What is the current behavior?

Thebuild.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 istitled accordingly?

No

Other information

Fix#762

fpistm reacted with hooray emoji
@cmagliecmaglie added type: enhancementProposed improvement topic: codeRelated to content of the project itself labelsMay 9, 2023
@cmagliecmaglie added this to theArduino CLI 0.33.0 milestoneMay 9, 2023
@cmagliecmaglie self-assigned thisMay 9, 2023
@cmagliecmaglieforce-pushed thefix_variant_and_core_selection branch fromd316186 to9ba7599CompareMay 9, 2023 17:21
@codecov
Copy link

codecovbot commentedMay 9, 2023

Codecov Report

Patch coverage:100.00% and project coverage change:+0.06 🎉

Comparison is base(855c238) 62.53% compared to head(9ba7599) 62.60%.

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
FlagCoverage Δ
unit62.60% <100.00%> (+0.06%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
arduino/cores/packagemanager/package_manager.go76.48% <100.00%> (-0.58%)⬇️
arduino/libraries/loader.go92.76% <100.00%> (+10.09%)⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment?Let us know in this issue.

Copy link
Contributor

@alessio-peruginialessio-perugini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🚀

@fpistm
Copy link
Contributor

fpistm commentedMay 10, 2023
edited
Loading

Hi@cmaglie,@matthijskooijman

I've tested this PR and it works same result before and after boards.txt changes.

arduino-cli Version:

git-snapshot Commit: 9ba7599c Date: 2023-05-10T06:57:20Z

command line:

./arduino-cli compile -b STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE --build-path build_blink C:\\IDE\\arduino-1.8.19\\examples\\01.Basics\\Blink\\Blink.ino

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.

cmaglie and umbynos reacted with hooray emoji

@cmagliecmaglie merged commitd563755 intoarduino:masterMay 10, 2023
@cmagliecmaglie deleted the fix_variant_and_core_selection branchMay 10, 2023 13:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@MatteoPologrutoMatteoPologrutoAwaiting requested review from MatteoPologruto

@matthijskooijmanmatthijskooijmanAwaiting requested review from matthijskooijman

2 more reviewers

@alessio-peruginialessio-peruginialessio-perugini approved these changes

@umbynosumbynosumbynos approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@cmagliecmaglie

Labels

topic: codeRelated to content of the project itselftype: enhancementProposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Properties expansions insidebuild.variant break core build

4 participants

@cmaglie@fpistm@alessio-perugini@umbynos

[8]ページ先頭

©2009-2025 Movatter.jp