TI PRU Compiler 2.1.x tips and tricks covering ABI, memory models, data types, and optimization options for PRU cores.
This presentation covers the C/C++ compiler for the PRU cores found in most Sitara devices such as AM335x, AM437x, and AM572x. It explains where the compiler fits in the industrial communication subsystem and how the ICSS contains two or four PRU cores.
The document describes compiler version 2.1.x, including its single EABI ABI, code and data memory models, data types, sign extension, floating-point handling, optimization levels, and section names.
| Compiler version | 2.1.x |
|---|---|
| Supported ABI | EABI (Extended ABI) |
| Code memory model | One code memory model; all code within 16 bits |
| Data pointer size | 32 bits |
| Code pointer size | 16 bits |
| Floating-point hardware | None; floating-point operations are done in software |
Only one ABI is supported: EABI (Extended ABI). PRU executables can be read by Linux ELF tools.
The ICSS contains two or four PRU cores.
No. All floating-point operations are done in software, which is expensive in code size, cycles, and power.
It performs function-level optimization; --opt_level=3 covers files and --opt_level=4 covers between files and libraries.