Skip to content
Martin Kojtal edited this page Apr 17, 2015 · 14 revisions

Each tool has specific settings. This section describes what options are available per tool. The value for each attribute depends on the tool definition.

An option which supports multiple options should be defined as:

Misccontrols:
    - debug
    -g

An option which has just 2 values, can be enabled/disabled:

uC99:
    - enable

An option which can have multiple values, is set accordingly to the number defined. For example optimization for IAR can be None, Low, High. If Optim set to 0, it's None. If set to 1, it's Low.

### uVision attributes

The uVision attributes are defined in the uvision definitions script file. If you want to use any of those settings, define them in the misc under tool specific attribute.

tool_specific:
    uvision:
        misc:
            Cads:
                MiscControls:
                    - --debug
                    - -g
                    - --gnu
                Ropi:
                    - enable
                Optim:
                    - 1
                uC99:
                    - enable
                OneElfS:
                    - enable

The example above sets C/C++ settings. Like Optimization to 1, C99 Mode enable and One Elf section per function.

uvision_settings = {
    # C/C++ settings
    'Cads' : {
        'interw' : 0,   # Execute-only code
        'Optim' : 0,    # Optimization level
        'oTime' : 0,    # Optimize for time
        'SplitLS' : 0,  # Split load and store multiple
        'OneElfS' : 0,  # One elf section per function
        'Strict' : 0,   # Strict ANSI C
        'EnumInt' : 0,  # Enum container always int
        'PlainCh' : 0,  # Plain char is signed
        'Ropi' : 0,     # Read-only position independent code
        'Rwpi' : 0,     # Read-write position independent code
        'wLevel' : 0,   # Warnings level
        'uThumb' : 0,   # Thumb mode
        'uSurpInc' : 0, # No auto includes
        'uC99' : 0,     # C99 mode
        'MiscControls': [], # Misc controls
    },

    # Linker settings
    'LDads' : {
       'umfTarg' : 0,           # Use Memory from Target dialog window
       'Ropi' : 0,              # Make RO section position independent
       'Rwpi' : 0,              # Make RW section position independent
       'noStLib' : 0,           # Dont search Standard libraries
       'RepFail' : 0,           # Report might fail conditions as errors
       'useFile' : 0,
       'TextAddressRange' : 0,  # RO address range
       'DataAddressRange' : 0,  # RW address range
       'IncludeLibs' : 0,
       'IncludeLibsPath' : 0,
       'Misc' : 0,              # Misc controls
       'LinkerInputFile' : 0,   # Scatter file
       'DisabledWarnings' : [], # Disable warnings
    },

    # Assembly settings
    'Aads' : {
        'interw' : 0,           # Execute-only code
        'Ropi' : 0,             # RO position independent
        'Rwpi' : 0,             # RW position independent
        'thumb' : 0,            # Thumb mode
        'SplitLS' : 0,          # Split load and store multiple
        'SwStkChk' : 0,
        'NoWarn' : 0,           # No warnings
        'uSurpInc' : 0,         # No auto includes
        'VariousControls' : 0,
        'MiscControls' : 0,     # Misc controls
        'Define' : [],          # Define
        'Undefine' : 0,         # Undefine
        'IncludePath' : [],     # Include paths
        'VariousControls' : 0,
    },

    # User settings
    'TargetOption' : {
        'CreateExecutable' : 0,     # Create executable
        'CreateLib' : 0,            # Create library
        'CreateHexFile' : 0,        # Create hex file
        'DebugInformation' : 0,     # Debug information
        'BrowseInformation' : 0,    # Browse information
        'CreateBatchFile' : 0,      # Create batch file
        'BeforeCompile' : {         # Run user program before compilation
            'RunUserProg1' : 0,     # Run #1
            'UserProg1Name' : 0,    # Program #1 name
            'RunUserProg2' : 0,     # Run #2
            'UserProg2Name' : 0,    # Program #2 name
            'UserProg1Dos16Mode' : 0,   # Dos16 mode for #1
            'UserProg2Dos16Mode' : 0,   # Dos16 mode for #2
        },
        'BeforeMake' : {                # User programs before build
            'RunUserProg1' : 0,         # Run #1
            'UserProg1Name' : 0,        # Program #1 name
            'RunUserProg2' : 0,         # Run #2
            'UserProg2Name' : 0,        # Program #2 name
            'UserProg1Dos16Mode' : 0,   # Dos16 mode for #1
            'UserProg2Dos16Mode' : 0,   # Dos16 mode for #2
        },
        'AfterMake' : {
            'RunUserProg1' : 0,         # Run #2
            'UserProg1Name' : 0,        # Program #1 name
            'RunUserProg2' : 0,         # Run #2
            'UserProg2Name' : 0,        # Program #2 name
            'UserProg1Dos16Mode' : 0,   # Dos16 mode for #1
            'UserProg2Dos16Mode' : 0,   # Dos16 mode for #2
        }
    },

    # Target settings
    'ArmAdsMisc' : {
        'useUlib' : 0,  # use MicroLIB
        'NoZi1' : 0,    #
        'NoZi2' : 0,
        'NoZi3' : 0,
        'NoZi4' : 0,
        'NoZi5' : 0,
        'OCR_RVCT1' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT2' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT3' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT4' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT5' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT6' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT7' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT8' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT9' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        },
        'OCR_RVCT10' : {
            'Type' : 0,
            'StartAddress' : 0,
            'Size' : 0,
        }
    },

    'CommonProperty' : {
        'UseCPPCompile' : 0,    # Use CPP compiler for C files
        'RVCTCodeConst' : 0,
        'RVCTZI' : 0,
        'RVCTOtherData' : 0,
        'ModuleSelection' : 0,
        'IncludeInBuild' : 0,
        'AlwaysBuild' : 0,
        'GenerateAssemblyFile' : 0,
        'AssembleAssemblyFile' : 0,
        'PublicsOnly' : 0,
        'StopOnExitCode' : 0,
        'CustomArgument' : 0,
        'IncludeLibraryModules' : 0,
    },

    'DebugOption' : {
        'Simulator' : {
            'UseSimulator' : 0,
            'LoadApplicationAtStartup' : 1,
            'RunToMain' : 1,
            'RestoreBreakpoints' : 1,
            'RestoreWatchpoints' : 1,
            'RestoreMemoryDisplay' : 1,
            'RestoreFunctions' : 1,
            'RestoreToolbox' : 1,
            'LimitSpeedToRealTime' : 0,
        },
        'Target' : {
            'UseTarget' : 1,
            'LoadApplicationAtStartup' : 1,
            'RunToMain' : 1,
            'RestoreBreakpoints' : 1,
            'RestoreWatchpoints' : 1,
            'RestoreMemoryDisplay' : 1,
            'RestoreFunctions' : 1,
            'RestoreToolbox' : 1,
            'RestoreTracepoints' : 1,
            'RestoreTracepoints' : 1,
            'RestoreTracepoints' : 1,
        },
        'RunDebugAfterBuild' : 0,
        'TargetSelection' : 0,
    },

    'Utilities' : {
        'Flash1' : {
            'UseTargetDll' : 0,
            'UseExternalTool' : 0,
            'RunIndependent' : 0,
            'UpdateFlashBeforeDebugging' : 0,
            'Capability' : 0,
            'DriverSelection' : 0,
        },
        'bUseTDR' : 1,
        'Flash2' : 'BIN\CMSIS_AGDI.dll',
        'Flash3' : 0,
        'Flash4' : 0,
        'pFcarmOut' : 0,
        'pFcarmGrp' : 0,
        'pFcArmRoot' : 0,
        'FcArmLst' : 0,
    }
}
### IAR attributes

