Installation
Prerequisites
Before installing AUTOSAR Call Tree Analyzer, ensure you have the following:
Python 3.10 or higher (3.10, 3.11, 3.12, 3.13 supported)
libclang (for C code parsing)
pip (Python package manager)
Installing libclang
macOS
# Using Homebrew
brew install llvm
# Or install via pip
pip install libclang
Linux (Ubuntu/Debian)
# Install LLVM and Clang
sudo apt-get update
sudo apt-get install llvm clang libclang-dev
# Or install via pip
pip install libclang
Windows
# Install via pip
pip install libclang
Installing AUTOSAR Call Tree Analyzer
From PyPI (Recommended)
pip install autosar-calltree
From Source
# Clone the repository
git clone https://github.com/melodypapa/autosar_calltree.git
cd autosar_calltree
# Install in development mode
pip install -e ".[dev]"
From GitHub
pip install git+https://github.com/melodypapa/autosar_calltree.git
Verifying Installation
After installation, verify it works:
# Check version
calltree --version
# Get help
calltree --help
# Run a simple test
calltree -l -i /path/to/your/c/code
Development Installation
For contributing to the project:
# Clone the repository
git clone https://github.com/melodypapa/autosar_calltree.git
cd autosar_calltree
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with all dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run linting
ruff check src/ tests/
Troubleshooting
libclang not found
If you get an error about libclang not being found:
Ensure libclang is installed (see instructions above)
Set the
LLVM_CONFIG_PATHenvironment variable:
# macOS with Homebrew
export LLVM_CONFIG_PATH=/opt/homebrew/opt/llvm/bin/llvm-config
# Linux
export LLVM_CONFIG_PATH=/usr/bin/llvm-config
Permission errors
If you get permission errors during installation:
# Use --user flag
pip install --user autosar-calltree
# Or use a virtual environment
python -m venv venv
source venv/bin/activate
pip install autosar-calltree
Python version not supported
Ensure you’re using Python 3.10 or higher:
python --version
If you have multiple Python versions, use the specific version:
python3.12 -m pip install autosar-calltree
Next Steps
Quick Start - Get started with basic usage
Configuration - Configure the tool for your project