Skip to content

Make project PlatformIO compilable #207

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

maxgerhardt
Copy link

@maxgerhardt maxgerhardt commented May 18, 2021

PlatformIO is a Python commandline tool with supplementary VSCode and CLion extensions for building embedded firmwares in a platform-independent way. PlatformIO is also able to generate project files for 11 desktop IDEs in which the project can be seamlessly edited and uploaded.

Based on issue #206 and the related community topic I've created

  • the needed platformio.ini configuration file so that
    • this is a PlatformIO-recongized project
    • all build and upload options that the Makefile would apply for compilation are applied during the PlatformIO build
  • scripts that reproduce the Makefile's behavior regarding creating a version.c from git describe
  • precompiled uploader tool lpc21isp for Windows (compiled with Visual Studio) and Linux

So, building this firmware on the CLI is as simple as having PlatformIO installed (pip install platformio) and executing pio run for compiling and pio run -t upload for upload. (Or use the VSCode plugin to nicely load and edit the project). The experience is that it's an easily loadable, editable and uploadable project.

grafik

The Makefile buildsystem still works exactly as before, and has been slightly adapted to be PlatformIO as well as Makefile compilable. These changes include renaming .s files to .S (PIO treats these extension differently) and removing the PlatformIO-generated version.c file.

@GitLang
Copy link

GitLang commented May 19, 2021

Builds fine directly from an unzip. Just the two trivial warnings which we've had all along -

src\cr_startup_lpc21.S:63:1: warning: "/*" within comment [-Wcomment]
/*****************************************************************************/

src\cr_startup_lpc21.S:79:1: warning: "/*" within comment [-Wcomment]
/*****************************************************************************/

Also, again trivial, PlatformIO complains if there isn't an /include directory, empty or not.

eoa-electronics pushed a commit to eoa-electronics/T-962_ImprovementsV2 that referenced this pull request Feb 15, 2023
Make Firmware PlatformIO compatible as of UnifiedEngineering#207
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

Successfully merging this pull request may close these issues.

2 participants