FPGA On-Chip Memory Initialization with Preloader
Hello,
I am attempting to boot the Cyclone V from the FPGA on-chip memory however when I try to initialize the on-chip memory component with the preloader.hex file by re-compiling the project in Quartus I get the following error:
Error (114016): Out of memory in module quartus_map.exe (5304 megabytes used)
Error (293007): Current module quartus_map ended unexpectedly. Verify that you have sufficient memory available to compile your design. You can view disk space and physical RAM requirements on the System and Software Requirements page of the Intel FPGA website (http://dl.altera.com/requirements/).
I have 16GB of RAM on my computer so memory shouldn't be an issue. I also have ~12GB free on my one hard drive if that makes a difference. I am currently using Quartus Prime version 20.1.1 Build 720 and Intel Embedded Command Shell version 20.1 Build 711. However, when I try to use a different preloader.hex file generated previously using Quartus version 17.0, I do not encounter the error. I am using Windows 10 and because of our licensing I am unable to use an older version of EDS (i.e the old boot flow).
The steps I used to generate the preloader are given below (I was unable to find documentation of the full preloader generation process on Windows, this is what I was able to piece together and get working):
NOTE: I did have to implement multiple fixes to get this working. I can provide more details on this if needed.
Key:
[WSL] run in the WSL terminal (Ubuntu 18.04 LTS)
[ECS] run in the Embedded Command Shell terminal (C:\intelFPGA\20.1\embedded\Embedded_Command_Shell.bat)
1. [ECS], navigate to project directory
2. [ECS] $ mkdir -p software/bootloader
3. [ECS] $ bsp-create-settings --type spl --bsp-dir software/bootloader --preloader-settings-dir hps_isw_handoff/soc_system_hps_0 --settings software/bootloader/settings.bsp
4. make required edits to software/bootloader/settings.bsp
5. [ECS] $ bsp-generate-files --bsp-dir software/bootloader/ --settings software/bootloader/settings.bsp
6. [WSL] navigate to project directory
7. [WSL] $ cd software/bootloader
8. [WSL] $ git clone https://github.com/altera-opensource/u-boot-socfpga
9. [WSL] $ cd u-boot-socfpga
10. [WSL] $ ./arch/arm/mach-socfpga/qts-filter.sh cyclone5 ../../.. .. ./board/terasic/de10-nano/qts
11. [WSL] $ export CROSS_COMPILE=<path to toolchain>/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
12. [WSL] $ make socfpga_de10_nano_defconfig
13. [WSL] $ make -j 24
14. [WSL] $ export PATH=<path to toolchain>/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin:$PATH
15. [WSL] $ cd ..
16. [WSL] $ arm-none-linux-gnueabihf-objcopy -O ihex --adjust-vma -0xc0000000 u-boot-socfpga/spl/u-boot-spl preloader.hex
If anyone can point out the reason for my error and confirm if my process is correct, I would greatly appreciate it.
Thanks,
Campbell