summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMan, Jianting (Meco) <[email protected]>2021-12-22 18:57:16 -0500
committerGitHub <[email protected]>2021-12-22 18:57:16 -0500
commited1f8b3f6411a74a80c2d2288b12bf75eacc008b (patch)
tree646c194b9e513ae25500a7caa49a76fd8ac895c9
parent457348e21a6e0e4d6355d994a69285ba47496c20 (diff)
Revert "add clang-arm support."
This reverts commit a5f6fdc780d55f2bf2a1624815879e15c51082b5.
-rw-r--r--bsp/stm32/stm32l496-ali-developer/board/SConscript2
-rw-r--r--bsp/stm32/stm32l496-ali-developer/rtconfig.py35
-rw-r--r--components/drivers/spi/SConscript2
-rw-r--r--components/libc/compilers/common/nogcc/SConscript2
-rw-r--r--components/libc/compilers/gcc/newlib/SConscript2
-rw-r--r--libcpu/arm/cortex-m4/SConscript2
-rw-r--r--tools/building.py2
7 files changed, 6 insertions, 41 deletions
diff --git a/bsp/stm32/stm32l496-ali-developer/board/SConscript b/bsp/stm32/stm32l496-ali-developer/board/SConscript
index 9298652b29..4c26186b46 100644
--- a/bsp/stm32/stm32l496-ali-developer/board/SConscript
+++ b/bsp/stm32/stm32l496-ali-developer/board/SConscript
@@ -24,7 +24,7 @@ path += [cwd + '/ports']
startup_path_prefix = SDK_LIB
-if rtconfig.CROSS_TOOL == 'gcc' or rtconfig.CROSS_TOOL == 'clang':
+if rtconfig.CROSS_TOOL == 'gcc':
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l496xx.s']
elif rtconfig.CROSS_TOOL == 'keil':
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l496xx.s']
diff --git a/bsp/stm32/stm32l496-ali-developer/rtconfig.py b/bsp/stm32/stm32l496-ali-developer/rtconfig.py
index 439b79a3c3..b6c0783af5 100644
--- a/bsp/stm32/stm32l496-ali-developer/rtconfig.py
+++ b/bsp/stm32/stm32l496-ali-developer/rtconfig.py
@@ -24,9 +24,6 @@ elif CROSS_TOOL == 'keil':
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0'
-elif CROSS_TOOL == 'clang':
- PLATFORM = 'clang'
- EXEC_PATH = r'D:\envs\LLVMEmbeddedToolchainForArm-13.0.0\bin'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
@@ -179,38 +176,6 @@ elif PLATFORM == 'iar':
EXEC_PATH = EXEC_PATH + '/arm/bin/'
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
-elif PLATFORM == 'clang':
- # toolchains
- PREFIX = 'llvm-'
- CC = 'clang'
- AS = 'clang'
- AR = PREFIX + 'ar'
- CXX = 'clang++'
- LINK = 'clang'
- TARGET_EXT = 'elf'
- SIZE = PREFIX + 'size'
- OBJDUMP = PREFIX + 'objdump'
- OBJCPY = PREFIX + 'objcopy'
-
- DEVICE = ' --config armv7em_hard_fpv4_sp_d16_nosys'
- CFLAGS = DEVICE
- AFLAGS = ' -c' + DEVICE + ' -Wa,-mimplicit-it=thumb ' ## -x assembler-with-cpp
- LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-u,Reset_Handler -T board/linker_scripts/link.lds'
-
- CPATH = ''
- LPATH = ''
-
- if BUILD == 'debug':
- CFLAGS += ' -O0 -gdwarf-2 -g'
- AFLAGS += ' -gdwarf-2'
- else:
- CFLAGS += ' -O2'
-
- CXXFLAGS = CFLAGS
-
- POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
-
-
def dist_handle(BSP_ROOT, dist_dir):
import sys
cwd_path = os.getcwd()
diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript
index da14ed5fef..d6cb93f7f1 100644
--- a/components/drivers/spi/SConscript
+++ b/components/drivers/spi/SConscript
@@ -25,7 +25,7 @@ if GetDepend('RT_USING_SFUD'):
CPPPATH += [cwd + '/sfud/inc']
if GetDepend('RT_SFUD_USING_SFDP'):
src_device += ['sfud/src/sfud_sfdp.c']
- if rtconfig.CROSS_TOOL == 'gcc' or rtconfig.CROSS_TOOL == 'clang':
+ if rtconfig.CROSS_TOOL == 'gcc':
LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
if rtconfig.PLATFORM == 'armcc':
diff --git a/components/libc/compilers/common/nogcc/SConscript b/components/libc/compilers/common/nogcc/SConscript
index b144f1b3b4..c766c8f82d 100644
--- a/components/libc/compilers/common/nogcc/SConscript
+++ b/components/libc/compilers/common/nogcc/SConscript
@@ -10,6 +10,6 @@ group = []
if GetDepend('RT_USING_LIBC'):
src += Glob('*.c')
-if (rtconfig.PLATFORM != 'gcc' and rtconfig.PLATFORM != 'clang') or rtconfig.ARCH == 'sim':
+if rtconfig.PLATFORM != 'gcc' or rtconfig.ARCH == 'sim':
group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH)
Return('group')
diff --git a/components/libc/compilers/gcc/newlib/SConscript b/components/libc/compilers/gcc/newlib/SConscript
index 7ab0dd046b..58672a0255 100644
--- a/components/libc/compilers/gcc/newlib/SConscript
+++ b/components/libc/compilers/gcc/newlib/SConscript
@@ -7,7 +7,7 @@ group = []
LIBS = ['m'] # link libm
CPPPATH = [cwd]
-if rtconfig.PLATFORM == 'gcc' or rtconfig.PLATFORM == 'clang':
+if rtconfig.PLATFORM == 'gcc':
if GetDepend('RT_USING_LIBC'):
LIBS += ['c'] # link libc
src += Glob('*.c')
diff --git a/libcpu/arm/cortex-m4/SConscript b/libcpu/arm/cortex-m4/SConscript
index fd80cd2a68..75f0d9a7cc 100644
--- a/libcpu/arm/cortex-m4/SConscript
+++ b/libcpu/arm/cortex-m4/SConscript
@@ -14,7 +14,7 @@ if rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'armclang':
if rtconfig.PLATFORM == 'armclang':
src += Glob('*_rvds.S')
-if rtconfig.PLATFORM == 'gcc' or rtconfig.PLATFORM == 'clang':
+if rtconfig.PLATFORM == 'gcc':
src += Glob('*_init.S')
src += Glob('*_gcc.S')
diff --git a/tools/building.py b/tools/building.py
index 52212bac9a..10641c11a9 100644
--- a/tools/building.py
+++ b/tools/building.py
@@ -121,7 +121,7 @@ class Win32Spawn:
def GenCconfigFile(env, BuildOptions):
import rtconfig
- if rtconfig.PLATFORM == 'gcc' or rtconfig.PLATFORM == 'clang':
+ if rtconfig.PLATFORM == 'gcc':
contents = ''
if not os.path.isfile('cconfig.h'):
import gcc