XILINX Zynq-7000 CPU Support Package
This package contains project templates and system files for the XILINX Zynq-7000.
CrossWorks Version 4 Installation Instructions
This package can only be installed if you have the following CrossWorks license bolt-ons:
- ARM License
- To install this support package
-
- Click the Tools > Package Manager menu option to open the package manager window.
- Right click on the XILINX Zynq-7000 CPU Support Package entry and select Install Selected Packages.
- Click Next to take you to the summary page.
- Click Next to install the package.
- Click Finish to close the package manager window.
- Click the Tools > Show Installed Packages.
- Click on the XILINX Zynq-7000 CPU Support Package link to view the package and its contents.
- To manually install this support package
-
- If you have not done so already, follow the CrossWorks Tasking Library Package installation instructions.
- Download the file Zynq_7000.hzq using your web browser.
- Click the Tools > Manually Install Packages menu option.
- Select the file you have just downloaded to install the package.
- Click the Tools > Show Installed Packages.
- Click on the XILINX Zynq-7000 CPU Support Package link to view the package and its contents.
- To install this support package using other versions
Release Notes
3.1
- Changed Vybrid_Startup.s to be assemblable with clang.
- Add reset script support for J-Link target interface.
3.0
- Added memory simulator.
- Added DDR and QSPI placements.
1.0
- Initial Release.
Documentation
Creating Zynq-7000 Projects
To create a new Zynq-7000 project
- Select the File > New > New Project menu item.
- Select the appropriate Generic Zynq_7000 from the Categories list.
- Select the required project template type from the Templates list.
- Set the required project name and location directory.
- Click OK.
To build and debug an application the runs in OCM RAM
- Select the project to work on by using the Project > Set Active Project menu option.
- Select the OCM_RAM placement by clicking on the project node in the project explorer.
- Build the project by using the Build | Build Project menu option.
- Connect to the appropriate target in the target window.
- Download and start debugging the current project by using Debug > Start Debugging.
Zynq-7000 Project Specifics
Target Processor
Once a project has been created you can select different target processors from the selected set by right clicking on the project node in the project explorer and selecting the Target property.
Selecting the target processor will specify the memory map that is used for the build and debug. You can view the selected memory map by right clicking on the project node in the project explorer and selecting Edit Memory Map. In the memory map files the memory segments defining the names, sizes and access types of the external memories are specified using macros which can be set using the Memory Map Macros project property.
Section Placement
CrossStudio for ARM supports Zynq-7000 projects running applications in a number of different memory configurations. You can select the memory configuration you require by right clicking on the project node in the project explorer and selecting the Placement property.
For Zynq-7000 projects the set of placements are:
- OCM application runs in OCM on CPU0.
- DDR application runs in DDR on CPU0.
- QSPI application runs in QSPI on CPU0.
- OCM_CPU1 application runs in OCM on CPU1.
- DDR_CPU1 application runs in DDR on CPU1.
- QSPI_CPU1 application runs in QSPI on CPU1.
Note that a CPU1 project must be run as a debug dependent project of a CPU0 project.
Target Startup Code
In the startup code Zynq_7000_Startup.s there are a set of preprocessor defines that configure the startup code and are documented in the startup file itself.
Target Reset Script
The reset script Zynq_7000_Target.js resets the target using the NSRST pin connected to the JTAG header and then stops it. You should always ensure that the board is configured to boot in JTAG mode to get a known reset state.
Memory Simulator
An memory simulator is provided that simulates the memories of the device. The memory simulation parameter (which is set by the Target Processor selection) contains macros that determine the sizes of the simulated memories and can be specified using the Memory Simulation Parameter Macros property.
CTL support
The file Zynq_7000_ctl.c implements the ctl_set_isr, ctl_unmask_isr and ctl_mask_isr functions by programming the GIC register groups.
If the vector parameter passed to these functions is greater than or equal to 32 it corresponds to the interrupt number as defined in the Zynq-7000 reference manual. If the vector is less than 32 then it corresponds to the interrupt sources defined in the CA9 reference manual.
The priority parameter to the ctl_set_isr is the GIC priority i.e. lower numbers have higher priorities. If nested interrupts are enabled for the irq_handler then the priority is a pre-emption priority i.e. interrupt handlers can be interrupted by higher priority interrupt handlers. The startup code Zynq_7000_Startup.s implements the irq_handler exception handler.
The file Zynq_7000_ctl.c also implements the ctl_start_timer function using the CA9 private timer.