Back to All
Project

“Hello RB3” & Build Instructions

 

Skill Level Area of Focus Operating System Platform/Hardware
Beginner Embedded, Robotics Linux Qualcomm Robotics RB3 Dev Kit

This project is intended to help you get familiar with the Qualcomm® Robotics RB3 development kit, which is based on the Qualcomm® SDA845 processor, and then setup the development environment. To confirm the environment setup on the Qualcomm Robotics RB3 development kit you will build a basic “Hello RB3” application.

Objective

Get started with the Qualcomm Robotics RB3 development kit and run the basic applications within the development environment.

Materials Required / Parts List / Tools

  • Qualcomm Robotics RB3 Development Kit
  • Power adapter - 12V with 2500mA as per 96Boards specification
  • USB to Micro USB cable - For serial console interface (Minicom), ADB and Fast boot commands
  • USB to USB Type C cable - For connecting the USB3.0 Type C port and flashing images
  • Host PC OS for Qualcomm Robotics RB3 SDK build process - Host machine Operating System for SDK build

Source Code / Source Examples / Application Executable

“Hello RB3” application built per instructions below

Additional Resources

Qualcomm Robotics RB3 Development Kit

Build / Assembly Instructions

Set Up the Development Environment

This section describes how to set up the development environment on Ubuntu host machine and the steps to:

  • Compile the sample application (ex: “Hello RB3” app) using the App Toolchain SDK on a host PC.
  • Flash firmware images from host machine onto the Qualcomm Robotics RB3 development kit.

 

Install ADB, Fastboot, and USB host interface

This section provides instructions for installing ADB, Fastboot, and USB drivers on your host machine. The Fastboot tool communicates with the Qualcomm Robotics RB3 bootloader and allows you to flash images onto the board.

1. On the Linux (Ubuntu) host PC, install ADB and Fastboot

To install ADB and Fastboot, execute the following commands:

  sudo apt-get install android-tools-adb 
  sudo apt-get install android-tools-fastboot 
  sudo apt-get update 
  sudo apt-get upgrade 
adb

ADB Installation

fastboot

Fastbook Installation

2. Install and configure the USB driver

Setup the udev rules on your Linux Host PC as follows:

Navigate to the directory where 99-android.rules file is present


cd /etc/udev/rules.d
Path
Path to 99-android.rules file

2.1 Add the following rules in file 99-android.rules and in case the file is not present, create the file:


# fastboot for Robotics DragonBoard 845c
 SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0777",
 GROUP="adm"
 


# adb for Robotics DragonBoard 845c


SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0777",
 GROUP="adm"

Add
Add attributes to 99-android.rules file

2.2 Restart the udev service using below commands:


sudo chmod a+r /etc/udev/rules.d/99-android.rules
 sudo service udev restart
 

udev
udev restart

2.3 Connect the Qualcomm Robotics RB3 development kit to the PC with USB C cable:

2.4 Connect the power adapter to Qualcomm Robotics RB3 development kit.

2.5 Press Power button on the board and the system will start.

2.6 To check the list of devices, give command ‘adb devices’ from terminal in host PC and the device ID will be displayed.

Command
Command to List adb devices

3. Power on the Qualcomm Robotics RB3 Development Kit

Open the serial console tool on the host PC (minicom)

Note : Minicom is the serial communication tool used in this project to interact with Qualcomm Robotics RB3 development kit. It is also helpful in visualizing bootup logs and login screen of Qualcomm Robotics RB3 development kit while establishing connection and reset operations.

3.1 Download and install minicom through apt-get in Ubuntu.

sudo apt-get install minicom
Command
Command to install minicom

3.2 Detect devices connected to host machine through USB interface, by executing the command below

$ dmesg | grep usb
dmesg
dmesg logs

3.3 You should see the details and serial number of the product in dmesg logs displayed on the terminal

3.4 The detected device can usually be accessed through device files (ex: ttyUSB0) generated as soon as a device is connected.

3.5 The following image lists ttyUSB0 for the device connected

USB
USB device file[ttyUSB0] detection

4. Setup the minicom serial port to ttyUSB0 through the following commands

4.1 On host PC, do the following setup for minicom serial port

$ sudo minicom -s
Command
Command to open minicom

Go to the Serial port setup option from the list and confirm about serial device /dev/ttyUSB0) and set the Bps/Par/Bits to 115200 8N1

Serial
Serial port setup
Serial
Serial port configuration

4.2 Then choose ‘Save setup as dfl’

4.3 Don’t select “Exit from minicom” option. Choose “Exit” option ONLY to enter into minicom console

Minicom
Minicom console

5. Dip Switch Settings

5.1 Disconnect the power supply and turn on SW2 switch on the Dip Switch on RB3 board to enable the USB2.0 debug port. (The switch blueprint is provided in the Qualcomm Robotics RB3 Platform Linux User Guide).

5.2 Turn on SW3 switch on the Dip Switch to enable the auto power up on USB- C cable connection (along with power connector).

DIP
DIP switch on RB3

5.3 Connect the USB cable Micro-B plug to the USB2.0 debug port on the board and connect the other end to an available USB port on the host machine.

