Safety-certified tools Tools for Automotive Applications C-STAT Static analysis C-RUN Runtime analysis Debugging and trace probes
This guide familiarizes you with IAR Embedded Workbench for Arm and how to get started with it using a Zynq-7000 Xilinx Demonstration Kit ZC-702.
This is the first step in understanding how to develop complete programs with IAR Embedded Workbench for Arm. In this guide, you will get a quick insight in how to build and run a dual-core program on Xilinx Zynq 7000. Xilinx Zynq 7000 is equipped with dualcore Arm Cortex-A9 processors. The guide will go through the following steps:
For this project, you need an Xilinx Zynq-7000 ZC-702 evaluation kit.
Scroll up and see that you have example programs from Xilinx installed. Click on the green button to go to the Xilinx examples and then click the green button on the Zynq 7020 project and finally click on the Open Project button.
You will be asked where you would like to store your project. Navigate into your newly-made folder and click Choose. You now have a project with a main.c file and a cstartup.s file. Double click the main.c file to open it:
Now, build the project by clicking the Make icon or by selecting Project->Make. The project should build without errors and remove the red dots next to the source files in the Project Explorer window.
Next step is to download and run the project, but first you will need to set up the board.
The project you are about to load will execute from the on-chip RAM on the Zynq 7020. Because of this, there is no concern about erasing the demonstration programs delivered with the ZC-702 evaluation kit.
The Example Project for the Xilinx Zynq 7020 is a simple multicore project which starts up the chip, recognizes both Arm Cortex-A9 CPU cores on chip and starts a task on each core. The code which runs on each core is the same. However, the startup code recognizes which core it is running on and only initializes one core based on its ID. The program on core 0 continues on to its main() function, while the program on core 1 waits for the task on core 0 to set a variable before proceeding on to the main() entry point in its program.
When your program is downloaded the debugger will start and make some controls available. The screen should look something like this:
The program is now loaded and ready to start the execution at the entry point of cstartup.s. The first few lines of code set up the interrupt vector table in the on-chip RAM, and then it clears a variable to 0. This is the variable that the second core will check to wait to start, and the first core will write with a value in its task to release the second core to run. Note that since both cores run this startup code and set the semaphore to 0, it does not matter which core starts first.
Now, there are some additional icons on the toolbar related to multicore debugging:
First, make sure that you are focused on core 0, and the execution control is set to have Run, Stop and Step affect the current core only.
Up until now only core 0 has been executing code. It has run through the startup functions and successfully jumped to the initial line of code in the main() function.
Now, change the focus to core 1:
You can extend this startup project to make the tasks for core 0 and 1 into complete independent programs which will start up and execute on the two cores.