AN 999: Drive-on-Chip with Functional Safety Design Example: Agilex™ 7 Devices
Visible to Intel only — GUID: bqa1716287537593
Ixiasoft
Visible to Intel only — GUID: bqa1716287537593
Ixiasoft
3.7. Modifying the HPS Safety Function Application
The recipe hpssafechannel_1.0.bb compiles and deploys the application after the Yocto build in /opt/hpssafechannel directory, ready to be run in the HPS. The recipe hpssafechannelservice_1.0.bb installs all necessary files to start the application after HPS booting process (starts the application as a service). You don't need to relaunch the whole Yocto build every time you modify the software, just use the Makefile in the src directory.
- Copy the source code to a workspace.
>> cd <YOUR_WORKSPACE> >> cp -r <PROJ_LOCATION>/hps_software/src/ <YOUR_WORKSPACE>
- Install the ARM64 GCC compiler (or your favorite ARM64 toolchain).
>> sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu >> sudo apt-get install libncurses5-dev
- As the main program uses ncurses, download and precompile version 6.4 from: https://ftp.gnu.org/gnu/ncurses/
>> cd ncurses >> ./configure --host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu CXX="aarch64-linux-gnu-g++" --disable-stripping --with-fallbacks=linux --without-xterm-new --with-terminfo-dirs=/etc/terminfo >>sudo make install
- Set the CROSS_COMPILE environment variable accordingly.
>> export CROSS_COMPILE=aarch64-linux-gnu- >> echo $CROSS_COMPILE
- Build the executable hspsafechannel.
>> cd <YOUR_WORKSPACE> >> make all
You can transfer the executable to the board using ssh, sftp or copy it into the SD card directly.