Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing for several different target microcontrollers (on OS X 10.11), which requires some unique combinations of (Arduino) IDE version, library versions, USB drivers, support software, etc.

What are the pros and cons of using separate logged-in users for each environment as opposed to using Virtual Machines? Are there other methods commonly in use to separate environments, and also keep the environments archived for any legacy needs?

Update: I also have a desire to keep these environments as standard as possible: installing released components (e.g., IDE, drivers) and customizing IDE app settings, but trying to avoid source-level forks. This is for my own sanity, and to give best chance of replicating the environment in the future.

share|improve this question
    
That sounds horrible. What about 1.6.x doesn't let you handle all the boards? – Ignacio Vazquez-Abrams May 28 at 21:42
    
Even within 1.6.x there is a lot of variability between versions which can make things simply not work, especially for many alternate-hardware plugins. The "ordinary" Arduino installation organization for extensions and libraries is pretty seriously broken for any serious software development, being able to specify a custom library path would be a big help. Not needlessly complaining about .git folders would be a help, too. – Chris Stratton May 28 at 22:41
1  
You might be able to get custom per-version libraries/ and hardware/ folders by changing the sketchbook directory, the problem is that all versions from 1.5 on seem to want to store such configuration in the same place such as ~/.arduino15/preferences.txt - and it's not clear how you could change that without modifying the source or binary or playing some game like process-unique mounts (which are generally inheritable by children) – Chris Stratton May 28 at 22:50
    
You can run multiple versions of the IDE just fine. Just rename Arduino.app to e.g. Arduino-1.5.app. For the different libraries, you can just put the libraries into the app-package /Applications/Arduino.app/Contents/Java/libraries , instead of the regular libraries folder ~/Documents/Arduino/libraries. – Gerben May 29 at 13:25
    
@ignacio-vazquez-abrams, the other issue is wanting to avoid regression testing each working environment when updating IDE, libraries, etc. for just one. I'd like to pre-test updates in a non-production clone. – pseudon May 29 at 14:38

I'm yet to see evidence that there is a sound or comprehensive way to do this, so would be pleased to read better suggestions. As for why you would want to, there are a number of board support plugins/extensions that are moderately functional on some recent Arduino versions, but partially or entirely incompatible with others.

You can achieve a very limited partial version segregation by creating a new sketchbook folder for each version, which would host your libraries and hardware folders.

To get the IDE to pick this up, you could have a custom preferences file (rather than preferences.txt) with that sketchbook location set. You can specify the file to use on the command line, for example:

/opt/arduino-1.6.8/arduino --preferences-file ~/.arduino15/alternate.txt

However, there is still quite a bit related to extra board support and similar stored in the settings folder, and at present that is hard coded to the same "Arduino15" or ".arduino15" path for all recent versions.

This hard-coding of the settings folder is implemented in the version of Platform.java applicable to the operating system you are running under, so it is not clear how you could change this except at the source level, by modifying the jar, or by playing file-system level tricks with the operating system (process-unique mounts, etc).

share|improve this answer
    
Thanks for your helpful comments and answer. I'll wait to see if someone chimes in specifically about VMs vs. users, etc. (I haven't tried yet, so I'm not even positive if VMs will have issues of their own, but I'm hopeful). I'll also edit my question to include my desire to keep each environment as standard an install as possible (so I don't go insane keeping track of meta-customizations). – pseudon May 29 at 3:57
    
Either distinct user ID's (with the whole installation in a user-specific directory) or VMs would probably work pretty well... sorry I skipped over that, I just don't really consider it a reasonable thing to have to resort to for everyday development. – Chris Stratton May 29 at 5:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.