Setting up a separate workspace


This page documents one of the main options for working with the Dooba SDK: working in a separate workspace.
If you haven't downloaded the SDK yet, we suggest you do that first. Follow the setup instructions to get started.

Getting dbuild in PATH

Before you can start using the SDK from a separate workspace, the dbuild build script needs to be made accessible from anywhere, by ensuring it's in your PATH.

The recommended way to get dbuild in your PATH is to create a symlink to it in /usr/bin.

Running the following from the SDK root will do just that:

sudo ln -s "`realpath ./dbuild`" /usr/bin

Recommended directory structure

Depending on whether you will have only one single user or multiple users working with the SDK, the recommended setup is to place it somewhere:
  • in your home folder (if only one user will build stuff)
  • in a system-wide location (if you have multiple users)

Your workspace will usually be a folder in your home directory such as ~/work.

The organization of your workspace is entirely up to you, just keep in mind that dbuild will produce an out folder wherever it is run, and place all build artifacts in there.

The general recommendation for your workspace is to create an src folder at its root, and create sub-directories in it for each firmware element (library / application).

This means you will end up with the following directory structure:
  • /home/example_user
  • toolz
  • DoobaFirmware
  • src
  • out
  • dbuild
  • work
  • src
  • test_library
  • example_project
  • out

With such a setup, dbuild can be run at the root of your work workspace directory. This will simply build everything in your workspace, unless you request to build a specific project using the -a APP_NAME command-line argument.

This is in fact the exact setup we use here at Dooba.