my_project/ ├── src/ │ ├── main.c │ ├── interrupts.c │ └── startup.c (cstart.c) ├── lsl/ │ └── tc39x.lsl (Linker Script Language file) ├── config/ │ └── tasking_build.xml └── makefile (optional) – TriCore’s memory model requires explicit definition of physical memory regions (DSPR, PSPR, LMU, DLMU). Example snippet:

The typical build pipeline is: C/C++ source → Compiler → Assembly (.s) → Assembler → Object (.o) → Linker/Locator → ELF → Hex Key compiler options (ccTC) | Option | Effect | |--------|--------| | -O2 | High optimization (most common for TriCore) | | --tradeoff=4 | Aggressive loop unrolling & instruction scheduling | | --no-inline-stack | Use call/return instructions instead of stack frames | | --dsp | Enable DSP instruction generation for multiply-accumulate | | --cpu=tc39x | Target specific core (e.g., AURIX TC399) | | --iso | Strict C11 compliance |

group (ordered, run_addr=mem:dsram0) select ".bss.core0"; select ".data.core0";

cctc --debug-info myapp.elf # produce DWARF-2/3 task-debug --device=tc399 --interface=DAP myapp.elf TriCore uses trap vector tables (BIV, BTV). The toolset provides a built-in interrupt macro:

section_layout :tc0:linear