-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
74 additions
and
16 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# 环境搭建 | ||
|
||
> 笔者使用 **STM32CubeMX + CLion** 的开发方式, | ||
> 当然文后会介绍使用 **Keil** 和 **VSCode** 的方式 | ||
## 1. 使用CLion开发( 优雅の嵌入式开发 ) | ||
|
||
### 1.0 前言 | ||
|
||
做嵌入式开发的人对STM32这个平台应该都是非常熟悉的, | ||
多数人在开发STM32的时候用的都是 **Keil** 这个老牌IDE, | ||
很大一部分原因是因为大多数人最初是从51单片机学习过来的, | ||
51就是基于Keil去开发的,然后迁移到STM32的时候也就沿用下来了。 | ||
|
||
![Keil开发环境界面](/images/项目/嵌入式/Keil界面图.png) | ||
|
||
Keil操作简单,容易上手,而且可以很方便地进行调试。 | ||
但是对于以前不是做嵌入式开发的软件开发人员来说, | ||
面对Keil这种上世纪风格的IDE(不只是UI)肯定是不太有好感的。 | ||
我在尝试过STM32CubeIDE和RT-Thread Studio等用Eclipse修改的IDE之后, | ||
也确实觉得而今这些专业的嵌入式IDE没有那种,额,未来感, | ||
|
||
### 1.1 工具安装 | ||
|
||
1. [ **STM32CubeMX** ](https://www.st.com/en/development-tools/stm32cubemx.html) | ||
|
||
ST官方出的一款针对ST的MCU/MPU跨平台的图形化工具, | ||
支持在Linux、MacOS、Window系统下开发,其对接的底层接口是HAL库, | ||
另外习惯于寄存器开发的同学们,也可以使用LL库。STM32CubeMX除了集成MCU/MPU的硬件抽象层, | ||
另外还集成了像RTOS,文件系统,USB,网络,显示,嵌入式AI等中间件,这样开发者就能够很轻松的完成MCU/MPU的底层驱动的配置, | ||
留出更多精力开发上层功能逻辑,能够更进一步提高了嵌入式开发效率。 | ||
|
||
2. [ **OpenOCD** ](https://github.com/xpack-dev-tools/openocd-xpack/releases) | ||
|
||
openocd全名叫做Open On-Chip Debugger,是一个自由开放的片上调试工具和编程工具, | ||
目前已经发布到0.11.0版本,目前主流调试器几乎都支持。 | ||
安装好之后,添加环境变量: | ||
![OpenOCD环境变量](/images/项目/嵌入式/OpenOCD环境变量图.png) | ||
3. MinGW | ||
|
||
Clion需要使用MinGW环境来配置工具链,安装方法见 [MinGW]() | ||
|
||
安装好之后,添加到环境变量: | ||
![MinGW环境变量](/images/项目/嵌入式/MinGW环境变量图.png) | ||
|
||
在终端输入,进行测试: | ||
```shell | ||
gcc -v | ||
``` | ||
如果有信息输出如下,那就是装好了。 | ||
![MinGW检查](/images/项目/嵌入式/MinGW检查图.png) | ||
|
||
4. [ **arm-none-eabi-gcc** ](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads) | ||
|
||
安装好后,添加到环境变量: | ||
![GNU-arm-none-eabi环境变量](/images/项目/嵌入式/GNU-arm-none-eabi环境变量图.png) | ||
|
||
在终端输入,进行测试: | ||
```shell | ||
arm-none-eabi-gcc -v | ||
``` | ||
如果有信息输出如下,那就是装好了。 | ||
![GNU-arm-none-eabi检查](/images/项目/嵌入式/GNU-arm-none-eabi检查图.png) | ||
|
||
|
Empty file.