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

platformIO branch #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wraybowling
Copy link

I've been having trouble getting hemispheres suite compiling, even using the slightly different instructions in the wiki. I wondered if we might try out PlatformIO. I discovered it while looking for a way to have Travis CI run unit tests and verify if PRs were safe to merge on an Arduino-based project of my own, and discovered that it also helps with making sure that a project has all of the specifics necessary to get anyone on any machine up and running with the correct dependencies. This is, at the time of this writing, a pretty dry and direct conversion to a PlatformIO project that simply moves the source code to a src directory, changes the main cpp file to main.ino and includes the platformio.ini necessary to run the build with the flags that are laid out in the wiki: USB is set to midi and the clock speed is set to 120MHz. You'll notice right away when trying this however that there is an error upon building that src/extern/stmlib_utils_random.cpp is not found. I suspect that in the Arduino IDE this error still occurs but is ignored and thus it only makes builds that produce a black screen which may be related to issue #58. I don't typically advocate for environment-specific changes because they tend to be frowned upon, but I thought we could at least try it out. As a bonus, if we get this working, you'll be able to have Travis automatically verify every future PR.

@chlirre
Copy link

chlirre commented Dec 11, 2020

I just built this successfully in PlatformIO after making the following change in src/extern/stmlib_utils_random.cpp:
#include "utils/stmlib_utils_random.h" -> #include "stmlib_utils_random.h"

I don't have the actual hardware yet to try it further.


In parallel to trying this solution, I tried the Makefile setup from https://github.com/apmorton/teensy-template/ with the source code from this repo. Got stuck on some missing EEPROM.h file.
Edit: Got past the missing EEPROM.h by adding it manually to the libraries, but new compilation errors followed. :/

@madskjeldgaard
Copy link

platformio support would be amazing!

@chlirre
Copy link

chlirre commented Jan 21, 2021

platformio support would be amazing!

@madskjeldgaard

I did some more (rabbit hole) digging since my previous post.
https://github.com/chlirre/O_C-HemisphereSuite/tree/platformIO/software

If you, or someone else, have access to a debuggable O_C you could try it out and let me know why it fails.
See: https://community.platformio.org/t/teensy-3-1-issue-firmware-uploading-but-no-indication-of-running/18398

@chlirre
Copy link

chlirre commented Jan 21, 2021

Also, I'd like to comment on @wraybowling s original remark that

I don't typically advocate for environment-specific changes

I would argue that anything written for Arduino in the Arduino IDE is at the apex of environment-specific.
Any change away from that is to be considered a generalisation.

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.

3 participants