Updated on 2024-11-21 GMT+08:00

Building with GNU Arm

Compile and build software for Arm processors.

Build on GUI

Add Build with GNU Arm, when configuring build actions. Set the parameters according to Table 1.

Table 1 Parameters for building with GNU Arm

Parameter

Description

Action Name

Assign a custom name to the build action. The name can contain:

  • Letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), and parentheses.
  • 1 to 128 characters.

Tool Version

Select a tool version that matches your current development environment.

For tool versions supported by CodeArts Build, see build tools and versions. If the current tools and versions do not meet your requirements, you can customize a build environment.

Commands

Configure the GNU Arm build commands, or use the default make command.

  • If Makefile is not in the root directory of the code, run the cd command to access the correct directory and then run the make command.
  • If you do not want to run the make command, you can refer to the build commands provided by the following images:
    • Optional: Image gnuarm201405: Run the arm-none-linux-gnueabi-gcc command as follows:
      arm-none-linux-gnueabi-gcc -o main main.c
    • Image gnuarm-linux-gcc-4.4.3: Run the arm-linux-gcc command as follows:
      arm-linux-gcc -o main main.c
    • Image gnuarm-7-2018-q2-update: Run the arm-none-eabi-gcc command as follows:
      arm-none-eabi-gcc --specs=nosys.specs -o main main.c
NOTE:
  • For details about how to write the GNU makefile in Linux, see the official website.
  • Makefile contains only line comment tags (#). If you want to use or output the number sign (#), escape the number sign, for example, using \#.

Continue After Failure

Specify whether to proceed after the current action fails by setting the parameter to either Yes or No.

Build with Code

Modify the code in the BUILD block in Creating a YAML File for Your Code-based Build by referring to the following sample code:

1
2
3
4
5
6
7
version: 2.0 # The value must be 2.0.
steps:
  BUILD:
    - gnu_arm:
       inputs:
          command: make
          ignore_fail: true
Table 2 Parameters in the sample code

Parameter

Type

Description

command

String

Configure the command for building with GNU Arm.

  • If Makefile is not in the root directory of the code, run the cd command to access the correct directory and then run the make command.
  • If you do not want to run the make command, you can refer to the build commands provided by the following images:
    • Optional: Image gnuarm201405: Run the arm-none-linux-gnueabi-gcc command as follows:
      arm-none-linux-gnueabi-gcc -o main main.c
    • Image gnuarm-linux-gcc-4.4.3: Run the arm-linux-gcc command as follows:
      arm-linux-gcc -o main main.c
    • Image gnuarm-7-2018-q2-update: Run the arm-none-eabi-gcc command as follows:
      arm-none-eabi-gcc --specs=nosys.specs -o main main.c
NOTE:
  • For details about how to write the GNU makefile in Linux, see the official website.
  • Makefile contains only line comment tags (#). If you want to use or output the number sign (#), escape the number sign, for example, using \#.

ignore_fail

String

Whether to proceed after the current action fails.
  • true: Yes
  • Empty: No