{
    "title": "ARM Compiler V6 Options",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "beforeBuildTasks": {
            "markdownDescription": "List of commands to execute before build",
            "description.zh-cn": "构建前要执行的命令列表",
            "type": "array",
            "default": [
                {
                    "name": "clean",
                    "command": "del /Q \"${OutDir}\\*.*\""
                }
            ],
            "items": {
                "type": "object",
                "required": [
                    "name",
                    "command"
                ],
                "properties": {
                    "name": {
                        "markdownDescription": "A readable name for display",
                        "description.zh-cn": "用于显示的可读名称",
                        "type": "string"
                    },
                    "command": {
                        "markdownDescription": "Shell command line",
                        "description.zh-cn": "Shell 命令行",
                        "type": "string"
                    },
                    "disable": {
                        "markdownDescription": "Disable this command",
                        "description.zh-cn": "禁用此命令",
                        "type": "boolean",
                        "enum": [
                            true,
                            false
                        ]
                    },
                    "abortAfterFailed": {
                        "markdownDescription": "Whether to skip subsequent commands if this command failed",
                        "description.zh-cn": "是否在此命令失败时，跳过后续的命令",
                        "type": "boolean",
                        "enum": [
                            true,
                            false
                        ]
                    },
                    "stopBuildAfterFailed": {
                        "markdownDescription": "Whether to stop compiling directly when this command failed",
                        "description.zh-cn": "是否在此命令失败时，直接停止编译",
                        "type": "boolean",
                        "enum": [
                            true,
                            false
                        ]
                    }
                }
            }
        },
        "afterBuildTasks": {
            "markdownDescription": "List of commands to execute after build",
            "description.zh-cn": "构建结束后要执行的命令列表",
            "type": "array",
            "default": [
                {
                    "name": "clean",
                    "command": "del \"${OutDir}\\*._*\""
                }
            ],
            "items": {
                "type": "object",
                "required": [
                    "name",
                    "command"
                ],
                "properties": {
                    "name": {
                        "markdownDescription": "A readable name for display",
                        "description.zh-cn": "用于显示的可读名称",
                        "type": "string"
                    },
                    "command": {
                        "markdownDescription": "Shell command line",
                        "description.zh-cn": "Shell 命令行",
                        "type": "string"
                    },
                    "disable": {
                        "markdownDescription": "Disable this command",
                        "description.zh-cn": "禁用此命令",
                        "type": "boolean",
                        "enum": [
                            true,
                            false
                        ]
                    },
                    "abortAfterFailed": {
                        "markdownDescription": "Whether to skip subsequent commands if this command failed",
                        "description.zh-cn": "是否在此命令失败时，跳过后续的命令",
                        "type": "boolean",
                        "enum": [
                            true,
                            false
                        ]
                    }
                }
            }
        },
        "global": {
            "markdownDescription": "Global Options",
            "description.zh-cn": "全局选项",
            "type": "object",
            "properties": {
                "use-microLIB": {
                    "markdownDescription": "Use MicroLIB",
                    "description.zh-cn": "Use MicroLIB",
                    "type": "boolean",
                    "enum": [
                        true,
                        false
                    ]
                },
                "big-endian": {
                    "markdownDescription": "Big Endian",
                    "description.zh-cn": "Big Endian",
                    "type": "boolean",
                    "enum": [
                        true,
                        false
                    ]
                },
                "output-debug-info": {
                    "markdownDescription": "Output debug information",
                    "description.zh-cn": "输出调试信息",
                    "type": "string",
                    "default": "disable",
                    "enum": [
                        "disable",
                        "enable",
                        "dwarf-2",
                        "dwarf-3",
                        "dwarf-4",
                        "dwarf-5"
                    ],
                    "enumDescriptions": [
                        "disable",
                        "enable",
                        "enable with dwarf-2",
                        "enable with dwarf-3",
                        "enable with dwarf-4",
                        "enable with dwarf-5"
                    ]
                }
            }
        },
        "c/cpp-compiler": {
            "markdownDescription": "C/C++ Compiler Options",
            "description.zh-cn": "C/C++ 编译器选项",
            "type": "object",
            "properties": {
                "language-c": {
                    "markdownDescription": "C Standard",
                    "description.zh-cn": "C 标准",
                    "type": "string",
                    "default": "",
                    "enum": [
                        "c90",
                        "c99",
                        "c11",
                        "c17",
                        "gnu90",
                        "gnu99",
                        "gnu11",
                        "gnu17"
                    ]
                },
                "language-cpp": {
                    "markdownDescription": "C++ Standard",
                    "description.zh-cn": "C++ 标准",
                    "type": "string",
                    "default": "",
                    "enum": [
                        "c++98",
                        "c++03",
                        "c++11",
                        "c++14",
                        "c++17",
                        "gnu++98",
                        "gnu++11",
                        "gnu++17"
                    ]
                },
                "optimization": {
                    "markdownDescription": "Optimization Level",
                    "description.zh-cn": "代码优化级别",
                    "type": "string",
                    "default": "level-0",
                    "enum": [
                        "level-0",
                        "level-1",
                        "level-2",
                        "level-3",
                        "level-fast",
                        "level-balanced",
                        "level-image-size"
                    ]
                },
                "link-time-optimization": {
                    "markdownDescription": "Link Time Optimization (LTO)",
                    "type": "boolean"
                },
                "one-elf-section-per-function": {
                    "markdownDescription": "One ELF Section per Function",
                    "type": "boolean"
                },
                "split-load-and-store-multiple": {
                    "markdownDescription": "Split Load and Store Multiple",
                    "type": "boolean"
                },
                "plain-char-is-signed": {
                    "markdownDescription": "Plain Char is Signed",
                    "type": "boolean"
                },
                "short-enums#wchar": {
                    "markdownDescription": "enum/wchar is short type",
                    "type": "boolean"
                },
                "use-rtti": {
                    "markdownDescription": "use RTTI",
                    "type": "boolean"
                },
                "warnings": {
                    "markdownDescription": "Warning Level",
                    "description.zh-cn": "警告等级",
                    "type": "string",
                    "default": "ac5-like-warnings",
                    "enum": [
                        "unspecified",
                        "no-warnings",
                        "all-warnings",
                        "ac5-like-warnings",
                        "misra-compatible"
                    ]
                },
                "turn-Warning-into-errors": {
                    "markdownDescription": "Turn warnings into errors",
                    "description.zh-cn": "将警告转化为错误",
                    "type": "boolean"
                },
                "execute-only-code": {
                    "markdownDescription": "Execute-only Code",
                    "type": "boolean"
                },
                "read-only-position-independent": {
                    "markdownDescription": "Read-Only Position-Independent (ROPI)",
                    "description.zh-cn": "Read-Only Position-Independent (ROPI)",
                    "type": "boolean"
                },
                "read-write-position-independent": {
                    "markdownDescription": "Read-Write Position-Independent (RWPI)",
                    "description.zh-cn": "Read-Write Position-Independent (RWPI)",
                    "type": "boolean"
                },
                "misc-controls": {
                    "markdownDescription": "Other Global Compiler Options",
                    "description.zh-cn": "编译器附加选项（全局）",
                    "size": "huge",
                    "type": "string",
                    "default": ""
                },
                "C_FLAGS": {
                    "markdownDescription": "Other C Compiler Options",
                    "description.zh-cn": "C 编译器附加选项",
                    "size": "huge",
                    "type": "string",
                    "default": ""
                },
                "CXX_FLAGS": {
                    "markdownDescription": "Other C++ Compiler Options",
                    "description.zh-cn": "C++ 编译器附加选项",
                    "size": "huge",
                    "type": "string",
                    "default": ""
                }
            }
        },
        "asm-compiler": {
            "markdownDescription": "Assembler Options",
            "description.zh-cn": "汇编器选项",
            "type": "object",
            "properties": {
                "defines": {
                    "readable_name": "Preprocessor Definitions",
                    "readable_name.zh-cn": "预处理器定义",
                    "markdownDescription": "Preprocessor Definitions",
                    "description.zh-cn": "预处理器定义",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "$use": {
                    "markdownDescription": "Assember Type",
                    "description.zh-cn": "汇编器类型",
                    "type": "string",
                    "default": "asm",
                    "enum": [
                        "asm",
                        "asm-auto",
                        "asm-clang"
                    ],
                    "enumDescriptions": [
                        "arm-asm (arm syntax)",
                        "arm-auto (auto detect)",
                        "arm-clang (gnu syntax)"
                    ]
                },
                "misc-controls": {
                    "markdownDescription": "Other Assembler Options",
                    "description.zh-cn": "汇编器附加选项",
                    "size": "huge",
                    "type": "string",
                    "default": ""
                }
            }
        },
        "linker": {
            "markdownDescription": "Linker Options",
            "description.zh-cn": "链接器选项",
            "type": "object",
            "properties": {
                "output-format": {
                    "type": "string",
                    "default": "elf",
                    "description": "Output Format",
                    "description.zh-cn": "输出格式",
                    "enum": [
                        "elf",
                        "lib"
                    ],
                    "enumDescriptions": [
                        "AXF",
                        "LIB"
                    ]
                },
                "$disableOutputTask": {
                    "type": "boolean",
                    "markdownDescription": "Don't Output Hex/Bin/S19 Files",
                    "description.zh-cn": "不生成 Hex/Bin/S19 等二进制文件",
                    "enum": [
                        true,
                        false
                    ]
                },
                "$outputTaskExcludes": {
                    "type": "array",
                    "markdownDescription": "Don't Output Specific Binary Files",
                    "description.zh-cn": "不生成指定的二进制文件",
                    "default": [],
                    "items": {
                        "type": "string",
                        "default": ".bin",
                        "enum": [
                            ".bin",
                            ".hex",
                            ".s19"
                        ],
                        "enumDescriptions": [
                            "*.bin file",
                            "*.hex file",
                            "*.s19 file"
                        ]
                    }
                },
                "xo-base": {
                    "markdownDescription": "X/O Base",
                    "description.zh-cn": "X/O Base",
                    "size": "small",
                    "type": "string"
                },
                "ro-base": {
                    "markdownDescription": "R/O Base",
                    "description.zh-cn": "R/O Base",
                    "size": "small",
                    "type": "string"
                },
                "rw-base": {
                    "markdownDescription": "R/W Base",
                    "description.zh-cn": "R/W Base",
                    "size": "small",
                    "type": "string"
                },
                "misc-controls": {
                    "markdownDescription": "Other Linker Options",
                    "description.zh-cn": "链接器附加选项",
                    "size": "huge",
                    "type": "string",
                    "default": ""
                },
                "object-order": {
                    "type": "array",
                    "readable_name": "Object Order",
                    "readable_name.zh-cn": "Object Order",
                    "markdownDescription": "Object Order (used to determine the order in which object files are linked)",
                    "description.zh-cn": "Object Order（用于决定某些 obj 文件的链接顺序）",
                    "default": [],
                    "items": {
                        "type": "object",
                        "properties": {
                            "pattern": {
                                "type": "string",
                                "readable_name": "Pattern",
                                "description": "A glob pattern (https://github.com/dazinator/DotNet.Glob) to match a object (*.o) file",
                                "default": "**/your/pattern/for/object/file/path/*.o"
                            },
                            "order": {
                                "type": "number",
                                "readable_name": "Order",
                                "description": "An integer number (The smaller the value, the higher the priority)",
                                "default": 0
                            }
                        }
                    }
                }
            }
        }
    }
}