[bsp] hifive1 update: default select debug mode and update debug flags

This commit is contained in:
guozhanxin 2018-09-30 18:07:02 +08:00
parent bce268c8ce
commit 23e92786f3
1 changed files with 5 additions and 5 deletions

View File

@ -16,8 +16,8 @@ if CROSS_TOOL == 'gcc':
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')
#BUILD = 'debug' BUILD = 'debug'
BUILD = 'release' #BUILD = 'release'
CORE = 'risc-v' CORE = 'risc-v'
MAP_FILE = 'rtthread.map' MAP_FILE = 'rtthread.map'
@ -37,7 +37,7 @@ if PLATFORM == 'gcc':
OBJDUMP = PREFIX + 'objdump' OBJDUMP = PREFIX + 'objdump'
OBJCPY = PREFIX + 'objcopy' OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -march=rv32imac -mabi=ilp32 -DUSE_PLIC -DUSE_M_TIME -DNO_INIT -mcmodel=medany -msmall-data-limit=8 -g -L. -nostartfiles -lc ' DEVICE = ' -march=rv32imac -mabi=ilp32 -DUSE_PLIC -DUSE_M_TIME -DNO_INIT -mcmodel=medany -msmall-data-limit=8 -L. -nostartfiles -lc '
CFLAGS = DEVICE CFLAGS = DEVICE
CFLAGS += ' -save-temps=obj' CFLAGS += ' -save-temps=obj'
AFLAGS = '-c'+ DEVICE + ' -x assembler-with-cpp' AFLAGS = '-c'+ DEVICE + ' -x assembler-with-cpp'
@ -51,8 +51,8 @@ if PLATFORM == 'gcc':
LPATH = '' LPATH = ''
if BUILD == 'debug': if BUILD == 'debug':
CFLAGS += ' -O0 -gdwarf-2' CFLAGS += ' -O0 -g3'
AFLAGS += ' -gdwarf-2' AFLAGS += ' -g3'
else: else:
CFLAGS += ' -O2' CFLAGS += ' -O2'