The SAMA5D2 software package consists of microcontroller drivers, software services and libraries. Each software module is provided with full source code, examples of usage, rich html documentation and ready-to-use projects for the GNU GCC and IAR EWARM compilers.
Create a working directory on your home called roadrunner:
mkdir roadrunner cd roadrunner
Get start cloning the patched Microchip Software Package from GitHub repository by typing:
sudo apt update sudo apt install git make git clone --single-branch --branch acme https://github.com/AcmeSystems/atmel-software-package.git cd atmel-software-package
This version include a patch to be able to write the QuadSPI at 64MB and 128MB mounted on some model of Roadrunner SOM (Many thanks to Ramok for this patch https://github.com/atmelcorp/atmel-software-package/issues/64).
Download the GNU ARM Embedded Toolchain for Linux 64-bit version 7-2018-q2-update:
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 tar xvf gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
Move inside the directory where is the source of the Applet you need to compile:
Launch the Applet compilation:
make TARGET=sama5d2-generic RELEASE=1 CROSS_COMPILE=~/roadrunner/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-
Copy the executable file to sam-ba directory where is located the old Applet binary file:
cp build/sama5d2-generic/sram/applet-qspiflash_sama5d2-generic_sram.bin ~/roadrunner/sam-ba_3.3.1/qml/SAMBA/Device/SAMA5D2/applets
If SAM-BA is not yet installed on your PC follow this article:
Five level of debug messages are available (https://github.com/atmelcorp/atmel-software-package/blob/master/utils/trace.h#L35)
/// !Trace level description /// -# TRACE_DEBUG (5): Traces whose only purpose is for debugging the program, /// and which do not produce meaningful information otherwise. /// -# TRACE_INFO (4): Informational trace about the program execution. Should /// enable the user to see the execution flow. /// -# TRACE_WARNING (3): Indicates that a minor error has happened. In most case /// it can be discarded safely; it may even be expected. /// -# TRACE_ERROR (2): Indicates an error which may not stop the program execution, /// but which indicates there is a problem with the code. /// -# TRACE_FATAL (1): Indicates a major error which prevents the program from going /// any further.
To set the TRACE_LEVEL variable when launch make try for example:
make TARGET=sama5d2-generic RELEASE=1 CROSS_COMPILE=~/roadrunner/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi- TRACE_LEVEL=5