嵌入式开发环境
安装java环境
https://www.java.com/zh-CN/download/
STM32 软件下载
STM32CubeIDE
https://www.st.com/zh/development-tools/stm32cubeide.html
MDK下载安装
MDK库更新
https://www.keil.com/dd2/Pack/#/eula-container
eclipse编译环境配置
https://eclipse-embed-cdt.github.io/
//环境变量中,填写这些
C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\bin;
C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.win32_1.4.0.202007081208\tools\bin;
C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.win32_1.4.0.202007081208\tools\bin;
C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.ide_1.4.0.202007081208\resources\project_importer\windows;
C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\jre\bin;C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\jre\lib;
STM32 ST-LINK Utility
https://www.st.com/zh/development-tools/stsw-link004.html
下载到开发板配置
Run->External Tools -> External Tool Configurations (打开)
"C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe" -P C:\STM32CubeMx_workspace\test\test.hex -V -Rst
Variable references empty selection: ${project_loc}的解决办法
在navigator或package explorer中先选中工程,然后再clean
编译
10:33:15 **** Incremental Build of configuration Default for test ****
make all
Linking test
Generating bin file
text data bss dec hex filename
665812 2928 20333360 21002100 1407774 C:/STM32CubeMx_workspace/test/test.elf
Generating list file
10:33:20 Build Finished. 0 errors, 0 warnings. (took 5s.389ms)