6.5.1 Software compilation makefile settings

The following table shows the settings for software compilation that the makefiles support:

Table 6-3 Makefile settings

Variable Descriptions
TOOL_CHAIN Determines the compiler toolchain used. The options are:
  • gcc for ARM GCC. This is the default value.
  • ds5 for ARM Development Studio 5 (DS-5).
  • keil for ARM Keil® MDK. For more information, see Building a test in ARM Keil MDK.

Name of the software test.

This must match the directory name.


Use only for the TOOLCHAIN=ds5 option. The options are:

  • 0 for normal C runtime library. This is the default value.
  • 1 for MicroLIB, which is a C runtime library that is optimized for microcontroller applications.

A user-defined C preprocessing macro. Set to -DCORTEX_M3 for most test codes.

This enables a piece of test code to include the correct header for the processor when multiple example systems share the test code. You can add more preprocessing macros for your applications.

SOFTWARE_DIR Shared software directory.
CMSIS_DIR Base location of all ARM Cortex Microcontroller Software Interface Standard (CMSIS) source code.
DEVICE_DIR Device-specific support files, for example, header files, and device driver files.
STARTUP_DIR Startup code location.

ARM C Compiler options.

Use only for the TOOLCHAIN=ds5 option.


ARM Assembler options.

Use only for the TOOLCHAIN=ds5 option.


ARM Linker options.

Use only for the TOOLCHAIN=ds5 option.


GCC compile option.

Use only for the TOOLCHAIN=gcc option. By default it uses the Newlib NANO C library.


ARM C Compiler options.

Use only for the TOOLCHAIN=gcc option.


A project file that is specific to Keil specifies the options for Keil MDK.

Building a test in ARM Keil MDK

If you use Keil MDK to compile the integration test (TOOL_CHAIN=keil during compilation), the make process pauses and displays the following:

Please ensure all files from Keil MDK test compilation are in the <test> directory before pressing ENTER

If the Windows environment cannot access the Linux environment, you might need to first copy the whole package into the Windows environment.

To compile a test, invoke Keil MDK and open the Keil project file in <install_directory>/m3designstart/logical/testbench/testcodes/<test>/<test>.uvprojx, and choose compile. If necessary, copy all generated files back into the Linux environment.

When you are compiling for the simulation environment, use the 'Debug' build target. There is also an 'mps2' target, which will configure the UART to 38 400 Baud, so tests can be run using FPGA hardware.

You can open the Multi Project Workspace provided in <install_directory>/ m3designstart/logical/testbench/testcodes/keil_multiple/cm3ds_all.uvmpw. This allows you to batch build all of the targets at once.

Non-ConfidentialPDF file icon PDF versionARM 100894_0000_00_en
Copyright © 2017 ARM Limited or its affiliates. All rights reserved.