AN 999: Drive-on-Chip with Functional Safety Design Example: Agilex™ 7 Devices
ID
823627
Date
7/04/2024
Public
1. About the Drive-on-Chip with Functional Safety Design Example for Agilex™ 7 Devices
2. Getting Started
3. Rebuilding the Drive-on-Chip Design
4. Functional Description of the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
5. HPS Channel Safety Software
6. Drive-on-Chip Design Recommendations and Disclaimers
7. Document Revision History for AN 999: Drive-on-Chip with Functional Safety Design Example for Agilex 7 Devices
2.1. Software Requirements for the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
2.2. Hardware Requirements for the Safe Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
2.3. Downloading and Installing the Design
2.4. Installing Python
2.5. Creating an SD Card Image
2.6. Setting Up your Development Board for the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
2.7. Debugging and Monitoring the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices with Python GUI
2.8. Looking into the Drive-On-Chip Output
3.1. Generating the Platform Designer System
3.2. Generating and Building the NiosV/g BSP for the Drive-On-Chip Design Example
3.3. Compiling the Hardware in the Intel Quartus Prime Software
3.4. Modifying the Motor Control Software Application
3.5. Generating .jic and .rbf files After Hardware Modifications
3.6. Recreate an SD Card Image
3.7. Modifying the HPS Safety Function Application
3.7. Modifying the HPS Safety Function Application
The Drive-on-Chip with Functional Safety Design Example for Devices includes an HPS safety function application as part of the meta layer. The source code is in <PROJ_LOCATION>/hps_software/src or in the recipe <PROJ_LOCATION>/hps_software/meta-safedriveonchip/recipes-example/hpssafechannel/files/hpssafechannel_1.0.tar.gz HPS Channel Speed Monitoring Safety Application describes the HPS safety application source code.
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.