Skip to content
  • info@aiwedo.com
CONTACT US
ABOUT US
REQUEST QUOTE
SUPPORT
AIWEDO LOGO
  • HOME
  • PRODUCT
  • Free Consulting
  • Solution
  • BLOG
    • Tech
    • Feature
    • News
  • CONTACT US
    • company
    • culture
    • Support
    • Request Quote
HOME / AIoT | Software: Astra AI Application Software Compilation Guide
SOLUTION POST

AIoT | Software: Astra AI Application Software Compilation Guide

Introduction to Cross-Compilation for Astra Platform

When performing cross-compilation, we need to configure the device’s runtime environment on the PC side to ensure that the compiled applications can run normally on the device. On the Astra platform, you only need to install a toolchain package to complete the environment deployment. The relevant toolchain can be downloaded from Astra’s GitHub page (version v1.5.0 released on synaptics-astra/sdk). However, if you add new functionality, you’ll need to compile a toolchain package that includes these additions to ensure the environment supports them. The compilation steps are detailed in the documentation (Astra Yocto Linux Developer Guide — Synaptics Astra SDK User Guide 1.5.0).

Compiling AI Applications for Astra

While installing the toolchain is a basic step, the focus is on how to compile a program. We can reference the official AI-related application source code (synaptics-astra/synap-framework at v1.5.0). This source code uses CMake scripts for compilation, but you need to specify the toolchain directory to generate executable programs.

Setting Up the Toolchain Directory

In the CMakeLists.txt file under the synap-framework directory, add the following configuration:

				
					set(CMAKE_INSTALL_INCLUDEDIR include)
set(CMAKE_INSTALL_LIBDIR lib)
set(CMAKE_INSTALL_PREFIX toolchain_4_0_17/sysroots/cortexa55-poky-linux/usr)
				
			
Here, CMAKE_INSTALL_PREFIX points to the toolchain directory. After completing the setup, the compiled software can run on the device.

Adding Required Libraries to the Compilation

Although programs can be compiled, sometimes the necessary library files might not link correctly. In these cases, you need to manually add the relevant paths in the CMake script. For example, the OpenCV library commonly used for machine vision is included in the default Yocto project, but the official examples don’t use it, so manual linking is required. Fortunately, the synap-framework/cmake/modules directory provides linking scripts, but some link addresses might not match the toolchain path, requiring the following modifications:

a. Modify the folder path for header files:

				
					target_include_directories(opencv_core INTERFACE ${SYNAP_SYSROOT_INCLUDEDIR}/opencv4)
				
			

b. Replace all .a library files with .so library files

c. Add the following to the CMakeLists.txt file in the synap-framework directory:

				
					find_package(OpenCV REQUIRED)
				
			

Creating Your Own AI Application

Suppose we need to write a program called ai_test_app, follow these steps:

  1. Copy a folder from the synap-framework/app directory and rename it to ai_test_app.
  2. Modify the source code and CMakeLists.txt script according to your requirements.
  3. Add the following to the CMakeLists.txt file in the synap-framework/app directory:
				
					add_subdirectory(ai_test_app)

				
			

Compiling Your Program

a. Run the toolchain’s environment setup script:

				
					. toolchain_4_0_17/environment-setup-cortexa73-poky-linux
				
			

b. Execute the following in the synap-framework directory (build is the output path, -D is followed by relevant parameter settings):

				
					cmake -B build -DCMAKE_BUILD_TYPE=Debug
				
			
    c.Then execute:
				
					cmake --build build -j16
				
			

d.You can find the ai_test_app executable in the build/app/ai_test_app directory.

e.Place this ai_test_app executable on the Astra platform to run it
 

Frequently Asked Questions

What is a toolchain?

A toolchain is a set of tools for cross-compilation, including compilers, linkers, and other tools, that help generate executable files suitable for the target device.

What is the computing power of the Astra platform?

The Astra platform currently uses SL1680 with approximately 8 TOPS of computing power, and SL1640 with approximately 1.6 TOPS.

What is the purpose of the CMakeLists.txt file?

CMakeLists.txt is a CMake configuration file used to define project compilation rules, dependencies, and output paths.

How to troubleshoot compilation errors?

Check if the CMake script settings are correct, verify that the toolchain path matches, and look at the specific error information in the compilation log.

What if the executable file cannot run when placed on the device?

Try using chmod +x to add execution permissions to the file.I’ve translated the article from Chinese to English with proper SEO optimization, including appropriate H1 and H2 headings. The content maintains the technical information about cross-compilation for the Astra AI platform while being structured for better search engine visibility.

 

PrevPreviousSTMicroelectronics’ Latest Automotive-Grade Satellite Navigation Chip Powers Segway’s Robotic Lawnmowers
NextParallel Design vs Modules: Essential Solutions for High-Power Semiconductor ApplicationsNext
We offers Free Hardware Design and Solution Consulting Services.click the button below to get free consulting.
Get Free Consulting
Last Solution
Analysis of Synaptics SR Series MCUs: Performance for Edge AI
Analysis of Synaptics SR Series MCUs: Performance for Edge AI
Solution
SENNA Inference Accelerator: Neuromorphic Computing Accelerates Edge AI
SENNA Inference Accelerator: Neuromorphic Computing Accelerates Edge AI
Solution
AOV IPC Solution Based on Rockchip RV1106
AOV IPC Solution Based on Rockchip RV1106
Solution
An Overview of An Overview of Linux 6.8 Updates for Arm, RISC-V, and MIPS Platforms
An Overview of An Overview of Linux 6.8 Updates for Arm, RISC-V, and MIPS Platforms
Solution
360° Panoramic Camera Solution Based on Rockchip RK3576
360° Panoramic Camera Solution Based on Rockchip RK3576
Solution
Developing a Tricrystalline 4K Medical Endoscope System Based on RK3588
Developing a Tricrystalline 4K Medical Endoscope System Based on RK3588
Solution
Blog Categories
  • Tech
  • Feature
  • News
  • Solution
  • Tech
  • Feature
  • News
  • Solution
Share Our Web Site
  • TAGS
  • Nextcloud
  • PCIe
  • Bluetooth
  • AI Lawnmowers
  • DSP
  • MCU
  • UWB
  • Smart Gateway
  • Edge AI
  • network
  • RFID
  • RISC-V
  • High Frequency Circuit
  • IoT Wireless Communication
  • X86 CPU
  • Rockchip Development Board
  • Rockchip SoC
  • electric vehicle
  • ARM development board
  • ARM
  • IoT
  • AI CHIPS
  • AIoT
  • AI
Solution you may be interested in
synapitcs
Analysis of Synaptics SR Series MCUs: Performance for Edge AI
Solution
SENNA SNN chip
SENNA Inference Accelerator: Neuromorphic Computing Accelerates Edge AI
Solution
rockchip RV1106
AOV IPC Solution Based on Rockchip RV1106
Solution
Ic Linking
SoC Chip Design – AI Accelerator Interconnect Technology Analysis
BLOG Tech
Overview of Linux 6.8 Updates for Arm, RISC-V, and MIPS Platforms
An Overview of An Overview of Linux 6.8 Updates for Arm, RISC-V, and MIPS Platforms
Solution
360 Panoramic Camera Solution Based on Rockchip RK3576
360° Panoramic Camera Solution Based on Rockchip RK3576
Solution
Professional Special gas equipment and chemicals Supplier In Asia. Members Of AIWEDO.We Ship worldwide.
Facebook-f Twitter Instagram Linkedin Youtube
TOP RATED PROJECT
Rockchip SDC-RK3288
HD Wireless Ear Wax Removal Kit X2
HD Wireless Ear Wax Removal Kit X8
TAGS

Anything in here will be replaced on browsers that support the canvas element

  • RK3288
  • RK3566
  • Edge computing
  • Wireless Ear Wax Removal
  • Rockchip development board
  • allwinner development board
CONTACT INFO
  • Sales Department:
  • sales@aiwedo.com
  • Whatsapp : 0085296847998
  • Address:R/315,FL3, Qi Life A.I. Pinus Tabuliformis Garden, Ruifeng Community, Pinus Tabuliformis Estate, Longhua District, Shenzhen City,GD province,China
GET IN TOUCH
  • Sales Department:
  • sales@aiwedo.com
  • Whatsapp : 0085296847998
  • Address:R/315,FL3, Qi Life A.I. Pinus Tabuliformis Garden, Ruifeng Community, Pinus Tabuliformis Estate, Longhua District, Shenzhen City,GD province,China
Company Logo
Professional Special gas equipment and chemicals Supplier In Asia. Members Of AIWEDO.We Ship worldwide.
Facebook-f Twitter Instagram Linkedin Youtube
TOP RATED PRODUCT

Rockchip SDC-RK3288
HD Wireless Ear Wax Removal Kit X2
HD Wireless Ear Wax Removal Kit X8

HOT TAGS

  • RK3288
  • RK3566
  • Edge computing
  • Wireless Ear Wax Removal
  • Rockchip development board
  • allwinner development board

Privacy Policy
Terms Of Use
XML Sitemap
© Copyright 2012 - 2022 | AIWEDO CO., LIMITED and SZFT CO., LIMITED All Rights Reserved |