2013-01-08 22:40:58 +08:00
|
|
|
# toolchains options
|
|
|
|
ARCH='sim'
|
2013-01-22 16:57:47 +08:00
|
|
|
#CPU='win32'
|
|
|
|
#CPU='posix'
|
|
|
|
CPU='posix'
|
|
|
|
CROSS_TOOL='gcc' #msvc # gcc
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
# lcd panel options
|
|
|
|
# 'FMT0371','ILI932X', 'SSD1289'
|
|
|
|
# RT_USING_LCD_TYPE = 'SSD1289'
|
|
|
|
|
|
|
|
# cross_tool provides the cross compiler
|
|
|
|
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
|
|
|
|
if CROSS_TOOL == 'gcc':
|
|
|
|
PLATFORM = 'gcc'
|
|
|
|
EXEC_PATH = '/usr/bin/gcc'
|
|
|
|
|
|
|
|
if CROSS_TOOL == 'msvc':
|
|
|
|
PLATFORM = 'cl'
|
|
|
|
EXEC_PATH = ''
|
|
|
|
|
|
|
|
BUILD = 'debug'
|
|
|
|
#BUILD = ''
|
|
|
|
|
|
|
|
if PLATFORM == 'gcc':
|
|
|
|
# toolchains
|
|
|
|
PREFIX = ''
|
|
|
|
CC = PREFIX + 'gcc'
|
|
|
|
AS = PREFIX + 'gcc'
|
|
|
|
AR = PREFIX + 'ar'
|
|
|
|
LINK = PREFIX + 'gcc'
|
|
|
|
TARGET_EXT = 'axf'
|
|
|
|
SIZE = PREFIX + 'size'
|
|
|
|
OBJDUMP = PREFIX + 'objdump'
|
|
|
|
OBJCPY = PREFIX + 'objcopy'
|
|
|
|
|
|
|
|
DEVICE = ' -ffunction-sections -fdata-sections'
|
2013-01-22 16:57:47 +08:00
|
|
|
DEVICE = ' '
|
|
|
|
CFLAGS = DEVICE + ' -I/usr/include -w -D_REENTRANT'
|
2013-01-08 22:40:58 +08:00
|
|
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
|
|
|
|
#LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-linux.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
|
2013-01-22 16:57:47 +08:00
|
|
|
#LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-linux.map -lpthread'
|
|
|
|
#LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-linux.map -pthread'
|
|
|
|
LFLAGS = DEVICE + ' -Wl,-Map=rtthread-linux.map -pthread -T gcc.ld'
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
CPATH = ''
|
|
|
|
LPATH = ''
|
|
|
|
|
|
|
|
if BUILD == 'debug':
|
2013-01-22 16:57:47 +08:00
|
|
|
CFLAGS += ' -g -O0 -gdwarf-2'
|
2013-01-08 22:40:58 +08:00
|
|
|
AFLAGS += ' -gdwarf-2'
|
|
|
|
else:
|
|
|
|
CFLAGS += ' -O2'
|
|
|
|
|
|
|
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
|
|
|
|
|
|
|
elif PLATFORM == 'cl':
|
|
|
|
# toolchains
|
|
|
|
PREFIX = ''
|
|
|
|
TARGET_EXT = 'exe'
|
|
|
|
AS = PREFIX + 'cl'
|
|
|
|
CC = PREFIX + 'cl'
|
|
|
|
AR = PREFIX + 'cl'
|
|
|
|
LINK = PREFIX + 'cl'
|
|
|
|
AFLAGS = ''
|
|
|
|
CFLAGS = ''
|
|
|
|
LFLAGS = ''
|
|
|
|
|
|
|
|
if BUILD == 'debug':
|
|
|
|
CFLAGS += ' /MTd'
|
|
|
|
LFLAGS += ' /DEBUG'
|
|
|
|
else:
|
|
|
|
CFLAGS += ' /MT'
|
|
|
|
LFLAGS += ''
|
|
|
|
|
|
|
|
CFLAGS += ' /ZI /Od /W 3 /WL '
|
|
|
|
LFLAGS += ' /SUBSYSTEM:CONSOLE /MACHINE:X86 '
|
|
|
|
|
|
|
|
CPATH = ''
|
|
|
|
LPATH = ''
|
|
|
|
|
|
|
|
POST_ACTION = ''
|