• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users




(1) 2 »


Re: 請問XC8如何MIX C and asm?
#12
管理員
管理員


查看用戶資訊
jlian你好,如果情況允許建議使用C語言開發程式,XC8 Compiler 會將程式編譯為組合語言後自動放置於對應的記憶體位址。
如果需要使用組合語言開發,需確保使用的程式碼符合MCU架構和組譯器的規範,可以參考以下文件或教材:
MPLAB XC8 PIC Assembler User's Guide
MPLAB XC8 PIC Assembler Guide For Embedded Engineers
MPLAB XC8 PIC Assembler Migration Guide
MPLAB XC8 C Compiler User's Guide
CAE空中教室 - PIC1002

發表於: 2022/11/7 13:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#11
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

再增加一些程式後,錯誤又發生了...
放棄,太難搞了!

謝謝.

發表於: 2022/11/7 9:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#10
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

我發現 unsigned char d1; 放的位置很重要!要放在C的變數最上面.
但如放在其他C檔?這樣很麻煩..........不好弄,compiler能修正?

謝謝.

發表於: 2022/11/7 9:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#9
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

1.我增加一些變數後就出現那個錯誤!為何?

2.
Non line specific message::: advisory: (1492) using updated 32-bit floating-point libraries; improved accuracy might increase code size
make[2]: *** [dist/default/production/Test_Mix.X.production.hex] Error 1

謝謝.

發表於: 2022/11/7 8:58
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#8
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

error: (1356) fixup overflow referencing psect bssBANK3 (0x76) into 1 byte at 0x2BC/0x2 -> 0x15E (dist/default/production\30KW-NTC-ACT-TX.X.production.o 79/0x4)

出現這個???

謝謝.

發表於: 2022/11/4 16:59
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#7
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

了解.

謝謝.

發表於: 2022/10/28 11:27
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#6
管理員
管理員


查看用戶資訊
jlian你好,目前測試先前提供的呼叫方式無法在 Baseline Family MCU (PIC16F570) 執行,可以嘗試使用替代的函式呼叫方式,範例如附件:

Attach file:


Link only for registered users

發表於: 2022/10/24 14:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#5
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

我選了C90, 它還是不行耶!
MPLABX = V5.45
XC8 = V2.31
PIC16Fxxx_DFP = 1.2.33
MCU = PIC16F570

可否幫忙測下, 謝謝.

發表於: 2022/10/21 15:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#4
資深會員
資深會員


查看用戶資訊
Dear KevinLu :

我試了你的可以,我自己再建一新的還是不行!
能否幫忙測一下看是哪裡的問題?

謝謝.

Attach file:


Link only for registered users

發表於: 2022/10/18 17:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問XC8如何MIX C and asm?
#3
管理員
管理員


查看用戶資訊
根據jlian的附件,提供在C語言中呼叫組合語言函式的範例,如附件。

Attach file:


Link only for registered users

發表於: 2022/10/17 15:10
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... ]

教育訓練中心

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