最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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)境搭建的評論 (共 條)

分享到微博請遵守國家法律
鄄城县| 栾城县| 乌拉特后旗| 二连浩特市| 封丘县| 綦江县| 永嘉县| 香港| 平陆县| 海口市| 浮山县| 敦化市| 平泉县| 晋江市| 嘉定区| 齐齐哈尔市| 浠水县| 南靖县| 屯留县| 吕梁市| 临汾市| 仙居县| 青铜峡市| 多伦县| 怀来县| 绵阳市| 平阴县| 广河县| 新泰市| 南皮县| 太和县| 河北省| 奉化市| 龙陵县| 闽清县| 温宿县| 内黄县| 林州市| 肥城市| 华池县| 辽宁省|