Open main menu

Dooba SDK on Windows

Contents

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 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 https://www.virtualbox.org/wiki/Downloads.

Then, download an Ubuntu image (ISO file) from https://ubuntu.com/download/desktop/thank-you?version=20.04.1&architecture=amd64 https://ubuntu.com/download/desktop/thank-you?version=20.04.1&architecture=amd64

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

 

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".

 

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.

 

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.

 

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

 

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

 

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

 

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

 

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

 

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 https://get.rvm.io | 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 https://bitbucket.org/dooba_core/sdk/raw/master/install.sh | 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