Skip to content

Add initial support for PlatformIO ecosystem #924

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

Merged
merged 3 commits into from
Feb 19, 2020

Conversation

valeros
Copy link
Contributor

@valeros valeros commented Feb 6, 2020

This PR adds build script for @platformio and a new Travis CI environment for testing internal libraries using platformio ci command.

@fpistm fpistm self-requested a review February 7, 2020 06:50
@fpistm
Copy link
Member

fpistm commented Feb 7, 2020

Hi @valeros and thanks

About the CI,did you plan or is it already done to move on GitHub actions ? I'm currently working to move our build and astyle checks on it.
Moreover, is it OK for you if there is an failed I ask you some support ?

Linked to platformio/platform-ststm32#345

@valeros
Copy link
Contributor Author

valeros commented Feb 7, 2020

Hi @fpistm !

Moreover, is it OK for you if there is an failed I ask you some support ?

Sure thing, ping me if there is something wrong with our build.

About the CI, did you plan or is it already done to move on GitHub actions ?

It should't be hard to port PlatformIO env to Github Actions, we probably can create a standalone workflow for it. Let me know when you're ready to switch to Github Actions.

Thanks!

@fpistm
Copy link
Member

fpistm commented Feb 14, 2020

@valeros
Looking at your script, it seems several things are hardcoded.
I guess this is the same for all other supported core but I guess it should be possible to move some of them generic by parsing the boards.txt and also the platform.txt ?
Is it something considered ?

@valeros
Copy link
Contributor Author

valeros commented Feb 14, 2020

Hi @fpistm ! What would you like to parse from boards.txt ,platform.txt? Anyway, feel free to modify whatever you think best.

@fpistm
Copy link
Member

fpistm commented Feb 17, 2020

Hi @fpistm ! What would you like to parse from boards.txt ,platform.txt? Anyway, feel free to
modify whatever you think best.

@valeros

I talk about those kind of hardcoded stuff:
https://github.com/stm32duino/Arduino_Core_STM32/pull/924/files#diff-a96e736475cb79393ad72ec653311807R182-R206

and several other hardcoded definition

@ivankravets
Copy link
Contributor

Hi @fpistm ,

We have a feature request for this platformio/platformio-core#969.
There is a technical problem here. Arduino's formats are not intended for advanced embedded development. It's very difficult to parse all these flags which depending on Arduino IDE Menu.

PlatformIO does not work with CC or C++ to build commands. We need a strict declaration of each flag in its special environment scope. Our users control the whole build process, they can add or remove any flag dynamically from a specific scope. The same, we have Library Dependency Finder which is built on top of virtual C Preprocessor based on Python. This is why PlatformIO is super fast and requires minimal memory and CPU resources. You can check:


We can actually use intermediate interface (JSON file or etc.) where you will provide all flags related to GCC Preprocessor scopes. Then you can use some script which will compress all of them into the 1 line for Arduino.

P.S: We don't have the aim to reinvent a wheel. We resolve the problems around the project building and maintaining.

@fpistm
Copy link
Member

fpistm commented Feb 19, 2020

@ivankravets
thanks for the explanation.
That was just a question 😉 Maybe a JSON file would be an intermediate step.

Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

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

Thanks @valeros and @ivankravets
I will apply black and flake8 later.

@fpistm fpistm merged commit 2412aef into stm32duino:master Feb 19, 2020
@ivankravets
Copy link
Contributor

Thanks !!! Please do not hesitate to contact us if something builds with Arduino IDE and does not build with PlatformIO. We will help ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants