add c++ support for the bsp of stm32
This commit is contained in:
parent
efd8b404a3
commit
4f03ef589f
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
|
|||||||
|
|
||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
|
|||||||
|
|
||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
|
|||||||
|
|
||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,16 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +139,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
|
|||||||
|
|
||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,8 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -49,6 +49,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > CODE = 0
|
} > CODE = 0
|
||||||
|
|
||||||
@ -75,6 +83,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -49,6 +49,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > CODE = 0
|
} > CODE = 0
|
||||||
|
|
||||||
@ -75,6 +83,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -48,6 +48,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > CODE = 0
|
} > CODE = 0
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,15 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +82,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -49,6 +49,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > CODE = 0
|
} > CODE = 0
|
||||||
|
|
||||||
@ -75,6 +83,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -35,6 +35,7 @@ if PLATFORM == 'gcc':
|
|||||||
PREFIX = 'arm-none-eabi-'
|
PREFIX = 'arm-none-eabi-'
|
||||||
CC = PREFIX + 'gcc'
|
CC = PREFIX + 'gcc'
|
||||||
AS = PREFIX + 'gcc'
|
AS = PREFIX + 'gcc'
|
||||||
|
CXX = PREFIX + 'g++'
|
||||||
AR = PREFIX + 'ar'
|
AR = PREFIX + 'ar'
|
||||||
LINK = PREFIX + 'gcc'
|
LINK = PREFIX + 'gcc'
|
||||||
TARGET_EXT = 'elf'
|
TARGET_EXT = 'elf'
|
||||||
@ -43,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -56,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -84,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -129,5 +138,8 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -55,6 +55,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > CODE = 0
|
} > CODE = 0
|
||||||
|
|
||||||
@ -81,6 +89,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -49,6 +49,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > CODE = 0
|
} > CODE = 0
|
||||||
|
|
||||||
@ -75,6 +83,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,12 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
|
|||||||
STRIP = PREFIX + 'strip'
|
STRIP = PREFIX + 'strip'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -g -Wall'
|
CFLAGS = DEVICE + ' -g -Wall'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -56,6 +56,9 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2 -Os'
|
CFLAGS += ' -O2 -Os'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
# module setting
|
# module setting
|
||||||
@ -92,6 +95,7 @@ elif PLATFORM == 'armcc':
|
|||||||
CFLAGS += ' -O2 -Otime'
|
CFLAGS += ' -O2 -Otime'
|
||||||
|
|
||||||
CXXFLAGS = CFLAGS
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -86,11 +90,14 @@ elif PLATFORM == 'armcc':
|
|||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
CXXFLAGS = CFLAGS
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -131,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,12 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
CXXFLAGS = CFLAGS
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -131,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
|
|||||||
STRIP = PREFIX + 'strip'
|
STRIP = PREFIX + 'strip'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -g -Wall'
|
CFLAGS = DEVICE + ' -g -Wall'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -56,6 +56,9 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2 -Os'
|
CFLAGS += ' -O2 -Os'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
# module setting
|
# module setting
|
||||||
@ -70,6 +73,7 @@ elif PLATFORM == 'armcc':
|
|||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
CXX = 'armcc'
|
CXX = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -91,13 +95,16 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2 -Otime'
|
CFLAGS += ' -O2 -Otime'
|
||||||
|
|
||||||
CXXFLAGS = CFLAGS
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
CXX = 'iccarm'
|
CXX = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,12 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,12 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,16 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +139,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -48,6 +48,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -74,6 +82,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -47,6 +47,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -73,6 +81,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
|
|||||||
|
|
||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
|
|||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ SECTIONS
|
|||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
PROVIDE(__ctors_start__ = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE(__ctors_end__ = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
@ -72,6 +80,11 @@ SECTIONS
|
|||||||
*(.data.*)
|
*(.data.*)
|
||||||
*(.gnu.linkonce.d*)
|
*(.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
PROVIDE(__dtors_start__ = .);
|
||||||
|
KEEP(*(SORT(.dtors.*)))
|
||||||
|
KEEP(*(.dtors))
|
||||||
|
PROVIDE(__dtors_end__ = .);
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .data secion */
|
/* This is used by the startup in order to initialize the .data secion */
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
|
@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Dgcc'
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
CFLAGS += ' -std=c99'
|
||||||
|
|
||||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||||
|
|
||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
|
|||||||
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
LFLAGS = ' --config "board/linker_scripts/link.icf"'
|
||||||
LFLAGS += ' --entry __iar_program_start'
|
LFLAGS += ' --entry __iar_program_start'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user