Skill Level | Area of Focus | Operating System | Platform/Hardware |
---|---|---|---|
Beginner | Embedded, Robotics | Linux | Qualcomm Robotics RB3 Dev Kit |
Objective
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
Additional Resources
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 Installation

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

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"

2.2 Restart the udev service using below commands:
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo service 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.

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

3.2 Detect devices connected to host machine through USB interface, by executing the command below
$ dmesg | grep usb

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 device file[ttyUSB0] detection](https://developer.qualcomm.com/sites/default/files/img10-usb_device_filettyusb0_detection.png)
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

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


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

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

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

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


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

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.

6.3 Confirm that Fastboot is active as follows:
From Linux, run: $ sudo 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

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:

7.3 Execute the oecore-x86_64-aarch64-toolchain-nodistro.0.sh
command:

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

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

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-linux-gcc --sysroot=/usr/local/oecore-x86_64/sysroots/aarch64-oe-linux -O2 -fexpensive-optimizations -frename-registers -fomit-frame-pointer -Wl,-O1 -Wl,--hash-style=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/

8.3 Run the application:
$adb shell
/ # chmod u+x /bin/Hello
/ # Hello

The terminal will then output the expected print information:

Contributors
Name | Title/Company |
---|---|
Rakesh Sankar | Sr, System Architect Global Edge Software Ltd |
Akshay Kulkarni | Technical Lead Global Edge Software Ltd |
Vihari Sreeram | Senior Software Engineer Global Edge Software Ltd |
Vengamamba Patcha | Software Engineer Global Edge Software Ltd |