Metadata-Version: 2.5
Name: hexagon-sim-toolchain
Version: 6.6.0.0
Summary: Unmodified hexagon-sim simulator from the Hexagon SDK; the Python package is only a thin convenience wrapper
License: All rights reserved and private pkg
License-File: LICENSE.txt
Keywords: dsp,hexagon,hexagon-sdk,hexagon-sim,iss,qualcomm,simulator
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 :: Embedded Systems
Classifier: Topic :: System :: Emulators
Requires-Python: >=3.9
Requires-Dist: hexagon-compile-min==6.6.0.0
Description-Content-Type: text/markdown

# hexagon-sim-toolchain

The **hexagon-sim** instruction-set simulator with its complete runtime:
the v81 ISS library, cosim/peripheral plug-ins, the QuRT simulation driver
bits (`runelf.pbn`, `qurt_model.so`, `boot_params_cosim`), gmon profile
tools and the `hexagon-lldb` debugger (with `liblldb` and the host
`libpython3.11` it links against; ncurses dependencies are re-pointed at the
`ncurses6` sonames during packaging). Driven from a small, friendly Python
API — or directly from the shell, without any Python.

Installing it also pulls in
[`hexagon-compile-min`](https://pypi.org/project/hexagon-compile-min/), which
carries the compiler and **all** target headers/libraries for `v81` (newlib,
libc++, QuRT RTOS `computev81`), binutils and linker templates. Together, the
two wheels cover the whole compile → link → simulate → debug loop.

The simulator 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 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-sim-toolchain
```

## Quick start

```python
import hexagon

hexagon.compile("hello.c").option({"arch": "v81"}).check().run()
hexagon.link("hello.o", output="hello").option({"arch": "v81"}).check().run()

run = hexagon.simulate("hello").option({"arch": "v81", "timing": True}).run()
print(run.stdout)
print("cycles:", run.returncode)   # -r is enabled by default

# QuRT: boot through the bundled image loader
import os
q = os.path.join(hexagon.sdk_prefix(), "rtos/qurt/computev81")
hexagon.simulate(f"{q}/sdksim_bin/runelf.pbn").option({
    "arch": "v81", "usefs": "simfs", "cosim_file": "q6ss.cfg",
    "l2tcm_base": "0xd800", "subsystem_base": "0xFC90", "rtos": "osam.cfg",
}).arg("app_q").run(capture=False)
```

Program arguments go after `.arg(...)`, unknown simulator switches can be
passed verbatim with `.flag(...)`, and `.run(capture=False)` streams output
for long or interactive runs. See the GitHub README for the full shell-only
recipes (standalone, cosim, QuRT, debugging, profiling).
