[Bsp][stm32f4xx-hal]整理链接脚本
This commit is contained in:
parent
d7b70ee9b0
commit
743c264285
|
@ -3,16 +3,15 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# toolchains options
|
# toolchains options
|
||||||
ARCH='arm'
|
ARCH = 'arm'
|
||||||
CPU='cortex-m4'
|
CPU = 'cortex-m4'
|
||||||
CROSS_TOOL='gcc'
|
CROSS_TOOL = 'gcc'
|
||||||
|
|
||||||
if os.getenv('RTT_CC'):
|
if os.getenv('RTT_CC'):
|
||||||
CROSS_TOOL = os.getenv('RTT_CC')
|
CROSS_TOOL = os.getenv('RTT_CC')
|
||||||
|
|
||||||
#device options
|
#device options
|
||||||
|
|
||||||
|
|
||||||
# cross_tool provides the cross compiler
|
# cross_tool provides the cross compiler
|
||||||
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
|
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
|
||||||
if CROSS_TOOL == 'gcc':
|
if CROSS_TOOL == 'gcc':
|
||||||
|
@ -44,7 +43,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' # -D' + PART_TYPE
|
CFLAGS = DEVICE + ' -std=c99'
|
||||||
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-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue