Dooba SDK on Windows

From Dooba Wiki
Revision as of 11:49, 28 September 2020 by Eresse (talk | contribs) (Created page with "== Introduction == This page discusses the possible ways to use the Dooba SDK from Windows. While many developers are comfortable with using a Linux distribution on their ma...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This page discusses the possible ways to use the Dooba SDK from Windows.

While many developers are comfortable with using a Linux distribution on their main computer, a large number of users are using Microsoft's Windows operating system.

The Dooba SDK was originally built with Linux in mind, however this does not mean that Windows users are left out. Thanks to the SDK being built using Ruby and Microsoft now integrating the Windows Subsystem for Linux (WSL), the Dooba tools directly from Windows.

Also, setting-up and running virtual machines has become increasingly easy and straightforward.

Using WSL (Windows Subsystem for Linux)

WSL allows running Linux applications directly inside Windows. For some developers this may be the simplest options, especially if WSL is already installed.

The steps to get WSL are simple:

Once this is done, you can open a Linux command line in Windows from the start menu (Start -> Ubuntu).

Using a virtual machine

Using a virtual machine is probably the easiest solution for most people. This requires no modifications to your Windows environment - you just need to install one application (VirtualBox or other hypervisor).

The steps below will be presented with VirtualBox, but should be fairly similar for any hypervisor out there.

VirtualBox is a free software that allows running virtual machines with ease.

VirtualBox download
VirtualBox extension pack download

Install the VirtualBox software and the free extension pack. They can be downloaded

Then, download an Ubuntu image (ISO file) from

Now, open VirtualBox. The main window offers many options, but the one we want is "New" to create a new virtual machine.

Vbox new.png

This will prompt a bunch of questions to configure the new virtual machine. Let's quickly go through what we need.

Be sure to give your new VM at least 2048 MB of RAM and select "Create a virtual hard disk now".

Vbox create.png

The next page will create a virtual hard disk for the VM. Give it at least 20 GB of size and select "Dynamically allocated" for the physical storage.

Vbox vhd.png

Completing this will take us back to the main window, where we can now see our VM. Let's configure some settings before starting it up.

Vbox settings.png

First, let's give the machine two processors (if possible).

Vbox settings cpu.png

Then, from the "Display" tab, select 128 MB of video memory.

Vbox settings dsp.png

Next, in the storage tab, we need to select the ISO file we downloaded earlier and assign it to the virtual CD-ROM drive.

Vbox settings sto.png

Finally, we can ensure "USB 2.0" is selected in the USB tab.

Vbox settings usb.png

After clicking "Ok" the settings window will disappear. Time to start the VM!

Vbox start.png

Because the Ubuntu CD (ISO file) is associated with the virtual CD-ROM drive of the VM, booting up the vritual machine will start the Ubuntu installation disc.

Simply follow the instructions until Ubuntu is fully installed in your virtual machine.

Setting up the environment

Whether you are going with a virtual machine or WSL, you will need to run the following commands in a Linux terminal to get started:

# Update Linux package definitions
sudo apt-get update

# Install Git, GPG and Curl
sudo apt-get install git gnupg2 curl

# Install Ruby Version Manager
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL | bash -s stable

After this, close the terminal and open a new one (to reload the environment variables). From there, a few more steps are required:

# Install Ruby (this may prompt you for your password to install dependencies)
rvm install ruby

# Install the Dooba SDK
curl -s | bash -l

And that's it! If you again close the terminal and open a new one, you should now be able to use all Dooba SDK commands such as dscaff, dbuild, dflash etc...

avr-gcc segfault on Windows

For some obscure reason, many people have an issue on Windows with the avr-gcc compiler where it crashes with a segmentation fault when attempting to compile anything.

If you experience trouble when trying to compile, an alternative version of avr-gcc can be installed, which works without any errors on Windows. However this version seems to produce some code errors in some advanced cases (for example, the Kiwi bootloader cannot be built reliably with this version of avr-gcc).

To install this alternative version, simply use this command:

# Install AVR Tools
sudo apt-get install avr-libc