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


Browsing this Thread:   1 Anonymous Users






Re: 關於 CCS 製作LIBRARY
#9
資深會員
資深會員


查看用戶資訊
1. CCS v4 才有 Linker, 才能做 Library

2. CCS v3 沒有 Linker, 不能做 Library

3. CCS v3.225 以後的版本有加密的功能, 可以滿足你的需求

例 要將 my_function.c 加密, 就編輯 my_function.c , 然後,
點擊 File -> Encrypt 就會產生 my_function.c.encrypted 這個新檔案, 然後 就把這加密後的檔案給客戶用就好啦

#include "my_function.c.encrypted"

my_function.c 裡面再加上 #nolist 則在 LST 檔案裡面就連編出來的組語也都看不到啦

發表於: 2006/12/16 13:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#8
版主
版主


查看用戶資訊
回答第二個問題:
我都用一個 *.h 檔來宣告,到時只要改 h 檔裡宣告就可以了

發表於: 2006/12/15 17:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#7
高級會員
高級會員


查看用戶資訊
看到這主題之後也自已試著把一些function 做成 obj檔來用,但是遇到一些問題特來請教。

一、假如我在obj裡面有一個列舉陣列為,那如何在main.c 宣告呢?
typedef enum 
{
    
sdcValid=0,                 
    
sdcCardInitCommFailure,     
    
sdcCardNotInitFailure,      
    
sdcCardInitTimeout,         
    
sdcCardTypeInvalid,         
    
sdcCardBadCmd,              
    
sdcCardTimeout,                
    
sdcCardCRCError,            
    
sdcCardDataRejected,         
    
sdcEraseTimedOut             
}SDC_Error;



二、假設我的obj 檔會利用SCK 這根腳做事情,但是我希望SCK由main.c 來宣告給obj 檔使用,也就是SCK能隨使用者高興定義不同的腳位,但是都命名為SCK來給obj 裡面的函式使用。

請前輩指點解惑,謝謝。

發表於: 2006/12/15 9:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#6
版主
版主


查看用戶資訊
C 底下要在宣告該變數為 extern unsign char ABC; 而對方衣錠要將此變數宣告成 global 變數。(在 main( ) 外面宣告)

有關此用法 C 與組合語言不盡相同,請參考 W401 workshop 教材的第七章說明 (C call Assembly)

發表於: 2006/12/13 13:36
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#5
初級會員
初級會員


查看用戶資訊
那請問我CALL 該obj檔的 c檔中, 需要做include, 或是宣告extern之類的動作嗎?
thanx!

發表於: 2006/12/13 13:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#4
版主
版主


查看用戶資訊
CCS 沒有試過,但 MPLAB IDE+ C18 的話只要在 Project 視窗 (*.mcp) 下將OBJ檔案加到 Library Files 的項目裡就可以了。

發表於: 2006/12/13 10:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#3
初級會員
初級會員


查看用戶資訊
Thanks, 我已經將obj檔產出了,請問在MPLAB環境下,使用該obj的專案要如何將obj檔include進來,小弟是以CCS做COMPILER,請問該如何設定build option或是其他設定?

發表於: 2006/12/12 18:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於製作LIBRARY
#2
版主
版主


查看用戶資訊
最簡單的是轉成.o (obj) 檔案就可以了,MPLINK 可以將 obj 連結進來。
lib 的檔案也只是將眾多的 obj 檔案變成一個 lib 而已。你用 MPLIB 在 DOS 模式下去看 lib 的內容就知道了。

發表於: 2006/12/8 17:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


關於製作LIBRARY
#1
初級會員
初級會員


查看用戶資訊
請教各位前輩,小弟寫了一個程式想轉成library的方想讓客戶使用,但不知道從何著手,查了一下資料,發現有兩種方法: 用mplib轉成lib檔讓客戶用, 或是以rellocatable code讓客戶使用,但我找不到更進一步的教學資料可供參考,也不知道做成之後客戶要如何include,我的目的就是不讓library的source code不會曝光而客戶也能用就對了, 請前輩指教! thanx!

發表於: 2006/12/8 12:12
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... ]

教育訓練中心

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