nuttx: add GREENHILLS compiler config option

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao 2024-06-20 14:58:19 +08:00 committed by Xiang Xiao
parent 56745e300a
commit dd8b630b0d
3 changed files with 17 additions and 2 deletions

View File

@ -286,6 +286,10 @@ config ARCH_TOOLCHAIN_TASKING
bool
default n
config ARCH_TOOLCHAIN_GHS
bool
default n
config ARCH_GNU_NO_WEAKFUNCTIONS
bool
depends on ARCH_TOOLCHAIN_GNU

View File

@ -47,6 +47,10 @@ config ARM_TOOLCHAIN_ARMCLANG
bool "ARM Compiler Clang toolchain"
select ARCH_TOOLCHAIN_CLANG
config ARM_TOOLCHAIN_GHS
bool "ARM Compiler Green Hills Software toolchain"
select ARCH_TOOLCHAIN_GHS
endchoice # ARM Toolchain Selection
choice

View File

@ -68,7 +68,8 @@ enum compiler_e
COMPILER_MINGW,
COMPILER_SDCC,
COMPILER_ZDSII,
COMPILER_TASKING
COMPILER_TASKING,
COMPILER_GHS
};
/****************************************************************************
@ -191,6 +192,11 @@ static enum compiler_e get_compiler(char *ccname)
{
return COMPILER_SDCC;
}
else if (strstr(ccname, "ccarm") != NULL ||
strstr(ccname, "cxarm") != NULL)
{
return COMPILER_GHS;
}
else if (strstr(ccname, "mingw") != NULL)
{
return COMPILER_MINGW;
@ -352,7 +358,8 @@ int main(int argc, char **argv, char **envp)
wintool = true;
#endif
}
else if (compiler == COMPILER_SDCC || compiler == COMPILER_TASKING)
else if (compiler == COMPILER_SDCC || compiler == COMPILER_TASKING ||
compiler == COMPILER_GHS)
{
cmdarg = "-I";
}