Visible to Intel only — GUID: bav1512188891594
Ixiasoft
1.1. Acronyms and Definitions
1.2. Recommended System Requirements
1.3. Installation Folders
1.4. Boot Flow Overview
1.5. Getting Started
1.6. Enabling the UEFI DXE Phase and the UEFI Shell
1.7. Using the Network Feature Under the UEFI Shell
1.8. Creating your First UEFI Application
1.9. Using Arm* DS-5* Intel® SoC FPGA Edition (For Windows* Only)
1.10. Pit Stop Utility Guide
1.11. Porting HWLIBs to UEFI Guidelines
1.12. Tera Term Installation
1.13. Minicom Installation
1.14. Win32DiskImager Tool Installation
1.15. TFTPd64 By Ph.Jounin Installation
1.16. Revision History of Intel® Arria® 10 SoC UEFI Boot Loader User Guide
1.5.1. Compiling the Hardware Design
1.5.2. Generating the Boot Loader and Device Tree for UEFI Boot Loader
1.5.3. Building the UEFI Boot Loader
1.5.4. Creating an SD Card Image
1.5.5. Creating a QSPI Image
1.5.6. Booting the Board with SD/MMC
1.5.7. Booting the Board with QSPI
1.5.8. Early I/O Release
1.5.9. Booting Linux* Using the UEFI Boot Loader
1.5.10. Debugging an Example Project
1.5.11. UEFI Boot Loader Customization
1.5.12. Enabling Checksum for the FPGA Image
1.5.13. NAND Bad Block Management
Visible to Intel only — GUID: bav1512188891594
Ixiasoft
1.5.4.3. Compile the Bare Metal Application Source Code
This task describes how to modify and build the HelloWorld BareMetal application example that comes with the SoC FPGA EDS 15.0. The HelloWorld application writes an output to the first serial interface.
- Open a terminal.
- Make a copy of the HelloWorld BareMetal application example code into your working directory. For example, if your working directory is /data/<username>/GSRD, type:
$ cd /data/<username>/GSRD $ cp -r ~/altera/15.0/embedded/examples/software/Altera-SoCFPGA-HelloWorld-Baremetal-ARMCC.tar.gz/ .
- Extract the compressed HelloWorld project from archive.
$ tar -xvf Altera-SoCFPGA-HelloWorld-Baremetal-ARMCC.tar.gz
Figure 39. HelloWorld Application Extraction - When complete, change to the Altera-SoCFPGA-HelloWorld-Baremetal-ARMCC folder and edit the Makefile.
$ cd Altera-SoCFPGA-HelloWorld-Baremetal-ARMCC $ gedit Makefile
- Change line 6 in the Makefile from BOARD=cycloneV to BOARD=arria10.
Figure 40. Makefile Edit
- Click the Save icon and exit the Makefile.
- Open the arria10_scatter.scat file by typing:
$ gedit arria10_scatter.scat
- Modify the arria10_scatter.scat file as shown in the screenshots below to make the Bare Metal application compile for DDR SDRAM instead of on-chip RAM.
The text that you must change in the arria10_scatter.scat is highlighted in orange:Figure 41. Original arria10_scatter.scat FileThe replacement text is shown below:Figure 42. Modified arria10_scatter.scat File
- Click the Save icon and exit arria10_scatter.scat file.
- Open the helloworld.c source file.
$ gedit hello.c
- Edit the file according to your own custom code. Below is an example of a HelloWorld program that allows you to see "Hello World from Baremetal Application!" messages displaying on the board.
Figure 43. Original hello.c FileThe screenshot below shows the modified hello.c file.Figure 44. Modified hello.c File
- Click the Save icon and exit the hello.c file.
- Type make at the prompt to start the compilation.
- Convert the .axf file to .elf file format.
$ fromelf --bin Altera-SoCFPGA-HelloWorld-Baremetal-ARMCC.axf --output=bootimage.bin
Figure 45. .axf to .elf File Conversion