The IAR attributes are defined in the IAR definiton script file. If you want to use any of those settings, define them in the misc under tool specific attribute.

    iar_settings = {
        'Variant' : {
            'state' : 0,
        },
        'GEndianMode' : { # [General Options][Target] Endian mode
            'state' : 0,
        },
        'Input variant' : {
            'version' : 0,
            'state' : 0,
        },
        'Output variant' : {
            'state' : 1,
        },
        'GOutputBinary' : { # [General Options][Output] Executable or library
            'state' : 0,    # 1 - library, 0 - executable
        },
        'FPU' : {
            'version' : 2,
            'state' : 0,
        },
        'GRuntimeLibSelect' : { # [General Options] Use runtime library
            'version' : 0,
            'state' : 0,        # 0 - none, 1 - normal, 2 - full, 3 - custom
        },
        'GRuntimeLibSelectSlave' : {
            'version' : 0,
            'state' : 0,
        },
        'GeneralEnableMisra' : {    # [General Options] Enable Misra-C
            'state' : 0,
        },
        'GeneralMisraVerbose' : {   # [General Options] Misra verbose
            'state' : 0,
        },
        'OGChipSelectEditMenu' : {  # [General Options] Select MCU (be aware, tabs are needed in some cases)
            'state' : 0,
        },
        'GenLowLevelInterface' : {  # [General Options] Use semihosting
            'state' : 0,            # [General Options] 0 - none, 1 - semihosting, 2 - IAR breakpoint
        },
        'GEndianModeBE' : {
            'state' : 0,
        },
        'OGBufferedTerminalOutput' : { # [General Options] Buffered terminal output
            'state' : 0,
        },
        'GenStdoutInterface' : {    # [General Options] Stdout/err
            'state' : 0,            # [General Options] 0 - semihosting, 1 - SWD
        },
        'GeneralMisraVer' : {
            'state' : 0,
        },
        'GFPUCoreSlave' : {
            'state' : 0,
        },
        'GBECoreSlave' : {
            'state' : 0,
        },
        'OGUseCmsis' : {        # [General Options][Lib configuration] Use CMSIS Lib
            'state' : 0,
        },
        'OGUseCmsisDspLib' : {  # [General Options][Lib configuration] Use CMSIS DSP Lib, only valid if CMSIS Lib is selected
            'state' : 0,
        },
        'CCPreprocFile' : {
            'state' : 0,
        },
        'CCPreprocComments' : {
            'state' : 0,
        },
        'CCPreprocLine' : {
            'state' : 0,
        },
        'CCListCFile' : { # [C/C++ Compiler][Output] Output list file
            'state' : 0,
        },
        'CCListCMnemonics' : {
            'state' : 0,
        },
        'CCListCMessages' : {
            'state' : 0,
        },
        'CCListAssFile' : { # [C/C++ Compiler][Output] Output assembler file
            'state' : 0,
        },
        'CCListAssSource' : {
            'state' : 0,
        },
        'CCEnableRemarks' : {
            'state' : [],
        },
        'CCDiagSuppress' : {
            'state' : 0,
        },
        'CCDiagRemark' : {
            'state' : 0,
        },
        'CCDiagWarning' : {
            'state' : 0,
        },
        'CCDiagError' : {
            'state' : 0,
        },
        'CCObjPrefix' : {
            'state' : 0,
        },
        'CCAllowList' : {       # [C/C++ Compiler] Enable transformations (Optimizations)
            'version' : 1,
            'state' : 1111111,  # Each bit is for one optimization settings. For example second bit is for loop unrolling
        },
        'CCDebugInfo' : {   # [C/C++ Compiler] Generate debug information
            'state' : 1,
        },
        'IEndianMode' : {
            'state' : 1,
        },
        'IProcessor' : {
            'state' : 1,
        },
        'IExtraOptionsCheck' : {
            'state' : 0,
        },
        'IExtraOptions' : {
            'state' : 0,
        },
        'CCLangConformance' : { # [C/C++ Compiler] Language conformance
            'state' : 0,        # 0 - standard with IAR extensions, 1 - standard, 2 - strict
        },
        'CCSignedPlainChar' : { # [C/C++ Compiler] Plain char
            'state' : 1,        # 0 - signed, 1 - unsigned
        },
        'CCRequirePrototypes' : { # [C/C++ Compiler] Require prototypes
            'state' : 0,
        },
        'CCMultibyteSupport' : {
            'state' : 0,
        },
        'CCCompilerRuntimeInfo' : {
            'state' : 0,
        },
        'CCDiagWarnAreErr' : {
            'state' : 0,
        },
        'IFpuProcessor' : {
            'state' : 0,
        },
        'OutputFile' : {
            'state' : '',
        },
        'CCLibConfigHeader' : {
            'state' : 0,
        },
        'PreInclude' : {
            'state' : 0,
        },
        'CompilerMisraOverride' : {
            'state' : 0,
        },
        'CCStdIncCheck' : {
            'state' : 0,
        },
        'CCCodeSection' : {
            'state' : '.text',
        },
        'IInterwork2' : {
            'state' : 0,
        },
        'IProcessorMode2' : {
            'state' : 0,
        },
        'IInterwork2' : {
            'state' : 0,
        },
        'CCOptLevel' : {   # [C/C++ Compiler] Optimization level
            'state' : 0,        # 0 - None, 1 - Low, 2 - Medium , 3 - High
        },
        'CCOptStrategy' : {     # [C/C++ Compiler] Valid only for Optimization level High
            'version' : 0,
            'state' : 0,        # 0 - Balanced, 1 - Size, 2 - Speed
        },
        'CCOptLevelSlave' : {
            'state' : 0,
        },
        'CompilerMisraRules98' : {
            'version' : 0,
            'state' : 0,
        },
        'CompilerMisraRules04' : {
            'version': 0,
            'state' : 0,
        },
        'CCPosIndRopi' : {  # [C/C++ Compiler][Code] Code and read-only data
            'state' : 0,
        },
        'IccLang' : {       # [C/C++ Compiler] C/C++ Language selection
            'state' : 0,    # 0 - C, 1- C++, 2 - Auto
        },
        'CCPosIndNoDynInit' : {  # [C/C++ Compiler][Code]
            'state' : 0,
        },
        'CCPosIndRwpi' : {  # [C/C++ Compiler][Code] Read write/data
            'state' : 0,
        },
        'IccCDialect' : {   # [C/C++ Compiler] C dialect
            'state' : 1,    # 0 - C89, 1 - C90
        },
        'IccAllowVLA' : {   # [C/C++ Compiler] Allow VLA (valid only for C99)
            'state' : 0,
        },
        'IccCppDialect' : { # [C/C++ Compiler] C++ dialect
            'state' : 0,    # 0 - Embedded C++, 1 - Extended embedded, 2 - C++
        },
        'IccExceptions' : { # [C/C++ Compiler] With exceptions (valid only for C++ dialect 2)
            'state' : 0,
        },
        'IccRTTI' : {       # [C/C++ Compiler] With RTTI (valid only for C++ dialect 2)
            'state' : 0,
        },
        'IccStaticDestr' : {
            'state' : 1,
        },
        'IccCppInlineSemantics' : { # [C/C++ Compiler] C++ inline semantic (valid only for C99)
            'state' : 0,
        },
        'IccCmsis' : {
            'state' : 1,
        },
        'IccFloatSemantics' : { # [C/C++ Compiler] Floating point semantic
            'state' : 0,        # 0 - strict, 1 - relaxed
        },

        'AObjPrefix' : {
            'state' : 0,
        },
        'AEndian' : {
            'state' : 0,
        },
        'ACaseSensitivity' : {
            'state' : 0,
        },
        'MacroChars' : {
            'state' : 0,
        },
        'AWarnEnable' : {
            'state' : 0,
        },
        'AWarnWhat' : {
            'state' : 0,
        },
        'AWarnOne' : {
            'state' : 0,
        },
        'AWarnRange1' : {
            'state' : 0,
        },
        'AWarnRange2' : {
            'state' : 0,
        },
        'ADebug' : {
            'state' : 0,
        },
        'AltRegisterNames' : {
            'state' : 0,
        },
        'ADefines' : {
            'state' : 0,
        },
        'AList' : {
            'state' : 0,
        },
        'AListHeader' : {
            'state' : 0,
        },
        'AListing' : {
            'state' : 0,
        },
        'Includes' : {
            'state' : 0,
        },
        'MacDefs' : {
            'state' : 0,
        },
        'MacExps' : {
            'state' : 0,
        },
        'MacExec' : {
            'state' : 0,
        },
        'OnlyAssed' : {
            'state' : 0,
        },
        'MultiLine' : {
            'state' : 0,
        },
        'PageLengthCheck' : {
            'state' : 0,
        },
        'PageLength' : {
            'state' : 0,
        },
        'TabSpacing' : {
            'state' : 0,
        },
        'AXRefDefines' : {
            'state' : 0,
        },
        'AXRef' : {
            'state' : 0,
        },
        'AXRefInternal' : {
            'state' : 0,
        },
        'AXRefDual' : {
            'state' : 0,
        },
        'AProcessor' : {
            'state' : 0,
        },
        'AFpuProcessor' : {
            'state' : 0,
        },
        'AOutputFile' : {
            'state' : 0,
        },
        'AMultibyteSupport' : {
            'state' : 0,
        },
        'ALimitErrorsCheck' : {
            'state' : 0,
        },
        'ALimitErrorsEdit' : {
            'state' : 0,
        },
        'AIgnoreStdInclude' : {
            'state' : 0,
        },
        'AUserIncludes' : {
            'state' : 0,
        },
        'AExtraOptionsCheckV2' : {
            'state' : 0,
        },
        'AExtraOptionsV2' : {
            'state' : 0,
        },
        'OOCOutputFormat' : {
            'state' : 0,
        },
        'OCOutputOverride' : {
            'state' : 0,
        },
        'OOCCommandLineProducer' : {
            'state' : 0,
        },
        'OOCObjCopyEnable' : {
            'state' : 1,
        },

        'IlinkOutputFile' : {
            'state' : 0,
        },
        'IlinkLibIOConfig' : {
            'state' : 0,
        },
        'XLinkMisraHandler' : {
            'state' : 0,
        },
        'IlinkInputFileSlave' : {
            'state' : 0,
        },
        'IlinkDebugInfoEnable' : {
            'state' : 0,
        },
        'IlinkKeepSymbols' : {
            'state' : 0,
        },
        'IlinkRawBinaryFile' : {
            'state' : 0,
        },
        'IlinkRawBinarySymbol' : {
            'state' : 0,
        },
        'IlinkRawBinarySegment' : {
            'state' : 0,
        },
        'IlinkRawBinaryAlign' : {
            'state' : 0,
        },
        'IlinkDefines' : {
            'state' : 0,
        },
        'IlinkConfigDefines' : {
            'state' : 0,
        },
        'IlinkMapFile' : {
            'state' : 0,
        },
        'IlinkLogFile' : {
            'state' : 0,
        },

        'IlinkLogInitialization' : {
            'state' : 0,
        },
        'IlinkLogModule' : {
            'state' : 0,
        },
        'IlinkLogSection' : {
            'state' : 0,
        },
        'IlinkLogVeneer' : {
            'state' : 0,
        },
        'IlinkIcfOverride' : {
            'state' : 0,
        },
        'IlinkEnableRemarks' : {
            'state' : 0,
        },
        'IlinkSuppressDiags' : {
            'state' : 0,
        },

        'IlinkTreatAsRem' : {
            'state' : 0,
        },
        'IlinkTreatAsWarn' : {
            'state' : 0,
        },
        'IlinkTreatAsErr' : {
            'state' : 0,
        },
        'IlinkWarningsAreErrors' : {
            'state' : 0,
        },
        'IlinkUseExtraOptions' : {
            'state' : 0,
        },
        'IlinkExtraOptions' : {
            'state' : 0,
        },
        'IlinkLowLevelInterfaceSlave' : {
            'state' : 0,
        },
        'IlinkAutoLibEnable' : {
            'state' : 0,
        },
        'IlinkProgramEntryLabelSelect' : {
            'state' : 0,
        },
        'IlinkProgramEntryLabel' : {
            'state' : 0,
        },
    }
### Makefile attributes

Currently supported : - optimization level - libraries - compiler options

### CoIDE attributes

The CoIDE attributes are defined in the CoIDE definiton script file. If you want to use any of those settings, define them in the misc under tool specific attribute.

    coide_settings = {
        'Compile' : {
            'OptimizationLevel' : 0,
            'UserEditCompiler' : [],
        },
        'Link' : {
            'DiscardUnusedSection' : 0,
            'UseMemoryLayout' : 0,
            'LTO' : 0,
            'IsNewStartupCode' : 1,
            'nostartfiles' : 0,
        },
        'User' : {
            'UserRun' : {
                'Before': '',
                'After' : '',
            }
        },
        'Output' : {
            'OutputFileType' : 0,
            'HEX' : 1,
            'BIN' : 1,
        }
    }
### Eclipse Makefile GNU ARM attributes

As Eclipse project is based on Makefile, the attributes are the same as for Makefile.