Metadata-Version: 2.5
Name: hexagon-compile-min
Version: 6.6.0.0
Summary: Unmodified compiler toolchain from the Hexagon SDK (clang, assembler, linker, v81 libraries); the Python package is only a thin convenience wrapper
License: All rights reserved and private pkg
License-File: LICENSE.txt
Keywords: clang,cross-compiler,dsp,hexagon,hexagon-sdk,llvm,npU,qualcomm,toolchain
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# hexagon-compile-min

Hexagon **cross-compilation for Python**: the `clang` compiler, assembler,
archiver, linker, binutils (`llvm-nm`/`objdump`/`readelf`/`objcopy` and
GNU-style aliases) and **all** `v81` target headers and libraries — newlib,
libc++, the QuRT RTOS `computev81` headers/libraries, linker-script templates
and `libnative` — driven from a small, friendly API or used directly from the
shell.

The toolchain binaries are taken **unmodified** from the Hexagon SDK
(release 6.6.0.0, `HEXAGON_Tools` 19.0.07). This package is only a thin
convenience wrapper — a helpful sugar-coat around tools that already exist;
nothing is rebuilt, patched or relicensed. All rights remain with Qualcomm
Technologies, Inc. Not affiliated with or endorsed by Qualcomm.

**Source & attribution:** this is a repackaging of the Qualcomm Hexagon SDK,
which is publicly available from
[GitHub](https://github.com/snapdragon-toolchain/hexagon-sdk/releases/tag/v6.6.0.0)
and the
[Qualcomm Software Center](https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK).

## Install

```bash
pip install hexagon-compile-min
```

## Quick start

```python
import hexagon

hexagon.compile("kernel.c").option({"arch": "v81", "optimize": 2}).run()
hexagon.link("kernel.o", output="app").option({"arch": "v81"}).run()

# C++ (libc++ targets the QuRT POSIX API; headers and libraries are embedded)
hexagon.tool("hexagon-clang++").raw("-std=c++17", "-mv81", "app.cpp", "-c", "-o", "app.o").run()

# resolve non-tool payload files (QuRT RTOS, cosim API headers, ...)
hexagon.payload_path("rtos/qurt/computev81/include/qurt/qurt.h")
hexagon.payload_path("include/iss/HexagonWrapper.h")
```

Pair with [`hexagon-sim-toolchain`](https://pypi.org/project/hexagon-sim-toolchain/)
for the simulator, QuRT simulation, debugging and profiling tools.
