Skip to content

Reference manuals

Development tools

The Hexagon tools provide the means to compile, simulate, debug, and analyze code.

For complete documentation on each of these tools, see one of the following manuals:

Manual Description
Hexagon Programming Software Development Tools Hexagon software development tools overview
Hexagon LLVM C/C++ Compiler User Guide Hexagon compilers clang and clang++
Hexagon Simulator User Guide Hexagon simulator hexagon-sim
Hexagon LLDB Debugger User Guide Hexagon debugger hexagon-lldb
Hexagon gprof Profiler User Guide Hexagon function profiler hexagon-gprof
Hexagon Profiler User Guide Hexagon system profiler hexagon-profiler
Hexagon Code Coverage Profiler User Guide Hexagon code coverage profiler hexagon-coverage
Hexagon Resource Analyzer User Guide Memory resource analyzer hexagon-analyzer-backend
Hexagon C TRACE32 User Guide Hexagon TRACE32
Hexagon Utilities User Guide Hexagon utilities

The Hexagon utilities include the following tools:

  • Assembler hexagon-llvm-mc: Translate assembly source files into object files
  • Linker hexagon-link: Combine object files into executable
  • Archiver hexagon-ar: Create, modify, and extract files from archives
  • Object file symbol lister hexagon-nm: List symbols from object files
  • Object file copier hexagon-elfcopy: Copy and translate object files
  • Object file viewer hexagon-llvm-objdump: Display contents of object files
  • Archive indexer hexagon-ranlib: Generate index to archive contents
  • Object file section size lister hexagon-size: List section sizes and total size
  • Object file string lister hexagon-strings: List strings from object files
  • Object file stripper hexagon-strip: Remove symbols from object file
  • C++ filter hexagon-c++filt: Filter used to demangle encoded C++ symbols
  • Address converter hexagon-addr2line: Convert addresses to file and line
  • ELF file viewer hexagon-readelf: Display contents of ELF format files

Programming languages

Assembly and intrinsics

For the best performance, write time-critical functions using direct DSP instructions. Do this by either writing assembly code or using intrinsics within C/C++ code.

The DSP optimization guidelines page provides tips on how to write efficient code with intrinsics or assembly language.

For complete documentation on assembly instructions and intrinsics, see one of the programming reference manuals:

C/C++

The DSP code is usually written in C or C++. Such code does not require any change to run on the DSP: Qualcomm’s compiler relies on LLVM and currently supports the following versions of the C and C++ standards:

  • C language: K&R C, ANSI C89, ISO C90, ISO C94 (C89+AMD1), ISO C99 (+TC1, TC2, TC3), ISO C11
  • C++ language: C++98, and with some minor limitations, C++11, C++14, and C++17

For complete documentation on C/C++ support, see the Hexagon LLVM C/C++ Compiler.

The C/C++ compiler is HVX-aware when using the -fvectorize option. For more vectorization options, consider using Halide, writing code with Intrinsics, or using assembly.

Halide

Halide is a dialect of C++ that allows you to exploit the Hexagon Vector eXtensions (HVX) of the Qualcomm DSP from C.

For more information on Halide, see the Halide for HVX user guide.

IDL

The Interface Description Language (IDL) defines the interface that the CPU and DSP use to communicate in C/C++ using RPC.

For complete documentation on IDL, see the IDL reference documentation.

DSP software libraries

Several DSP software libraries provide optimized implementations of a number of DSP routines.

For complete information on these libraries, see the following documents:

Manual Description
Qualcomm Hexagon Libraries (QHL) Math, BLAS, and DSP libraries optimized for Hexagon (scalar and HVX)
Hexagon C Library User Guide Common C libraries
Hexagon C++ Library Supplement A guide for comparing and selecting libstdc++ and libc++ libraries
Hexagon QPRINTF Library A library extending printf support to HVX registers and assembly

Others

Following are other reference contents available within the Hexagon SDK:

Manual Description
System Software APIs APIs for system-level libraries managing DSP resources
Qurt User Guide Qualcomm real-time operating system
Hexagon Application Binary Interface (ABI) User Guide Application Binary Interface (ABI)