• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: MPLAB X IDE include問題
#9
管理員
管理員


查看用戶資訊
如果更改編碼可以解決時, 也是蠻不錯的好方法
通常編碼是為了在程式中添加雙位元文字(中文,日文等)時會用到,
比方添加中文註解, 但這個問題根本上還是X IDE的parser未完善導致,

剛剛測試了一下, 我使用MPLAB X IDE v5.40去開同一個專案時,
發現v5.40的parser結果可以解決我在v5.35出現的
"Unable to resolve identifier" 提示,
Ctrl+\ 也可以正確找到定義的位置

MPLAB X IDE v5.40開始, 只支援Windows 64bits 版本,
如果你的Windows還是32bit版本時請勿安裝喔!

發表於: 2020/5/28 8:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#8
資深會員
資深會員


查看用戶資訊
我也是常常出現一堆紅色黃色波浪
後來我是改專案的編碼
就正常了。

不知道對你的專案有沒有用
可以試試看。

Attach file:



jpg  (0.00 KB)


發表於: 2020/5/27 16:33
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#7
初級會員
初級會員


查看用戶資訊
Hi energy0364

我是用MCC沒錯,
試著了解它產生的程式架構,
初步是覺得還蠻好用的,
自動生成了很多東西可以用。

Hi Libra

我使用你提供的方法,
確實是把問題燈泡消失,
但感覺這只是關掉錯誤提示,
根本問題還在
我使用ctrl+Mouse L要進入下列的.h(之前有燈泡提示的地方)
是無法跳出顯示連結的檔案視窗,
雖然燈泡不見了,
MPLAB X IDE還是找不到連結點,

不知道還有沒有其它根本的解決方法可以提供?
感謝~!

#include <xc.h>
#include <stdint.h>
#include <stdbool.h>
#include <conio.h>

發表於: 2020/5/26 10:43
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#6
管理員
管理員


查看用戶資訊
MPLAB X IDE code parser會嘗試尋找程式代碼中的定義或是宣告, 來警告USER可能遺漏的地方, 因此有燈泡這樣的提示, 但是MCU家族越來越多, X IDE裡面Gen code的重複參照及先後繼承關係變複雜了, 因此導致Code Parser無法正確找到引用的.h檔頭或是宣告定義, 但是編譯器會正常的編譯沒有問題, 這只是程式代碼的Parser錯誤並非程式有誤, 如果覺得這樣的提示有困擾, 可以在Tool中的設定將之選擇性的關閉
縮圖


如果是自己定義的宣告也出現警告時, 可以嘗試重新parser看看可否找到
在專案上按右鍵, 依下圖選擇
縮圖

Attach file:



jpg  (0.00 KB)


jpg  (0.00 KB)


發表於: 2020/5/26 9:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#5
中級會員
中級會員


查看用戶資訊
你這個專案應該是MCC生成的吧?
照理來說main應該會有#include "mcc_generated_files/mcc.h"???

然後mcc.h裡面才會有你include進來的檔案
還有你有使用的模組 ex: tmr0...

#include <xc.h>
#include "device_config.h"
#include "pin_manager.h"
#include <stdint.h>
#include <stdbool.h>
#include "tmr0.h"

我不太確定是否是這個原因造成,
也不太確定你已經用mcc了怎麼還需要include這些檔案,
mcc我只用過少數幾次,
基本上都是一些很簡單的MCU,
從以前自己寫底層到現在MCC,
還是覺得MCC常常會把Code塞得很亂...

發表於: 2020/5/26 8:58
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#4
初級會員
初級會員


查看用戶資訊
Hi energy0364

我試了LED8-LR專案點右鍵->
Code Assistance->
Reparse Project
畫面上的燈泡是存在...@@


Hi Ryang

include的xxx.h我都知道在哪
也正確的被引用了
問題是,
MPLAB X IDE畫面會出現問題提示,

這會造成我寫code的疑惑,
明明對的語法卻顯示錯誤,
編譯也可過,
燒錄執行又沒問題。

這......
MPLAB X IDE畫面會出現讓人疑惑的問題提示,
該如何導正?

發表於: 2020/5/25 15:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#3
版主
版主


查看用戶資訊
感謝 energy0364 的協助。
點選 重新分析專案 後就可以找到此 h 檔的位置。

#include <xxxxx> 使用< > 的括符是說使用內定的路徑 ..\xc8\v2.05\pic\include\c99 下。

發表於: 2020/5/25 14:45
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: MPLAB X IDE include問題
#2
中級會員
中級會員


查看用戶資訊
試試看LED8-LR專案點右鍵->
Code Assistance->
Reparse Project

發表於: 2020/5/25 14:09
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


MPLAB X IDE include問題
#1
初級會員
初級會員


查看用戶資訊
請問一下,
如下圖MPLAB X IDE會出現問題提示,
但我卻可以編譯完成及燒錄到實驗板上,成功執行。
這錯誤問題提示是設定上哪裡要設定呢?
還是其它方法沒注意到的
這個要如何改善?
請賜教~!

Attach file:



jpg  (0.00 KB)


發表於: 2020/5/25 13:56
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------