TonUINO
TonUINO copied to clipboard
PlatformIO integration
- modified for easy usage with PlatformIO
- removed compiler warnings
With those changes you just have to clone the TonUINO project into the PlatformIO projects folder, open the *.ino and build it.
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 subfolderTonUINO
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 : 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
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.
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
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.