Skip to content

TexasInstruments/C7x_audiolib

Repository files navigation

AUDIOLIB

Optimised audio processing kernels for TI C7x DSPs (AM62DX, AM275x).


Workspace Setup

AUDIOLIB uses West to manage its dsplib dependency. The workspace layout after setup:

workspace/
├── .west/config
├── audiolib/        ← manifest repo (clone this first)
└── dsplib/          ← fetched automatically by west update
mkdir workspace && cd workspace
git clone ssh://git@bitbucket.itg.ti.com/xlib/audiolib.git
west init -l audiolib/
west update                  # clones workspace/dsplib/

Build Flow

Prerequisites

Requirement Purpose
CGT7X_ROOT TI C7x compiler (set by source ~/.c7x_env_c7504 or equivalent)
cmake >= 3.16 Build system
west Workspace + build orchestration

One-shot build (recommended)

source ~/.c7x_env_c7504
west build-audiolib

Builds all 8 combos (2 SOCs × 2 platforms × 2 build types) in parallel. Each combo runs in its own thread — dsplib immediately followed by audiolib, no barrier between combos. At peak, up to 16 cmake processes run simultaneously.

Thread 0  [am62d/pc/release]     dsplib ──► audiolib  ─┐
Thread 1  [am62d/pc/debug]       dsplib ──► audiolib   │
Thread 2  [am62d/target/release] dsplib ──► audiolib   ├─ all threads live
Thread 3  [am62d/target/debug]   dsplib ──► audiolib   │  simultaneously
Thread 4  [am275/pc/release]     dsplib ──► audiolib   │
Thread 5  [am275/pc/debug]       dsplib ──► audiolib   │
Thread 6  [am275/target/release] dsplib ──► audiolib   │
Thread 7  [am275/target/debug]   dsplib ──► audiolib  ─┘

cmake output is redirected to per-combo log files — the terminal shows only clean status lines. Log path on failure is printed inline.

  ✗ ◈ dsplib    am62d/pc/release  FAILED  → build/logs/am62d/pc/release/dsplib.log

Nerd font icons are auto-detected (via fc-list and terminal env vars). Override with NERD_FONTS=1 or NERD_FONTS=0.

Build artifacts

workspace/
├── dsplib/lib/
│   ├── release/
│   │   ├── DSPLIB_C7504_x86_64.a      # am62d  PC
│   │   ├── DSPLIB_C7504.lib           # am62d  target
│   │   ├── DSPLIB_C7524_x86_64.a      # am275  PC
│   │   └── DSPLIB_C7524.lib           # am275  target
│   └── debug/   (same structure)
│
└── audiolib/lib/
    ├── release/
    │   ├── AUDIOLIB_C7504_x86_64.a    # am62d  PC
    │   ├── AUDIOLIB_C7504.lib         # am62d  target
    │   ├── AUDIOLIB_C7524_x86_64.a    # am275  PC
    │   └── AUDIOLIB_C7524.lib         # am275  target
    └── debug/   (same structure)

Selective builds

west build-audiolib --soc am62d                              # single SOC
west build-audiolib --platform pc                            # single platform
west build-audiolib --build-type release                     # single build type
west build-audiolib --soc am62d --platform pc --build-type debug
west build-audiolib --type autotest                          # lib + tests

Inner loop (after first build)

dsplib is already built — cmake only rebuilds changed audiolib sources:

cmake --build audiolib/build/am62d/pc/release -j

Force rebuild

Delete the relevant lib directory and re-run — west will rebuild from scratch:

rm -rf workspace/dsplib/lib/      # rebuilds dsplib only
rm -rf workspace/audiolib/lib/    # rebuilds audiolib only
rm -rf workspace/dsplib/lib/ workspace/audiolib/lib/   # rebuilds both
west build-audiolib

CMake Presets

Presets are defined in CMakePresets.json. west build-audiolib discovers them automatically — adding a new SOC to the presets file is sufficient, no changes to scripts/west_ext.py are needed.

Preset naming convention:

{release|debug}-{buildlib|autotest}-{soc}-{pc|target}

e.g.  release-buildlib-am62d-pc
      debug-autotest-am275-target

To invoke a preset directly (bypassing west build-audiolib):

cmake -S audiolib/ -B build/am62d/pc/release --preset release-buildlib-am62d-pc
cmake --build build/am62d/pc/release -j

West Commands Reference

west build-audiolib [OPTIONS]

  --soc         SOC(s) to build: am62d, am275 (default: all)
  --platform    pc, target, or all (default: all)
  --build-type  release, debug, or all (default: all)
  --type        buildlib or autotest (default: buildlib)
  --preset      explicit cmake preset, overrides all other filters
  --build-dir   custom cmake binary directory root
  -j N          jobs per cmake build (default: cpu count)
  --fresh       pass --fresh to cmake configure

About

AUDIOLIB optimized library for C7x DSP

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors