I am currently doing a project using altera De0 nano SOC board. I have modified the GHRD project Qsys according to my requirement. I need to route HPS I2C-2 peripherals to FPGA side to control an external peripheral. I have modified the dtb and rbf files and loaded in the SD card but i am facing some problems.
1. I guess i need to generate the preloader again for the modified qsys. I am not getting how to do that. Please help me in that.
2. What other files i need to update in my SD card for the modified design to make it work properly.
After modifying the GHRD, Compile Quartus Project
- Check QSys system
- Generate SOPCinfo file
- generates Handoff folder
- Open SoC EDS Command shell. $ bsp-editor&
- From BSP Editor : File > New BSP File > [Generated HPS Folder: hps_isw_handoff / demo_hps_0]
- Choose BOOT_FROM_SDMMC and enable the FAT_SUPPORT because BootLoader(aka U-Boot) has particular filename on the FAT partition of the SD card.
- Click “Generate” to generate Pre-Loader source files
- At this stage, BSP Editor generated a “Makefile” script as well as “software > generated” folder that has the specific customization for a particular board.
- In order to make the Pre-Loader, change your directory to “<project>/software/spl_bsp” and type $ make in the SoC EDS command shell.
- After Pre-Loader is generated, type “$ make uboot” in the SoC EDS command shell to generate the U-Boot files.
We have to update preloader and u-boot i.e Partition 1 & Partition 2 of sd card
- Insert the SD card into your PC’s SD card slot.
- Update Pre-Loader with new version(the generated files) using below command-p (point to .bin file..) , -a (action), -d (drive), $ alt-boot-disk-util.exe –p preloader-mkpimage.bin –a write –d i
- copy U-Boot image into SD card using normal linux file copy command. $ cp uboot-socfpga/u-boot.img /cygdrive/i
- sync to safely pull out the SD card from PC’s SD slot. $ sync
Let me know if this has helped resolve the issue you are facing or if you need any further assistance.
Anand Raj Shankar
(This message was posted on behalf of Intel Corporation)
Thanks for the solution. I have followed the steps and now my I2C-2 controller is active but still after some time it gives an error "i2c_designware ffc06000.i2c: controller timed out" I am not able to find out what is causing this error. Is there anything i need to add in my device tree to rectify this problem?