Setting up a D1a development system
This page contains information on setting up a D1a development system. For other specific D1 development systems, see Specific development systems.
A development computer
Most personal computers (PCs) can serve as a development computer. The primary requirement is that it have a 64-bit x86 microprocessor architecture (primarily made by Intel and AMD), which currently includes the vast majority of PCs. Further requirements are as follows.
- Operating system:
- Windows or
- MacOS or
- Linux.
- At least 4 GB RAM, but 8 GB is preferable.
- At least 26 GB of free local storage.
- A USB port.
Installing your virtual machine and IDE
We will now install on your development computer a virtual machine (VM) that already includes an integrated development environment (IDE).
Download and install the latest VirtualBox release (choose your operating system): www.virtualbox.org/wiki/Downloads VirtualBox is a hypervisor that lets you run virtual machines.
Download and install the VirtualBox Extension Pack from the same page.
Download and install Vagrant: https://developer.hashicorp.com/vagrant/install Download the version corresponding to your operating system. Vagrant is a virtual machine builder.
Download1 the latest release D1a.zip of the code repository listed here: github.com/rtc-book/D1a/releases
Unzip the code repository file. We should now have the release in a directory D1a.
Generate your virtual machine via a terminal window.2 In a terminal window,
cd
into the D1a directory and enter the commandvagrant up
After several minutes (the download is large), this will create a new VM
rtcbook-D1a
that should be available in VirtualBox and boot up.Intel MacOS users: An ongoing bug in VirtualBox requires that we launch the VirtualBox app with administrator privileges.
Shut down the VM by shutting down Windows in the usual way.
Open a terminal window and execute the command
sudo virtualbox
You will be prompted for your MacOS password, which you should enter. (Note: when typing your password, the cursor will not appear to move, but the terminal is receiving your password.)
Your VM won’t be listed. Click
Add
and browse to ~/VirtualBox VMs/rtcbook-D1a/rtcbook-D1a.vbox; click . Now you are able to the VM.Whenever you shut down your VM, you will need to relaunch it from the terminal with
sudo
.
Username and password
The default user in the virtual machine is Vagrant
and the password is vagrant
. You may not be prompted for a
password.
Installation finished!
After this initial setup, the virtual machine can be accessed directly through VirtualBox. For information about configuring, updating, and troubleshooting your VM, see below.
Configuring, updating, and troubleshooting the VM
Configuring your virtual machine
There are many configuration options for your VM in VirtualBox,
accessible in the app through Settings
,
which are documented here: www.virtualbox.org/manual/ch03.html
Most commonly, you may want to configure your www.virtualbox.org/manual/ch03.html#settings-system
settings to improve performance:You may also want to configure your www.virtualbox.org/manual/ch03.html#settings-display
settings to improve the scale, video performance, etc.:Updating
There are two primary components you may want to update.
Updating
your copy of the vm-vagrant
repository
If there is an update to the repository, you have a few options for updating your local copy.
If you forked this repo
In this case, use GitHub’s instructions: docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork … TODO write instructions
If you cloned this repo
In this case, you can simply cd
to
your local copy and
git pull
Note that you cannot push your changes back to the remote (GitHub) because you do not have permissions.
If you downloaded the ZIP of this repo
You are pretty much stuck re-downloading or choosing one of the other methods (described in step 4 of Installation) for getting this repo.
Warning You should consider saving your old workspace
directory and potentially bringing
in your work to the new copy.
Updating the Vagrant box
If you would like to update a local Vagrant box built with a previous
version of drrico/rtcbook
, app.vagrantup.com/drrico/boxes/rtcbook which is the
base of your VM, first delete your old VM in VirtualBox (back up
anything you’ve saved in the machine; the shared folder will not be
deleted from the host).
With the associated VM deleted, update your local boxes with the following.
vagrant box update
You can now re-generate your VM, as before.
vagrant up
You may then want to get rid of your local copy of the old box.
vagrant box prune
Troubleshooting installation
Here are some general considerations, independent of host OS.
- When generating the virtual machine,
A VirtualBox machine with the name 'rtcbook-dist' already exists
: You have already built the virtual machine. If you are just trying to open the virtual machine, there’s no need to rebuild, open VirtualBox and double-click your virtual machinertcbook-dist
. If it was unsuccessful and you want to retry, in VirtualBox, right-click the virtual machine . Now step 5 of jo should work.
MacOS host
- VirtualBox installation failed:
- Try this fix first.
- If that didn’t work, explore these options.
- Terminal permission problems:
- Go to → System Preferences → Security & Privacy → Privacy →
Full Disk Access and make sure
Terminal.app
is checked (may need to unlock). - Go to → System Preferences → Security & Privacy → Privacy →
Files and Folders and make sure
Terminal.app
is checked (may need to unlock).
- Go to → System Preferences → Security & Privacy → Privacy →
Full Disk Access and make sure
Troubleshooting the VM
The following issues may occur after installation.
Can’t connect to myRIO target
With the VM running, plugging in the myRIO to one of your computer’s USB ports should automatically connect it with your VM. If there are issues, try the following.
- Make sure the myRIO is connected to your computer via USB.
- With the VM running, go to the toolbar
Devices
→USB
and, if it is not checked, clickLinux 3.14.40 ...
. Verify that it is checked and retry. - Occasionally, the “Ethernet” connection can be corrupted. To ⊞ →
Settings
→Network & Internet
→Properties
→Change Adpater Options
. TheEthernet 2
connection should appear. Right-click on it and selectDiagnose
, as shown below. Try to automatically repair the connection. It may say the repair was unsuccessful, but it may in fact have worked.
If you know Git, you could also clone or fork the repository. For now, if you are unfamiliar with Git, please feel free not to get bogged down here.↩︎
A terminal or terminal “emulator” is an interactive command-line program in which a user enters text commands that are interpreted and executed by the operating system. On Windows, click and search for
cmd
and select the Command Prompt app. On macOS, type cmd+space and search forTerminal.app
.↩︎