5.3. Generating the ITCM image file

For the example SOPC system design, the processor ITCM (implemented as an Altera on-chip RAM) must be preloaded with Cortex-M1 instructions. You can create a suitable ITCM image using the RealView MDK tools.

The RealView MDK output .axf format is different from the .hex format read by the Altera on-chip RAM simulation models. A hex2hex conversion tool is included with the release, and its invocation is integrated into the RealView MDK tools so that the final Altera .hex file for the on-chip RAM simulation model is produced after building the project. For more information on the hex2hex conversion script, including how to use it in your own projects, see Application Note 215: Converting memory initialization files in the ARM Cortex-M1 FPGA Development Kit.

The hex2hex converter is integrated into the RealView MDK toolset in the following two ways:

The following command appears in the edit field directly adjacent to the Run #1 checkbox:

..\..\Utilities\hex2hex.bat --infile="#H" --outfile="..\..\ExampleDesign\CortexM1_ExampleDesign_sim\%H" --oformat=hex --width=4 --saddr=0x00000000 --osize=32K

This command is executed on a build or a rebuild. The hex2hex conversion script, hex2hex.bat, takes several arguments. The #H parameter in the --infile argument is interpreted by RealView MDK as the full path to the original Intel Hexadecimal file that it created. The %H in the --outfile argument is interpreted as the filename (no path) of the original hex file. The result is that the Altera-ready hex file, itcm.hex, is placed in the simulation directory of the example system where it can be used as the ITCM memory initialization file for system simulation.

Note

The hex2hex conversion utility requires that the Quartus II software is installed.

Copyright © 2008 ARM Limited. All rights reserved.ARM DUI 0430A
Non-Confidential