最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

增加Vscode引用路徑的解決方法(2種)

 更新時(shí)間:2024年02月03日 16:26:27   作者:JUSTfFUN  
在嵌入式開(kāi)發(fā)中需要經(jīng)常用到庫(kù)函數(shù), Vscode需要配置引用路徑,本文主要介紹了增加Vscode引用路徑的解決方法,具有一定的參考價(jià)值,感興趣的可以了解一下

問(wèn)題說(shuō)明

在嵌入式開(kāi)發(fā)中需要經(jīng)常用到庫(kù)函數(shù)(SPL), Vscode需要配置引用路徑才能對(duì)函數(shù)名或變量進(jìn)行跳轉(zhuǎn)

解決思路1

與Keil5 MDK類似, 在配置C/C++的json文件中添加所使用的頭文件路徑

在Vscode中進(jìn)行配置

在vscode中按Ctrl+Shift+P 輸入configuration, 如圖選擇C/C++編程配置(json)

Vscode配置

在"includePath"后面增加所要使用的頭文件的路徑, 如下圖所示

Vscode配置

缺點(diǎn)

配置起來(lái)較為繁瑣, 且部分函數(shù)依然無(wú)法跳轉(zhuǎn)

解決思路2

在思路1的基礎(chǔ)上, 向編寫的文件中包含"stm32f10x_conf.h文件"

#include "stm32f10x_conf.h"

在stm32f10x_conf文件中有對(duì)于所有外設(shè)頭文件的包含

/* Includes ------------------------------------------------------------------*/
/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
#include "stm32f10x_adc.h"
#include "stm32f10x_bkp.h"
#include "stm32f10x_can.h"
#include "stm32f10x_cec.h"
#include "stm32f10x_crc.h"
#include "stm32f10x_dac.h"
#include "stm32f10x_dbgmcu.h"
#include "stm32f10x_dma.h"
#include "stm32f10x_exti.h"
#include "stm32f10x_flash.h"
#include "stm32f10x_fsmc.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_i2c.h"
#include "stm32f10x_iwdg.h"
#include "stm32f10x_pwr.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_rtc.h"
#include "stm32f10x_sdio.h"
#include "stm32f10x_spi.h"
#include "stm32f10x_tim.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_wwdg.h"
#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */

所以在思路1的基礎(chǔ)上加上思路2可以較好的解決該問(wèn)題

到此這篇關(guān)于增加Vscode引用路徑的解決方法(2種)的文章就介紹到這了,更多相關(guān)增加Vscode引用路徑內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論

河北省| 陕西省| 长汀县| 囊谦县| 兴义市| 拉萨市| 河南省| 原阳县| 新竹县| 林甸县| 容城县| 莲花县| 临夏市| 马龙县| 宜阳县| 嘉祥县| 瑞金市| 宁阳县| 高碑店市| 晋宁县| 自治县| 江阴市| 赤水市| 札达县| 辽中县| 哈尔滨市| 乐昌市| 梅州市| 南丹县| 裕民县| 雷波县| 丽江市| 新宾| 长武县| 正安县| 新建县| 疏附县| 泗洪县| 咸宁市| 抚宁县| 阿巴嘎旗|