Forum Discussion
arria V compiler and hwlibs
- 3 years ago
Hi,
Since the case have been open for too long, we recommend that we close the thread as per our support procedure.
However, I highly recommend that you open issues that you'd face separately, for e.g your help needed for Quartus compilation on another then the Baremetal build on next.
Once you open the new case/s, we will support your issue then. Hopes this helps.
Hi,
For Cyclone V SoC Baremetal, hwlib + QSPI with U-boot SPL, the files required are:
- U-boot-spl.sfp
- application.img
We use the latest building bootloader to get the U-boot file all the way from Quartus up to Configure and build U-Boot:
Then, get HWLib and install the toolchain:
cd $TOP_FOLDER
git clone https://github.com/altera-opensource/intel-socfpga-hwlib
cd intel-socfpga-hwlib/tools
./install_linaro.sh
export PATH=`pwd`/gcc/bin:$PATH
#Reference:
https://www.rocketboards.org/foswiki/Documentation/HWLib#Installation
Build the application:
cd $TOP_FOLDER
cd intel-socfpga-hwlib/examples/CVAV/Altera-SoCFPGA-HardwareLib-Timer-CV-GNU/
# build once to bring hwlibs code
make SEMIHOSTED=0 MEMORY=ddr
# cleanmake
make clean
# change hwlibs link address to match what U-Boot wants
sed -i 's/0x00100040/0x01000040/g' hwlib/src/linkerscripts/cvav-ddr.ld
# move stack out of the way just in case
sed -i 's/0x80000/0x00200000/g' hwlib/src/linkerscripts/cvav-ddr.ld
# build again with the new address
make SEMIHOSTED=0 MEMORY=ddr
# create binary file
arm-eabi-objcopy -O binary application.elf application.bin
# create img file
$TOP_FOLDER/cv_soc_devkit_ghrd/software/bootloader/u-boot-socfpga/tools/
mkimage -A arm -T standalone -C none -a 0x01000040 -e 0x01000040 -n "bare-metal image" -d application.bin application.img
Build the QSPI image to be flash:
cd $TOP_FOLDER
cat cv_soc_devkit_ghrd/software/bootloader/u-boot-socfpga/spl/u-boot-splx4.sfp \
intel-socfpga-hwlib/examples/CVAV/Altera-SoCFPGA-HardwareLib-Timer-CV-GNU/application.img \
> qspi-image.bin
- bsp_user3 years ago
Occasional Contributor
Thank you for your reply.
I use different components than yours:
1. I'm building everything in Windows using SoC EDS suite and ARM DS-5.
2. I'm using ARM compiler 5 (not GNU)
3. I'm building bare metal app and not a Linux app.
The reason is that I don't have a license for ARM DS-5 for linux.
Can you help me with my problem in my environment?
Thanks