Advertisement
Guest User

Untitled

a guest
Nov 1st, 2017
794
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 11.17 KB | None | 0 0
  1. ##########################################################################################################################
  2. # File automatically-generated by tool: [projectgenerator] version: [2.26.0] date: [Wed Nov 01 19:33:29 GMT 2017]
  3. ##########################################################################################################################
  4.  
  5. # ------------------------------------------------
  6. # Generic Makefile (based on gcc)
  7. #
  8. # ChangeLog :
  9. #   2017-02-10 - Several enhancements + project update mode
  10. #   2015-07-22 - first version
  11. # ------------------------------------------------
  12.  
  13. ######################################
  14. # target
  15. ######################################
  16. TARGET = lwip_test_f429zi
  17.  
  18.  
  19. ######################################
  20. # building variables
  21. ######################################
  22. # debug build?
  23. DEBUG = 1
  24. # optimization
  25. OPT = -Og
  26.  
  27.  
  28. #######################################
  29. # paths
  30. #######################################
  31. # source path
  32. SOURCES_DIR =  \
  33. Drivers \
  34. Application/User/Src/freertos.c \
  35. Application/User/Src/stm32f4xx_hal_msp.c \
  36. Application/User/Src/stm32f4xx_it.c \
  37. Drivers/STM32F4xx_HAL_Driver \
  38. Application/MAKEFILE \
  39. Application/User/Src/usb_otg.c \
  40. Drivers/CMSIS \
  41. Middlewares \
  42. Application \
  43. Application/User \
  44. Application/User/Src/lwip.c \
  45. Application/User/Src/usart.c \
  46. Application/User/Src/gpio.c \
  47. Middlewares/LwIP \
  48. Application/User/Src/stm32f4xx_hal_timebase_TIM.c \
  49. Application/User/Src \
  50. Application/User/Src/main.c \
  51. Middlewares/FreeRTOS \
  52. Application/User/Src/ethernetif.c
  53.  
  54. # firmware library path
  55. PERIFLIB_PATH =
  56.  
  57. # Build path
  58. BUILD_DIR = build
  59.  
  60. ######################################
  61. # source
  62. ######################################
  63. # C sources
  64. C_SOURCES =  \
  65. Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c \
  66. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \
  67. Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c \
  68. Src/gpio.c \
  69. Src/gpio.c \
  70. Middlewares/Third_Party/LwIP/src/netif/lowpan6.c \
  71. Middlewares/Third_Party/FreeRTOS/Source/tasks.c \
  72. Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.c \
  73. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c \
  74. Middlewares/Third_Party/LwIP/src/core/dns.c \
  75. Middlewares/Third_Party/LwIP/src/core/tcp_in.c \
  76. Middlewares/Third_Party/LwIP/system/OS/sys_arch.c \
  77. Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.c \
  78. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c \
  79. Middlewares/Third_Party/LwIP/src/api/tcpip.c \
  80. Src/usb_otg.c \
  81. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c \
  82. Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.c \
  83. Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.c \
  84. Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c \
  85. Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.c \
  86. Src/stm32f4xx_it.c \
  87. Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.c \
  88. Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.c \
  89. Src/stm32f4xx_hal_msp.c \
  90. Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c \
  91. Middlewares/Third_Party/FreeRTOS/Source/queue.c \
  92. Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c \
  93. Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.c \
  94. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c \
  95. Src/stm32f4xx_hal_msp.c \
  96. Src/usart.c \
  97. Src/system_stm32f4xx.c \
  98. Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.c \
  99. Src/stm32f4xx_hal_timebase_TIM.c \
  100. Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.c \
  101. Src/lwip.c \
  102. Middlewares/Third_Party/LwIP/src/core/def.c \
  103. Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c \
  104. Middlewares/Third_Party/LwIP/src/netif/ppp/demand.c \
  105. Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.c \
  106. Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.c \
  107. Middlewares/Third_Party/LwIP/src/core/ip.c \
  108. Middlewares/Third_Party/LwIP/src/core/mem.c \
  109. Src/freertos.c \
  110. Middlewares/Third_Party/LwIP/src/core/timeouts.c \
  111. Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.c \
  112. Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.c \
  113. Src/main.c \
  114. Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.c \
  115. Middlewares/Third_Party/FreeRTOS/Source/list.c \
  116. Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.c \
  117. Middlewares/Third_Party/FreeRTOS/Source/event_groups.c \
  118. Middlewares/Third_Party/LwIP/src/api/api_lib.c \
  119. Middlewares/Third_Party/LwIP/src/netif/ppp/auth.c \
  120. Middlewares/Third_Party/LwIP/src/core/stats.c \
  121. Middlewares/Third_Party/LwIP/src/api/err.c \
  122. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c \
  123. Middlewares/Third_Party/LwIP/src/netif/ethernet.c \
  124. Src/lwip.c \
  125. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c \
  126. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c \
  127. Middlewares/Third_Party/LwIP/src/core/tcp.c \
  128. Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.c \
  129. Middlewares/Third_Party/LwIP/src/api/netdb.c \
  130. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c \
  131. Src/usart.c \
  132. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c \
  133. Middlewares/Third_Party/LwIP/src/core/sys.c \
  134. Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.c \
  135. Middlewares/Third_Party/LwIP/src/api/api_msg.c \
  136. Middlewares/Third_Party/LwIP/src/core/init.c \
  137. Src/ethernetif.c \
  138. Middlewares/Third_Party/LwIP/src/api/netifapi.c \
  139. Middlewares/Third_Party/LwIP/src/core/memp.c \
  140. Src/ethernetif.c \
  141. Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c \
  142. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c \
  143. Src/usb_otg.c \
  144. Middlewares/Third_Party/LwIP/src/netif/ppp/utils.c \
  145. Middlewares/Third_Party/LwIP/src/api/netbuf.c \
  146. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c \
  147. Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c \
  148. Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c \
  149. Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.c \
  150. Middlewares/Third_Party/LwIP/src/core/inet_chksum.c \
  151. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c \
  152. Src/stm32f4xx_it.c \
  153. Middlewares/Third_Party/LwIP/src/netif/slipif.c \
  154. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c \
  155. Middlewares/Third_Party/LwIP/src/core/tcp_out.c \
  156. Middlewares/Third_Party/LwIP/src/core/udp.c \
  157. Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.c \
  158. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c \
  159. Middlewares/Third_Party/LwIP/src/core/pbuf.c \
  160. Middlewares/Third_Party/LwIP/src/netif/ppp/magic.c \
  161. Middlewares/Third_Party/FreeRTOS/Source/timers.c \
  162. Middlewares/Third_Party/LwIP/src/netif/ppp/upap.c \
  163. Src/freertos.c \
  164. Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.c \
  165. Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.c \
  166. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c \
  167. Src/stm32f4xx_hal_timebase_TIM.c \
  168. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_eth.c \
  169. Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.c \
  170. Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c \
  171. Middlewares/Third_Party/LwIP/src/netif/ppp/eap.c \
  172. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c \
  173. Src/main.c \
  174. Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.c \
  175. Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c \
  176. Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.c \
  177. Middlewares/Third_Party/FreeRTOS/Source/croutine.c \
  178. Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.c \
  179. Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.c \
  180. Middlewares/Third_Party/LwIP/src/core/raw.c \
  181. Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.c \
  182. Middlewares/Third_Party/LwIP/src/api/sockets.c \
  183. Middlewares/Third_Party/LwIP/src/core/netif.c \
  184. Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.c  
  185.  
  186. # ASM sources
  187. ASM_SOURCES =  \
  188. startup_stm32f429xx.s
  189.  
  190.  
  191. ######################################
  192. # firmware library
  193. ######################################
  194. PERIFLIB_SOURCES =
  195.  
  196.  
  197. #######################################
  198. # binaries
  199. #######################################
  200. BINPATH = /usr/local/gcc-arm-none-eabi-5_3-2016q1/bin
  201. PREFIX = arm-none-eabi-
  202. CC = $(BINPATH)/$(PREFIX)gcc
  203. AS = $(BINPATH)/$(PREFIX)gcc -x assembler-with-cpp
  204. CP = $(BINPATH)/$(PREFIX)objcopy
  205. AR = $(BINPATH)/$(PREFIX)ar
  206. SZ = $(BINPATH)/$(PREFIX)size
  207. HEX = $(CP) -O ihex
  208. BIN = $(CP) -O binary -S
  209.  
  210. #######################################
  211. # CFLAGS
  212. #######################################
  213. # cpu
  214. CPU = -mcpu=cortex-m4
  215.  
  216. # fpu
  217. FPU = -mfpu=fpv4-sp-d16
  218.  
  219. # float-abi
  220. FLOAT-ABI = -mfloat-abi=hard
  221.  
  222. # mcu
  223. MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
  224.  
  225. # macros for gcc
  226. # AS defines
  227. AS_DEFS =
  228.  
  229. # C defines
  230. C_DEFS =  \
  231. -DUSE_HAL_DRIVER \
  232. -DSTM32F429xx
  233.  
  234.  
  235. # AS includes
  236. AS_INCLUDES =  \
  237. -IInc
  238.  
  239. # C includes
  240. C_INCLUDES =  \
  241. -IInc \
  242. -IMiddlewares/Third_Party/LwIP/src/include \
  243. -IMiddlewares/Third_Party/LwIP/system \
  244. -IDrivers/STM32F4xx_HAL_Driver/Inc \
  245. -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy \
  246. -IMiddlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F \
  247. -IMiddlewares/Third_Party/LwIP/src/include/netif/ppp \
  248. -IDrivers/CMSIS/Device/ST/STM32F4xx/Include \
  249. -IMiddlewares/Third_Party/FreeRTOS/Source/include \
  250. -IMiddlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS \
  251. -IMiddlewares/Third_Party/LwIP/src/include/lwip \
  252. -IMiddlewares/Third_Party/LwIP/src/include/lwip/apps \
  253. -IMiddlewares/Third_Party/LwIP/src/include/lwip/priv \
  254. -IMiddlewares/Third_Party/LwIP/src/include/lwip/prot \
  255. -IMiddlewares/Third_Party/LwIP/src/include/netif \
  256. -IMiddlewares/Third_Party/LwIP/src/include/posix \
  257. -IMiddlewares/Third_Party/LwIP/src/include/posix/sys \
  258. -IMiddlewares/Third_Party/LwIP/system/arch \
  259. -IDrivers/CMSIS/Include
  260.  
  261.  
  262. # compile gcc flags
  263. ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
  264.  
  265. CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
  266.  
  267. ifeq ($(DEBUG), 1)
  268. CFLAGS += -g -gdwarf-2
  269. endif
  270.  
  271.  
  272. # Generate dependency information
  273. CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
  274.  
  275.  
  276. #######################################
  277. # LDFLAGS
  278. #######################################
  279. # link script
  280. LDSCRIPT = STM32F429ZITx_FLASH.ld
  281.  
  282. # libraries
  283. LIBS = -lc -lm -lnosys
  284. LIBDIR =
  285. LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
  286.  
  287. # default action: build all
  288. all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
  289.  
  290.  
  291. #######################################
  292. # build the application
  293. #######################################
  294. # list of objects
  295. OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
  296. vpath %.c $(sort $(dir $(C_SOURCES)))
  297. # list of ASM program objects
  298. OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
  299. vpath %.s $(sort $(dir $(ASM_SOURCES)))
  300.  
  301. $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
  302.     $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
  303.  
  304. $(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
  305.     $(AS) -c $(CFLAGS) $< -o $@
  306.  
  307. $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
  308.     $(CC) $(OBJECTS) $(LDFLAGS) -o $@
  309.     $(SZ) $@
  310.  
  311. $(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
  312.     $(HEX) $< $@
  313.    
  314. $(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
  315.     $(BIN) $< $@   
  316.    
  317. $(BUILD_DIR):
  318.     mkdir $@       
  319.  
  320. #######################################
  321. # clean up
  322. #######################################
  323. clean:
  324.     -rm -fR .dep $(BUILD_DIR)
  325.  
  326. #######################################
  327. # dependencies
  328. #######################################
  329. -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
  330.  
  331. # *** EOF ***
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement