编译STM32F4 Mac

时间:2013-08-23 05:51:45

标签: macos gcc stm32f4discovery

美好的一天,

我刚买了一台STm32F4,并且能够加载位于里面的示例.hex文件: https://github.com/mechoid9/STM32F4

我已按照此网站的说明操作: http://jeremyherbert.net/get/stm32f4_getting_started

它解释了如何编码,但未能说明如何执行makefile。我跑了它,它给了我一大堆错误:

 SRCS: command not found
 SRCS: command not found
 CFLAGS: command not found
 CFLAGS: command not found

makefile如下所示:

# put your *.o targets here, make should handle the rest!

SRCS = main.c system_stm32f4xx.c
SRCS += lib/startup_stm32f4xx.s # add startup file to build
# all the files will be generated with this name (main.elf, main.bin, main.hex, etc)

PROJ_NAME=main

more code goes..

我甚至不确定如何执行它来构建我的hex文件等。

1 个答案:

答案 0 :(得分:1)

Jeremy Herbert的网站和其他博客在开始STM32F4开发时帮助了很多人 - 包括我在内。但是他们中的大多数人都认为你很熟悉GNR Make。至少在初学者阶段。

如果我在答案中假设您还不熟悉makefile,我道歉,但如果是这样的话答案非常简单:只需在Makefile所在的同一目录中使用命令'make'。

我强烈建议您习惯阅读makefile,因为Web中有许多有用的资源需要您定制makefile。值得花时间投资。

TL; DR:make

相关问题