summaryrefslogtreecommitdiff
path: root/bsp/thead-smart/rtconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/thead-smart/rtconfig.py')
-rw-r--r--bsp/thead-smart/rtconfig.py31
1 files changed, 20 insertions, 11 deletions
diff --git a/bsp/thead-smart/rtconfig.py b/bsp/thead-smart/rtconfig.py
index be45bc8e84..95606581c8 100644
--- a/bsp/thead-smart/rtconfig.py
+++ b/bsp/thead-smart/rtconfig.py
@@ -1,9 +1,11 @@
import os
# toolchains options
+# CPUNAME = e906/e906f/e906fd/e906p/e906fp/e906fdp
+# CPUNAME = e907/e907f/e907fd/e907p/e907fp/e907fdp
ARCH ='risc-v'
-CPU ='e906'
-CPUNAME ='e906f'
+CPU ='e9xx'
+CPUNAME ='e906fdp'
VENDOR ='t-head'
CROSS_TOOL ='gcc'
@@ -12,9 +14,9 @@ if os.getenv('RTT_CC'):
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
- EXEC_PATH = r'/home/xinge/tools/riscv64-elf-x86_64-20200616-1.9.6/bin'
+ EXEC_PATH = r'/home/chenzx/.thead/riscv64-elf-x86_64-2.0.1/bin/'
else:
- print 'Please make sure your toolchains is GNU GCC!'
+ print ('Please make sure your toolchains is GNU GCC!')
exit(0)
if os.getenv('RTT_EXEC_PATH'):
@@ -37,16 +39,23 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
STRIP = PREFIX + 'strip'
- if CPUNAME == 'e906fd':
- DEVICE = ' -march=rv32imafdcxthead -mabi=ilp32d'
- if CPUNAME == 'e906f':
- DEVICE = ' -march=rv32imafcxthead -mabi=ilp32f'
- if CPUNAME == 'e906':
- DEVICE = ' -march=rv32imacxthead -mabi=ilp32'
+
+ if CPUNAME == 'e906fdp' or CPUNAME == 'e907fdp':
+ DEVICE = ' -march=rv32imafdcpzp64_xtheade -mabi=ilp32d'
+ if CPUNAME == 'e906fp' or CPUNAME == 'e907fp':
+ DEVICE = ' -march=rv32imafcpzp64_xtheade -mabi=ilp32f'
+ if CPUNAME == 'e906p' or CPUNAME == 'e907p':
+ DEVICE = ' -march=rv32imacpzp64_xtheade -mabi=ilp32'
+ if CPUNAME == 'e906fd' or CPUNAME == 'e907fd':
+ DEVICE = ' -march=rv32imafdc_xtheade -mabi=ilp32d'
+ if CPUNAME == 'e906f' or CPUNAME == 'e907f':
+ DEVICE = ' -march=rv32imafc_xtheade -mabi=ilp32f'
+ if CPUNAME == 'e906' or CPUNAME == 'e907':
+ DEVICE = ' -march=rv32imac_xtheade -mabi=ilp32'
CFLAGS = DEVICE + ' -c -g -ffunction-sections -fdata-sections -Wall -mcmodel=medlow'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
- LFLAGS = DEVICE + ' -nostartfiles -Wl,--no-whole-archive -T gcc_csky.ld -lm -lc -lgcc -Wl,-gc-sections -Wl,-zmax-page-size=1024'
+ LFLAGS = DEVICE + ' -nostartfiles -Wl,--no-whole-archive -T gcc_csky.ld -lm -lc -lgcc -Wl,-gc-sections -Wl,-zmax-page-size=1024 -Wl,-Map=rtt.map'
CPATH = ''
LPATH = ''