Keil Logo

GNU ARM AssemblerHomeAssembler Arm Assembler

Conditional Assembly Control Symbols

Define
Sets symbols using assembler specific directives, e.g. SETA for Arm Compiler 5. See Assembler Options below. The defined names are copied exactly as they are entered (case-sensitive). Each name may get optionally a value, for example: Check, NoExtRam, X1=1+5

Language / Code Generation

Assembler Options
Allows µVision to select the assembler to be used for the input assembly source files.

Present only if Arm Compiler 6 is selected in the ARM Compiler field in the Target dialog.
Assembler option is locked to "armclang (GNU Syntax)" for CPUs with no Arm syntax support available (Armv8.1-M, Cortex-M55, and any future Cortex-M CPUs).

  • armclang (Auto Select)
    Calls armclang with option -masm=auto to automatically determine the used assembler syntax from each input assembly source file. The case of the assembly file's ending further determines if to assemble the file with or without the use of the armclang C-preprocessor.
    • Lower case file ending (".s"):assemble without armclang C-preprocessor. µVision internal defines and defines specified in the Define field are added in the form -Wa,armasm,-pd,"<name> SETA <value>".
    • Capital case file ending (".S"): assemble with armclang C-preprocessor. µVision internal defines and defines specified in the Define field are added in the form -D<name>=<value>.
    In rare cases this assembler option may lead to unexpected results. Use one of the other AC6 assembler options for such files to resolve the issues.
  • armclang (GNU Syntax)
    Calls armclang with option -masm=gnu. The case of the file ending determines if to assemble with or without the use of the armclang C-preprocessor.
    • Lower case file ending (".s"):assemble without armclang C-preprocessor. µVision internal defines and defines specified in the Define field are added in the form -Wa,-defsym,<name>=<value>.
    • Capital case file ending (".S"): assemble with armclang C-preprocessor. µVision internal defines and defines specified in the Define field are added in the form -D<name>=<value>.
  • armclang (Arm Syntax)
    Calls armclang with option -masm=armasm. The case of the file ending determines if to assemble with or without the use of the armclang C-preprocessor.
    • Lower case file ending (".s"):assemble without armclang C-preprocessor. µVision internal defines and defines specified in the Define field are added in the form -Wa,armasm,-pd,"<name> SETA <value>".
    • Capital case file ending (".S"): assemble with armclang C-preprocessor. µVision internal defines and defines specified in the Define field are added in the form -D<name>=<value>.
  • armasm (Arm Syntax)
    Calls armasm.exe without using the C-preprocessor. µVision internal defines and defines specified in the "Define" field are added in the form --pd "<name> SETA <value>".
Enable ARM/Thumb Interworking
The code in the assembler source file allows calls between ARM and Thumb mode code. Available only for devices that can switch between ARM and Thumb mode. Sets the assembler command-line option --apcs=interwork.
Read-Only Position Independent
The code in the assembler source file is designed for position independent ROM constants. Generates the assembler command-line option --apcs=/ropi.
Read-Write Position Independent
The code in the assembler source file is designed for position independent RAM variables. Sets the assembler command-line option --apcs=/rwpi.
Thumb Mode
Generate Thumb Code. Sets the assembler command-line option --16.
No Warnings
Disable warning messages. Sets the assembler command-line option --nowarn. Is interchangeable with --no_warn.
Execute-only Code
Adds the EXECONLY AREA attribute to all code sections, causing the linker to treat the section as execute-only. Sets the assembler control string --execute_only. The user must ensure that the section is safe to run in execute-only memory. The code should not:
  • Contain literal pools.
  • Attempt to load data from the same, or another, execute-only section.
Restricted to
  • Cortex-M3 and Cortex-M4 processor-based devices.
  • armasm assembler version 5.04 and above.
Split Load and Store Multiple
An error message is generated when the instructions LDM/STM have more than 5 (more than 4 when the PC is changed) CPU registers. Sets the assembler command-line option --split_ldm.
No Auto Includes
Suppress all assembler paths that are included automatically during assemblation. System includes are not affected by this box. Assembler auto-include paths can be viewed in the field Assembler control string.

Note

  • If a µVision project mixes assembler source files that require different assembler options as described above or have different file endings to indicate the preprocessor usage, then do not add Misc Controls that are exclusively available to an assembler option to the target level options. Set such Misc Controls on group or file level instead. Add groups for assembler source files that use the same assembler option and file ending to set same Misc Controls for multiple files to simplify this.

Other Controls

Include Paths
Allows you to supply one or more (separated by semi-colon) paths to source file path.
Misc Controls
Specify any directive for which there is no individual dialog control.
Assembler control string
Display the current directives at the Assembler command line.

Note

  • The assembler directive INFO has a parameter severity. This parameter is not supported in µVision. As a consequence, INFO messages are always displayed in the Output window.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.