TonUINO icon indicating copy to clipboard operation
TonUINO copied to clipboard

PlatformIO integration

Open quotschmacher opened this issue 4 years ago • 6 comments

  • modified for easy usage with PlatformIO
  • removed compiler warnings

quotschmacher avatar Sep 19 '19 06:09 quotschmacher

With those changes you just have to clone the TonUINO project into the PlatformIO projects folder, open the *.ino and build it.

quotschmacher avatar Sep 24 '19 10:09 quotschmacher

Hi quotschmacher,

I also just cloned the Tonuino repo and made the DEV branch PlatformIO ready as I do want to contribute to the project and need a real IDE for development. After comparing my setup with the one of this pull request some remarks have come to my mind:

  • Moving Tonuino.ino into a subfolder TonUINO will break the default directory structure for all users and developers who still want to use Arduino IDE. If you use this platformio.ini setting the .ino file can stay where it is to keep the directory structure compatible with Arduino IDE:
[platformio]
src_dir = ./
  • I would recommend to add all PIO specific files to .gitignore so that regular users wont get confused by files which are not needed for them.

Finally I realized that you used the master branch as source for your modifications (and you want to merge the changes into master again). @xfjx: Am I right that the intended contribution process uses DEV branch as source and target for pull requests?

Regards, Thomas

DerTomm avatar Jan 01 '20 17:01 DerTomm

@DerTomm : Moving Tonuino.ino into a subfolder TonUINO will break the default directory structure for all users and developers who still want to use Arduino IDE. -> why should this break the Arduino IDE? Works for me in https://github.com/AlexanderWillner/TonUINO/tree/cleanup

AlexanderWillner avatar Jan 08 '20 12:01 AlexanderWillner

But why it is even necessary to move the file into a subfolder? At least in my environment PIO just takes the standard Tonuino.ino as main source file without any modifications. It was neither needed to rename its extension to .cpp nor did I have to move it to get it compiled.

DerTomm avatar Jan 08 '20 16:01 DerTomm

But why it is even necessary to move the file into a subfolder?

Not necessary, but best practice to have documentation, sources, tests, resources, ... in separate folders. Further it is necessary to use arduino-cli (however, I wrote a workaround).

At least in my environment PIO just takes the standard Tonuino.ino as main source file without any modifications.

This is correct. The current dev branch also follows this approach. However, the cleanup branch is using this ... well ... cleaner approach.

It was neither needed to rename its extension to .cpp nor did I have to move it to get it compiled.

Correct, not needed. However, best practice to use cpp file extensions for cpp source code. One reason: https://docs.platformio.org/en/latest/faq.html#convert-arduino-file-to-c-manually

AlexanderWillner avatar Jan 08 '20 20:01 AlexanderWillner

Okay, understood. On the other side I think that - as they want to keep the code and directory structure as close to plain Arduino IDE as possible - the maintainers won't accept PIO related PRs which will change this structure quite substantially.

DerTomm avatar Jan 09 '20 19:01 DerTomm