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
Add arduino_ide package #2888
Add arduino_ide package #2888
Conversation
Update to use ENV["CREW_NOT_STRIP"]
@JL2210: Were you planning on updating this PR? We only need a few changes, correct? |
@uberhacker Done. |
I was away from the Chromebook/Internet over Thanksgiving. I had an uncle over. |
system "echo 'sudo chmod o+w /dev/ttyACM*' >> arduino" | ||
system "echo 'sommelier -X --x-display=\$DISPLAY --scale=\$SCALE #{CREW_PREFIX}/share/arduino-#{version}/arduino \"$@\"' >> arduino" | ||
system "echo 'echo \"Disabling Arduino write access...\"' >> arduino" | ||
system "echo 'sudo chmod o-w /dev/ttyACM*' >> arduino" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I follow this logic. Why do you need write access to the devices? That seems odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can flash the compiled code to their chips/onboard storage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need write access to device files to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The /dev/ttyACM*
files are device files pointing to to the Arduino devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What needs to write to the device files? That doesn't make any sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board."
The Arduino IDE needs to write the compiled code to the Arduino via. the device files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it needs to write to Arduino, not the actual device files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The onboard storage of the Arduino IS the device file. The device file isn't writable unless we allow write access to it, which we're doing with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2841 (comment)
system "echo >> arduino" | ||
system "echo 'echo \"Enabling Arduino write access...\"' >> arduino" | ||
system "echo 'sudo chmod o+w /dev/ttyACM*' >> arduino" | ||
system "echo 'sommelier -X --x-display=\$DISPLAY --scale=\$SCALE #{CREW_PREFIX}/share/arduino-#{version}/arduino \"$@\"' >> arduino" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the sommelierd
daemon handle this also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work in this case. There must be something wrong with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing wrong with sommelier. You likely just need to create a symlink:
system "ln -s #{CREW_PREFIX}/share/arduino-#{version}/arduino #{CREW_DEST_PREFIX}/bin/arduino"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't work. The sommelier daemon doesn't run it properly. It also still needs to make the device files writable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm still not understanding why you would need to write to device files. A device file is not meant for storage. If you run the arduino executable by itself, it should work with the sommelierd daemon running just like any other executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The application accesses the Arduino by way of opening the device files. It evidently doesn't work, even while running startsommelier && /usr/local/share/arduino-1.8.7/arduino
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I guess this is enough back and forth. I'm merging it. :)
Fixes #2841
Depends on #2887
Add arduino_ide package
Tested on: