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

Improve PlatformIO project handling #12

Open
maxgerhardt opened this issue Nov 1, 2024 · 0 comments
Open

Improve PlatformIO project handling #12

maxgerhardt opened this issue Nov 1, 2024 · 0 comments

Comments

@maxgerhardt
Copy link

maxgerhardt commented Nov 1, 2024

Just some pointers for later:

  1. in the platformio.ini, instead of platform = ch32v (which expects an already installed ch32v platform), you can point to platform = https://github.com/Community-PIO-CH32V/platform-ch32v.git#18e295efcb1fee51f2b3855a9cccf886df251d88
    • this enables the project to be opened in PlatformIO/VSCode without having to previously open ch32v003fun in VSCode
    • this enables the project to be stable, pointing to a fixed commit of the platform (which contains a bunch of build logic, compiler version references etc.)
  2. you can additionally add platform_packages = framework-ch32v003fun@ https://github.com/cnlohr/ch32v003fun.git#f06633d2fbd13c6d240f8c52041a1b0f52dbce90 to fixate the ch32v003fun framework version the project is built against. (Taking the latest commit, which might not be your current lcal version -- hopefully there are no breaking changes)
    • This would enable the project to have a reproducable build and enable easier collaboration (since everyone's on the same version)
  3. Create a .github/workflows/build.yml file and copy-paste in the contents from https://docs.platformio.org/en/latest/integration/ci/github-actions.html and then change pio run to pio run -d firmware
    • this enables Github CI actions to automatically trigger a build of the firmware on a Ubuntu machine with PlatformIO
    • project gets the green checkmark in the github homepage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant