[bsp][redv] update CFLAGS

This commit is contained in:
luhuadong 2021-12-23 19:35:24 +08:00
parent f7447a8dc5
commit c85e5d429d
3 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,8 @@ TARGET = 'rtthread.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)

View File

@ -4,6 +4,7 @@
#include "platform.h"
#include "encoding.h"
#include "rtthread.h"
extern int main(int argc, char** argv);
extern void trap_entry();

View File

@ -12,7 +12,7 @@ if os.getenv('RTT_CC'):
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'/opt/unknown-gcc/bin'
EXEC_PATH = r'/opt/FreedomStudio/SiFive/riscv64-unknown-elf-gcc-8.3.0-2019.08.0/bin/'
else:
print('Please make sure your toolchains is GNU GCC!')
exit(0)
@ -62,6 +62,8 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -O2'
CXXFLAGS = CFLAGS
POST_ACTION = OBJCPY + ' -O binary $TARGET ' + TARGET_NAME + '\n'
POST_ACTION += OBJCPY + ' -O ihex $TARGET ' + TARGET_NAME_HEX + '\n'
#POST_ACTION += OBJCPY + ' -I binary -O ihex ' + TARGET_NAME + ' ' + TARGET_NAME_HEX + '\n'