wolfssl/IDE/Gaisler-BCC
Tobias Frauenschläger 29506d2cac build: distribute IDE project trees per-directory to fix "make dist"
The non-recursive automake "distdir" recipe inlines the entire $(DISTFILES)
list into a single shell command. Enumerating every IDE integration file
individually made that list large enough (~123 KB) that the recipe exceeded
the Linux MAX_ARG_STRLEN (128 KB) single-argument exec limit, so "make dist"
failed with:

    /bin/bash: Argument list too long
    make[2]: *** [distdir-am] Error 127

Replace the per-file EXTRA_DIST enumeration of the IDE directories with one
wholesale "EXTRA_DIST += IDE/<dir>" entry per directory (automake copies the
tree recursively). This collapses ~745 file entries into ~52 directory
entries and shrinks the top-level DISTFILES from ~123 KB to ~97 KB, well
under the limit.

The set of distributed IDE files is unchanged: a before/after "make dist"
diff shows no project file added or removed (only the now-unused include.am
build fragments are gone). Three directories that intentionally omit some
tracked files (apple-universal, MPLABX16, Renesas - private IDE configs,
.gitkeep placeholders, helper scripts) stay enumerated file-by-file.
2026-07-20 17:22:10 +02:00
..
README.md

README.md

Gaisler BCC

This document outlines how to compile for the Gaisler LEON range of Sparc CPUs using the BCC2 toolkit. The steps here should also work for the original BCC.

Compiler

In the examples in this document, a Linux computer is used as a cross compiler and the compilers have been extracted to /opt. You can install them elsewhere, but please adjust commands accordingly.

Bare-metal

To compile for bare-metal, you need to download the BCC2 binaries from here. You can use either the GCC or CLang version, but do note that you will need to set the CFLAG -std=c99 to compile in CLang.

Linux

For Linux, you will need the "GNU toolchains for LEON and NOEL" from this link.

Compiling

Bare metal

Copy the file examples/config/user_settings_template.h to user_settings.h in the root of the source code. Then edit this to add the following:

#define WOLFSSL_GAISLER_BCC
#define WOLFSSL_GENSEED_FORTEST
#define NO_ASN_TIME

and comment out the following line:

//    #define NO_MAIN_DRIVER

The first #define is only required to compile the wolfCrypt benchmark.

Note: that most Gaisler LEON processors do not have a good source of entropy for the RNG. It is recommended an external entropy source is used when developing for production.

You can then compile with the following. Change the mcpu and qbsp according to the LEON CPU version and board used:

export CC=/opt/sparc-bcc-2.3.1-gcc/bin/sparc-gaisler-elf-gcc
export CXX=/opt/sparc-bcc-2.3.1-gcc/bin/sparc-gaisler-elf-g++
export CFLAGS="-qbsp=gr740 -mcpu=leon3"

./configure --host=sparc --enable-usersettings --disable-examples --enable-static
make

Linux

To compile for Linux on the LEON use the following commands, make sure to use the right mcpu option:

export CC=/opt/sparc-gaisler-linux5.10/bin/sparc-gaisler-linux5.10-gcc
export CXX=/opt/sparc-gaisler-linux5.10/bin/sparc-gaisler-linux5.10-g++
export CFLAGS="-mcpu=leon3"

./configure --host=sparc-linux
make