System Design Overview¶
- Table of contents
- System Design Overview
Designing a system with the MityARM-5CSX module is a more involved than using other System On Module designs due to the integrated CPU/FPGA feature.
Each project will require you to create/customize the following items (in addition to your main application / system code):- Quartus project (
<project.qpf>
) - QSys project (
<project.qsys>
) - Preloader ( Generated by Altera tools )
- Device Tree (
<project.dts>
)
- Device drivers ( if devices are not currently supported )
- Startup scripts ( usually copied from an existing script )
Preloader¶
The preloader is the 2nd stage bootloader (the first stage bootloader is the ROM bootloader in the Altera part). Its primary functions are:- Configure the I/O pin mux settings.
- Configure the DDR3 RAM controller.
- Load and execute u-boot.
The basic steps to generate the preloader are:
- Launch quartus.
- Create a new project or start from the Critical Link MityARM-5CSX reference project
- The CL reference project has the top-level entity and HPS preipherals set up already (for on-som peripherals)
- Launch the Qsys tool (from Quartus Tools menu)
- Open the MityARM-5CSX reference qsys project (or your qsys project)
- If not already done, be sure to add the path to the Crtiical Link IP folder to the IP search path (Tools->Options->IP Search Path)
- Internal (CL) SVN mityaltera/mityarm-5csx/trunk/hw/fpga/ip
- Configure / Verify all pinmux settings in the Hard Processor System
- double click on the hps_0 component to open it.
- If you have started with the CL reference project (or applied the CL HPS preset), the basics will be configured already. Do NOT change SDRAM settings!
- Add any required pinmux settings.
- Do NOT change Ethernet, QSPI, USB1 UART0, or I2C0 settings, as they are used by the MityARM-5CSX module
- After adjusting / verifying system settings in qsys, go to the generation tab and click the :Generate" button.
- This will create the system design files for quartus.
- You can now close the Qsys application
- Back in Quartus, you need to build the project (Processing->Start Compilation or the toolbar button).
- Depending on the complexity of your design, this step can take a while.
- Assuming your compilation was successful, the tools will generate an hps_isw_handoff folder with required settings data.
- Run the BSP editor (bsp-editor)
- Select File->New BSP and select the following:
- Preloader settings directory (click the ... button then navigate to and select the hps_isw_handoff/<..._hps0> folder.
- You should be able to leave the other settings as their defaults.
- The next window allows you to customize the preloader settings. The definition of each settings is detailed in the Altera documentation. The only thin you really may need to change is the BOOT FROM setting.
- Make sure you only pick one boot mode, or the preloader will not compile!
- Click Generate. The BSP Editor will create a software/spl_bsp folder to build the preloader in.
- You can now cd to the newly created director and make the preloader.
- cd to the spl direcory, and make the preloader
cd software/spl_bsp/uboot-socfpga
make
- You should be left with a
preloader-mkpimage.bin
file, which is actually multiple copies of the preloader concatenated together, ready to be burned to your boot media.
Updated about 1 year ago by Daniel Vincelette
Go to top