Skip to content
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

Use 'extends' for STM32F1 #18099

Merged

Conversation

sjasonsmith
Copy link
Contributor

Description

Utilize extends in PlatformIO to extract the commonalities between all STM32F1 environments.

Visual Studio Code doesn't properly recognize environments if their platform is included as part of an extends variable. For this reason I have left platform in each environment even though PlatformIO does not require it.

This PR overlaps with another PR of mine: #18089.
If this PR is merged then #18089 is not necessary.

Benefits

Allows STM32F1-specific changes to be made in one place and apply to all environments.
In this changelist, the only real change is reducing the version of the Adafruit MAX31865 library, since version 1.2 is incompatible with the STM32F1 HAL.

Related Issues

#18081

Leave platform in each environment, to enable it to work properly in Visual Studio Code.
@sjasonsmith sjasonsmith changed the title Extract common components for STM32F1 environments Extract common elements for STM32F1 environments May 24, 2020
@sjasonsmith
Copy link
Contributor Author

I am currently printing on an SKR Mini E3 1.0 built using these changes from inside VS Code.

@sjasonsmith
Copy link
Contributor Author

I've updated this to use a dynamic variable for the platform name, rather than redefining ststm32 in every environment. This way we satisfy VS Code's need for every environment to contain a platform entry, while still allowing it to be overridden from one place.

@thinkyhead
Copy link
Member

thinkyhead commented May 25, 2020

Unfortunately, last I checked with PlatformIO, the VSCode extension still doesn't know what to do with extends and it won't display any environment that includes it in the Tasks list. That's why I have not re-applied extends yet since I first tried it in December.

@thinkyhead
Copy link
Member

Just checked, and the PlatformIO extension still hasn't been updated since November. So we have to wait for that to happen before we can enjoy the benefits of extends.

@sjasonsmith
Copy link
Contributor Author

Unfortunately, last I checked with PlatformIO, the VSCode extension still doesn't know what to do with extends and it won't display any environment that includes it in the Tasks list. That's why I have not re-applied extends yet since I first tried it in December.

@thinkyhead, it shows them as long as you define platform in each environment. If you comment out platform they disappear as you describe.

@thinkyhead
Copy link
Member

Oh, that's interesting. I wonder why that matters.

@thinkyhead thinkyhead merged commit 5fefecc into MarlinFirmware:bugfix-2.0.x May 25, 2020
@thinkyhead thinkyhead changed the title Extract common elements for STM32F1 environments Use 'extends' for STM32F1 May 25, 2020
vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request May 29, 2020
jmp0x0000 pushed a commit to jmp0x0000/Marlin that referenced this pull request Aug 7, 2020
@sjasonsmith sjasonsmith deleted the Improvements/STM32F1 branch September 22, 2020 02:06
HairingX pushed a commit to HairingX/Marlin that referenced this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants