最新国产好看的视频,伊人天堂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)論

寻甸| 阿勒泰市| 嫩江县| 太仆寺旗| 屏边| 长丰县| 临邑县| 衡阳县| 六盘水市| 泽州县| 晋城| 神池县| 翁牛特旗| 长宁区| 黑龙江省| 云霄县| 滕州市| 叶城县| 轮台县| 崇左市| 嘉祥县| 明光市| 阿尔山市| 阜康市| 丽江市| 于田县| 松潘县| 武夷山市| 德兴市| 凉山| 南充市| 宁津县| 台南市| 昌邑市| 黄平县| 双辽市| 清水河县| 武功县| 鹤壁市| 伽师县| 乾安县|