Debugging

Published: June 19, 2019
Edited: November 29, 2019

Launch sample apps standalone without App manager

For debugging purpose you can run your applications standalone without the app manager. Once ssh into the raspberry Pi do the following,

A — Shutdown the app manager.

systemctl stop appmanager

B — Start the westeros service (Needed for graphics to be displayed).

systemctl start westeros

C — Run the provided run_partner_app.sh script provided in the partnerapps folder.

/usb/partnerapps/run_partner_app.sh

By default the above shell script runs the rne_triangle sample app. But it can easily be modified to run any app of your choosing by editing the last line in the script.

D — To use the app manager again, just start its service back up.

systemctl start appmanager

Breakpad support

Google breakpad support is available for the applications. For more information about Google breakpad and it’s integration, check this:

View — Breakpad

The static library is added as part of SDK.

The rne player application, included as part of Firebolt SDK samples, has breakpad support.

Troubleshooting

If a shared library has secondary dependencies which it cannot resolve, the following linker flags should be added to tell the linker to ignore its undefined symbols

-Wl, --allow-shlib-undefined

GDB Support

Currently GDB is not shipped with the firmware/SDK. It can be built with the sdk and copied to the device. Shell/SSH access is necessary to use it.

Download the source for gdb.

A — Make sure you are in a shell setup for Firebolt Development. Create a directory for installing gdb.

systemctl start appmanager

B — Enter the directory of the downloaded gdb source, CONFIGURE_FLAGS is already set in a Firebolt shell for cross compiling needs.

cd gdb-x.x
./configure $CONFIGURE_FLAGS<br>
--prefix=/path/to/gdb_install make<br>
//make install At the root of your usb key, create a usr //directory<br>
cd  /path_to_root_of_usb_key<br>
mkdir usr<br>
Collapse

C — Copy contents of gdb_install directory into usr on your usb key

cp -r gdb_install/*  /path_to_root_of_usb_key/usr/

D — Insert usb key into device. Edit run_partner_app.sh script with the following:

export LD_LIBRARY_PATH=/usb/usr/lib

E — Add the above to the script so gdb libs can be found. Change the launch line to prefix with the path to gdb on the key

/usb/usr/bin/gdb /usb/partnerapps/rne-triangle/rne_triangle

F — This launch script provided with the Firebolt SDK can be modified to launch any binary built with and without gdb. The launch script should be at the root of the partnerapps folder.

Caveat

Sometimes compiled library dependencies can exist in the Firebolt sdk but not on the firmware. For example, when running GDB it may say its missing libncursesw.so.5.

A — This can be resolved by copying the needed Firebolt SDK library onto our new lib directory on the key:

cp<br>
/path_to_sdk/sysroots/cortexa15t2hf-neon-rdk-linux-gnueabi/lib/libncurses.so.5<br>
/path_to_root_of_usb_key/usr/lib/

Generating Corefiles

To generate corefiles for Firebolt development purposes, insert the usb key into the device. Create a cores directory on the key.