This is a collection of documentation and build scripts for the GNU toolchain targeting the PRU I/O CPU. PRU cores present in TI Sitara AM33xx and later SoCs are supported.
Support for older PRU core versions is not planned.
A simulator is used to execute the GCC C regression test suite. Results are posted daily to https://gcc.gnu.org/pipermail/gcc-testresults/ .
Bug reports should be filed in https://github.com/dinuxbg/gnupru/issues . For general questions please use https://forum.beagleboard.org/ .
This project has no relation to the TI PRU C compiler. ABI differences between GCC PRU and TI PRU C are tracked in https://github.com/dinuxbg/gnupru/wiki
There are several examples to get started:
Several methods to acquire the PRU cross toolchain are listed below, ordered by most convenient first.
If you are running a Beagleboard Debian Image, then installation is simple:
sudo apt-get update
sudo apt-get install gcc-pru gnuprumcu
Latest releases provide prebuilt tarballs for several hosts: amd64
Linux, armhf
Linux, Windows. Simply download, untar and use them when:
amd64
Linux or Windows host.armhf
distribution other than Beagleboard Debian Image.Note for maintainers: These prebuilt release tarballs are prepared using the build-crosstool-ng.sh
script.
Recently crosstool-ng acquired pru support. Provided you build top-of-tree crosstool-ng
, you should be able to:
$ ct-ng pru
$ ct-ng build
$ PATH=$HOME/x-tools/pru-elf/bin:$PATH
The custom build scripts are should work on any recent Linux distro. They are intended to be simple enough, so that they can act as a documentation how to cross-compile a toolchain. They intentionally lack some features:
BASH
statements.Users may find that Beagleboard Debian Packages, or prebuilt releases or crosstool-ng are instead more suitable for production.
You'll need some prerequisites. For a Debian host:
sudo apt-get install build-essential libmpfr-dev libgmp-dev libmpc-dev texinfo libncurses5-dev bison flex texinfo
Alternatively, for a Fedora host:
sudo dnf install @development-tools g++ mpfr-devel gmp-devel libmpc-devel texinfo texinfo-tex texlive-cm-super* texlive-ec ncurses-devel bison flex
Then it should be a simple matter of:
export PREFIX=$HOME/bin/pru-gcc # Define where to install the toolchain
./download-and-prepare.sh # Download and prepare the sources
./build.sh # Build