3.10. Graphics Application Migration

The migration guide will demonstrate how to port graphics application from a 32bit platform to a 64bit platform or vise-versa using the Processor Software Development Kit (PSDK).

32bit TI Platforms with GPU

64bit TI Platforms with GPU

AM335x, AM437x, DRA75x

AM62x, AM65x, TDA4VM

The Linux based graphics stack is very similar across various TI platforms. The only key difference is the GPU performance because of the differences in the GPU Hardware (HW) IP. The below picture summarizes the graphics stack:

../_images/Academy_Dev_GPU_stack_v1.png

In the above stack, only the “HW IP” block will be different across the 32bit platforms or the various 64bit platforms. The rest of the component blocks such as “Foundation SW” or “Window System” or “UI Frameworks” will remain identical across various platforms thus making it simpler for compiling and porting the graphics applications.

The below example will demonstrate how to port a graphics application designed on a 32bit platform and run it on a 64bit platform. The same concept also applies when going from a 64bit to 32bit platform or a 64bit to 64bit platform. Also, the 32bit application binary will not directly run on a 64bit system so we need to re-compile the application. However, the PSDK makes the compiling process very straightforward and here are the steps:

Step 1) Download and install the desired SDK for your target platform. In my case, I downloaded the latest AM62x SDK from the following link

Step 2) Run the following commands:

# cd <psdk_dir>/

# source linux-devkit/source environment-setup

The above step will configure all your essential variables such as compiler and link the necessary libraries required for host and target. The devkit also includes all the necessary libraries from the “Foundational SW” block such as DRM, GLES, EGL, Qt, Wayland and etc.

Step 3) Clone a GPU/Qt project that you wish to run on AM62x. In my case, I would like to run the Thermostat demo because it was designed for the AM335x(32bit platform) and I would like to run it on the AM62x(64bit platform). Here are the commands:

# git clone https://git.ti.com/cgit/apps/thermostat-demo

# cd thermostat-demo/

Step 4) Compile the Qt project using the following commands:

# qmake

# make

Note: Please run Step 3 and Step 4 in the same terminal window as Step 2. If you open another window, the environment variables that you set in Step 2 will not be configured and the compilation of the application may fail. In Qt, qmake will create a makefile for you and it will use Step 2 to automatically set all the include libraries and linker files. If you are working with a native OpneGLES application, you will need to manually create a Makefile.

Step 5) After successful compile, you can now copy the application to your target platform and run the binary.

The thermostat demo was designed on AM335x but is now able to run on AM62x with a simple recompile. Also, the same binary that works on AM62x will also run on the 64bit Jacinto platforms. Even though the graphics IP is different, the foundational SW components that the graphics application utilizes is identical across all the TI devices.