43 lines
890 B
Python
43 lines
890 B
Python
import os
|
|
|
|
# toolchains options
|
|
ARCH ='risc-v'
|
|
CPU =''
|
|
CROSS_TOOL ='gcc'
|
|
|
|
if os.getenv('RTT_CC'):
|
|
CROSS_TOOL = os.getenv('RTT_CC')
|
|
|
|
if CROSS_TOOL == 'gcc':
|
|
PLATFORM = 'gcc'
|
|
EXEC_PATH = r'~/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin'
|
|
else:
|
|
print('Please make sure your toolchains is GNU GCC!')
|
|
exit(0)
|
|
|
|
if os.getenv('RTT_EXEC_PATH'):
|
|
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
|
|
|
BUILD = 'debug'
|
|
|
|
if PLATFORM == 'gcc':
|
|
# toolchains
|
|
PREFIX = 'riscv32-esp-elf-'
|
|
CC = PREFIX + 'gcc'
|
|
CXX = PREFIX + 'g++'
|
|
AS = PREFIX + 'gcc'
|
|
AR = PREFIX + 'ar'
|
|
LINK = PREFIX + 'gcc'
|
|
TARGET_EXT = 'elf'
|
|
SIZE = PREFIX + 'size'
|
|
OBJDUMP = PREFIX + 'objdump'
|
|
OBJCPY = PREFIX + 'objcopy'
|
|
STRIP = PREFIX + 'strip'
|
|
|
|
CFLAGS = ''
|
|
AFLAGS = ''
|
|
LFLAGS = ''
|
|
CXXFLAGS = ''
|
|
|
|
POST_ACTION = ''
|