5.4 Connect the power supply to power connector of the board.

5.5 Plug the power supply into a power outlet. The green power-up LED should illuminate.

5.6 Press and release the power button on the device. The yellow LED0 should illuminate.

5.7 The board will start the booting process. Login credentials will display on the host PC:


sda845 login: root
Password: 123456
Login

Login to the RB3 through minicom

5.8 Access control security is provided by default through Security-Enhanced Linux (SELinux) and SElinux is turned on by default, which doesn’t support login as the root user. In order to overcome this, please close SElinux per the instructions below:

i. Connect the type C port of the Qualcomm Robotics RB3 board to the host PC using type C USB cable.

ii. Enter the following commands:

$ adb shell
# setenforce 0
Access
Access control security doesn’t allow to login
Set
Set ‘setenforce’ flag to ‘0’

Note: Debug logs for bootup process only can be visualized through minicom. File transfer and flashing can be done using ADB commands.

6. Flash the Firmware image

The procedure to download self-compiled OS for the Qualcomm Robotics RB3 development kit is given below:

NOTE: Ensure you have installed the required ADB and Fastboot drivers. Your board must be detected on your host machine.

Program system images using Fastboot

6.1 Once the host machine is able to detect the device, download the Qualcomm Robotics RB3 fastboot images package from the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “Firmware” section and unzip the file

Firmware
Firmware location in Thundercomm

6.2 Make sure that USB type C port is connected before flashing images on the device.To enter the fastboot mode, press and hold VOL- then press Power once to force the device to enter fastboot (or)

Run the command “adb reboot bootloader” from the command prompt to enter into fastboot.

Enter
Enter fastboot mode logs

6.3 Confirm that Fastboot is active as follows:

From Linux, run:

$ sudo fastboot devices
Command
Command to list fastboot devices

6.4 Flash images:

Navigate to folder containing flash_all.sh file in the downloaded firmware and run the following command from host PC

$ ./flash_all.sh
Logs
Logs during flashing image to RB3

After the script is executed, the board will reboot automatically

7. App Development and Installation

The Linux SDK for the Qualcomm Robotics RB3 development kit is built by Thundercomm. The platform is based on Yocto Rocko with Linux Kernel 4.9 and GCC 6.5.

Install the Application SDK

7.1 To run sample applications on the Qualcomm Robotics RB3 development kit, install on the Host PC the App Toolchain SDK, found on the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “Tools” section

7.2 Navigate to the SDK directory:

Navigate
Navigate to SDK directory

7.3 Execute the

oecore-x86_64-aarch64-toolchain-nodistro.0.sh
command:

Execution
Execution of script file to install App toolchain SDK

7.4 Choose the default target directory, press Enter and type Y.

SDK
SDK installation process

7.5 Configure the system environment:

$ cd
$ source /usr/local/oecore-x86_64/environment-setup-aarch64-oe-linux
$ source /usr/local/oecore-x86_64/environment-setup-armv7a-neon-oemllib32-linux-gnueabi
t
System
System environment configuration

7.6 Compile the app

Any application that is built on the host PC can be compiled using the below commands and then pushed (file transferred) onto Qualcomm Robotics RB3 board.

$ aarch64-oe-linus-gcc --sysroot=/usr/local/oecore-x86_64/sysroots/aarch64-oe-linux-02 -fexpensive-optimization-frename-registers -fomit-frame-pointer -Wl, -01 -Wl, -- hash-stylle=gnu -Wl, --as-needed Hello.c -o Hello

8. Hello RB3 Application

Once the App Toolchain SDK is installed, the first ‘Hello RB3’ application can be installed.

8.1 Create a source file and edit:

Using vim editor on host PC, create a source file and edit as given:

$ vi Hello.c
#include
#include
int main(void) {
printf(“Hello RB3 !!!\n”);
return 0;
}

 

8.2 Build and transfer the application

i. Build the application:

$ aarch64-oe-linus-gcc --sysroot=/usr/local/oecore-x86_64/sysroots/aarch64-oe-linux-02 -fexpensive-optimization-frename-registers -fomit-frame-pointer -Wl, -01 -Wl, -- hash-stylle=gnu -Wl, --as-needed Hello.c -o Hello

ii. Connect the Qualcomm Robotics RB3 board to the PC via Type C cable and ensure that the ADB port can be used (using ‘adb devices’ command). Transfer the application:

$ adb push Hello /bin/
adb
ABD command to push application binary to Qualcomm Robotics RB3

8.3 Run the application:


$adb shell
/ # chmod u+x /bin/Hello
/ # Hello
commands
commands to run ‘Hello RB3’ application

The terminal will then output the expected print information:

Hello
Hello RB3 app Output

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

Project Authors
Rakesh SankarSr, System Architect
Akshay KulkarniTechnical Lead
Vihari SreeramSenior Software Engineer
Vengamamba PatchaSoftware Engineer

Sign up for the Developer Newsletter.

Get software and hardware tool resources to help optimize your development delivered to your inbox weekly.

Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

Stay connected

Get the latest Qualcomm and industry information delivered to your inbox.

Subscribe
Manage your subscription

© Qualcomm Technologies, Inc. and/or its affiliated companies.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.