国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【嵌入式小白的學(xué)習(xí)之路】1.Ubuntu嵌入式開發(fā)-環(huán)境搭建

2023-07-05 20:55 作者:我鯊鯊鯊鯊鯊  | 我要投稿

第一步、安裝GCC


下載GCC 文件https://developer.arm.com/downloads/-/gnu-rm?

1. 解壓GCC tar -xvjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar?

2. 配置環(huán)境變量 sudo gedit /etc/profile?

3. 文檔末尾輸入?


export PATH=\$PATH:/home/tianbot/arm_stm32_study/arm/bin export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/home/tianbot/arm_stm32_study/arm/lib?


1. 應(yīng)用環(huán)境變量 source /etc/profile?

2. 查看是否安裝成功 arm-none-eabi-gcc -v


第二步、安裝openocd


1. 下載xpgk包?https://xpack.github.io/dev-tools/openocd

2. 提取后隨便放在哪個路徑都行,但是要記得放在哪了

3. 運(yùn)行bin下的可執(zhí)行文件openocd,看是否安裝成功

(openocd路徑)/openocd -v?

4. 插入dap-link,看是否能查詢到設(shè)備?

(openocd路徑)/openocd -f interface/cmsis-dap.cfg


第三步、安裝STM32CubeMX


在ST官網(wǎng)下載安裝

生成工程,勾選

Toolchain/IDE設(shè)置為makefile


第四步、配置VScode 并編譯及運(yùn)行工程


1. 打開生成的工程?

2. 安裝擴(kuò)展Cortex Debug?

3.

?
16:49
?
配置Cortex Debug,設(shè)置 setting.json

- 安裝gcc的目錄位置?

"cortex-debug.gdbPath": "/home/tianbot/arm_stm32_study/arm/bin/arm-none-eabi-gdb"

- 安裝openocd的目錄位置?

"cortex-debug.openocdPath.linux": "/usr/bin/openocd"?


4.

?
18:54
?
配置調(diào)試選項,設(shè)置launch.json文件?

"configFiles":[?

"interface/cmsis-dap.cfg",?

"target/stm32f4x.cfg"?

]?



openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg



??

可能出現(xiàn)的問題

問題1:

tianbot@ros2go:~/Desktop/LED_TEST$ arm-none-eabi-gdb -v


arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory


解決方案1:

sudo apt-get install libncurses5-dev


問題2:

?
07:26
?

Experiments with a different CMSIS-DAP show that this is probably a permission issue - openocd does not distinguish between the absence of a CMISIS-DAP programmer vs. lack of permission to access one which is present. The usual solution is to create or install an appropriate udev rule and then restart udev or the system and replug the device.


Permission Deny,基本上只出現(xiàn)在linux上,windows是不會有這個的


這個很明顯是權(quán)限問題。也就是openocd沒有權(quán)限看到、操作調(diào)試器。


解決方法:


打開目錄openocd/contrib,linux:/usr/share/openocd/contrib,將dd-openocd.rules拷貝到/etc/udev/rules.d/下。

sudo cp ./60-openocd.rules /etc/udev/rules.d


解釋一下,該*.rules文件是一系列設(shè)備描述和權(quán)限配置的文件。官方已經(jīng)給配好調(diào)試器的權(quán)限。只需要把這個文件放進(jìn)udev的rules.d目錄下,令其生效即可。有些時候,需要把調(diào)試器重新插上去,按照新規(guī)則進(jìn)行掛載。




??


【嵌入式小白的學(xué)習(xí)之路】1.Ubuntu嵌入式開發(fā)-環(huán)境搭建的評論 (共 條)

分享到微博請遵守國家法律
永修县| 芒康县| 石家庄市| 都安| 沈阳市| 闸北区| 理塘县| 望奎县| 枝江市| 定日县| 延庆县| 灵台县| 娄底市| 新龙县| 改则县| 津南区| 长顺县| 莱西市| 郴州市| 呼伦贝尔市| 平湖市| 宣城市| 二连浩特市| 金平| 兴国县| 金溪县| 余江县| 铜鼓县| 大方县| 沙坪坝区| 保山市| 犍为县| 金堂县| 东丰县| 天全县| 玉田县| 夏津县| 会东县| 基隆市| 杭锦后旗| 定陶县|