1 Star 0 Fork 0

cking616/AR5_Project

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Tupfile.lua 3.63 KB
一键复制 编辑 原始数据 按行查看 历史
tup.include('build.lua')
--FLAGS += '-Werror'
-- C-specific flags
FLAGS += '-D__weak="__attribute__((weak))"'
FLAGS += '-D__packed="__attribute__((__packed__))"'
FLAGS += '-DUSE_STDPERIPH_DRIVER'
FLAGS += '-DSTM32F40_41xxx'
FLAGS += '-D__FPU_PRESENT=1'
FLAGS += '-DARM_MATH_CM4'
FLAGS += '-DARM_MATH_MATRIX_CHECK'
FLAGS += '-DARM_MATH_ROUNDING'
FLAGS += '-DUSE_USB_OTG_FS'
FLAGS += '-mthumb'
FLAGS += '-mcpu=cortex-m4'
FLAGS += '-mfpu=fpv4-sp-d16'
FLAGS += '-mfloat-abi=hard'
FLAGS += { '-Wall', '-Wfloat-conversion', '-fdata-sections', '-ffunction-sections'}
-- debug build
FLAGS += '-g -gdwarf-2'
boarddir = 'Gcc'
-- linker flags
LDFLAGS += '-T'..boarddir..'/STM32F405RGTx_FLASH.ld'
LDFLAGS += '-L'..boarddir..'/CMSIS/Lib' -- lib dir
LDFLAGS += '-lc -lm -lnosys -larm_cortexM4lf_math' -- libs
LDFLAGS += '-mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nosys.specs -specs=nano.specs -u _printf_float -u _scanf_float -Wl,--cref -Wl,--gc-sections'
LDFLAGS += '-Wl,--undefined=uxTopUsedPriority'
-- common flags for ASM, C and C++
OPT += '-Og'
OPT += '-ffast-math -fno-finite-math-only'
tup.append_table(FLAGS, OPT)
tup.append_table(LDFLAGS, OPT)
toolchain = GCCToolchain('arm-none-eabi-', 'build', FLAGS, LDFLAGS)
-- Load list of source files Makefile that was autogenerated by CubeMX
--[[
vars = parse_makefile_vars(boarddir..'/Makefile')
all_stm_sources = (vars['C_SOURCES'] or '')..' '..(vars['CPP_SOURCES'] or '')..' '..(vars['ASM_SOURCES'] or '')
for src in string.gmatch(all_stm_sources, "%S+") do
stm_sources += boarddir..'/'..src
end
for src in string.gmatch(vars['C_INCLUDES'] or '', "%S+") do
stm_includes += boarddir..'/'..string.sub(src, 3, -1) -- remove "-I" from each include path
end
]]--
build{
name='AR5_Joint',
toolchains={toolchain},
packages={},
sources={
'Main/main.c',
'Main/DataInterface.c',
'EtherCAT/src/coeappl.c',
'EtherCAT/src/ecatappl.c',
'EtherCAT/src/ecatcoe.c',
'EtherCAT/src/ecatslv.c',
'EtherCAT/src/mailbox.c',
'EtherCAT/src/objdef.c',
'EtherCAT/src/sdoserv.c',
'EtherCAT/src/PMPDriver.c',
'EtherCAT/src/9252_HW.c',
'EtherCAT/src/cia402appl.c',
'StateMachine/Configuration.c',
'StateMachine/Control.c',
'StateMachine/M1_statemachine.c',
'StateMachine/Motor_Drive.c',
'StateMachine/StateMachine.c',
'Main/CRC_16.c',
'Main/RS232_USART.c',
'Main/stm32f4xx_it.c',
'Gcc/startup_stm32f405xx.s',
'STM32F4Driver/Sou/misc.c',
'STM32F4Driver/Sou/stm32f4xx_adc.c',
'STM32F4Driver/Sou/stm32f4xx_can.c',
'STM32F4Driver/Sou/stm32f4xx_crc.c',
'STM32F4Driver/Sou/stm32f4xx_dma.c',
'STM32F4Driver/Sou/stm32f4xx_exti.c',
'STM32F4Driver/Sou/stm32f4xx_flash.c',
'STM32F4Driver/Sou/stm32f4xx_gpio.c',
'STM32F4Driver/Sou/stm32f4xx_i2c.c',
'STM32F4Driver/Sou/stm32f4xx_sdio.c',
'STM32F4Driver/Sou/stm32f4xx_spi.c',
'STM32F4Driver/Sou/stm32f4xx_tim.c',
'STM32F4Driver/Sou/stm32f4xx_syscfg.c',
'STM32F4Driver/Sou/stm32f4xx_usart.c',
'STM32F4Driver/Sou/stm32f4xx_rcc.c',
'STM32F4Driver/Sou/stm32f4xx_dbgmcu.c',
'STM32F4Driver/Sou/stm32f4xx_fsmc.c',
'CMSISCore/Sou/system_stm32f4xx.c',
'SystemViewer/SEGGER_RTT.c',
'SystemViewer/SEGGER_SYSVIEW.c',
'SystemViewer/SEGGER_SYSVIEW_Config_NoOS.c',
},
includes={
'CMSISCore/Inc',
'Gcc/CMSIS/Include',
'Main',
'SystemViewer',
'StateMachine',
'EtherCAT/Inc',
'STM32F4Driver/Inc',
'STM32F4Driver/Inc'
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cking616/AR5_Project.git
git@gitee.com:cking616/AR5_Project.git
cking616
AR5_Project
AR5_Project
master

搜索帮助