Re: HITECH C如何將某副程式固定在0x1e00的位址開始編輯
|
||||
---|---|---|---|---|
中級會員
|
真的沒有PIC16使用HI_TECH C的高手知道嗎?
發表於: 2010/2/9 12:48
|
|||
|
Re: HITECH C如何將某副程式固定在0x1e00的位址開始編輯
|
||||
---|---|---|---|---|
中級會員
|
picc -16f877 bootldr.c -o -zg -DVERBOSE=2 -A1ED0h
這句我要在MPLAB的哪邊設定呢?
發表於: 2010/2/5 8:16
|
|||
|
Re: HITECH C如何將某副程式固定在0x1e00的位址開始編輯
|
||||
---|---|---|---|---|
版主
|
看一下 Hi-Tech PICC PIC16F877A bootloader 裡的 Bootldr.txt 裡面的說明。
Microchip PIC16F87x(A) memory map with the bootloader installed
Attach file: Link only for registered users
發表於: 2010/2/4 15:28
|
|||
|
Re: HITECH C如何將某副程式固定在0x1e00的位址開始編輯
|
||||
---|---|---|---|---|
中級會員
|
剛剛試了一下,也不對
PCL equ 02h PCLATH equ 0Ah 只是要定義這個特殊功能暫存器名稱在哪個位址上 而下面那幾行只差在ORG 00H~03H的程是跟之前的不太一樣而已
發表於: 2010/2/4 11:43
|
|||
|
Re: HITECH C如何將某副程式固定在0x1e00的位址開始編輯
|
||||
---|---|---|---|---|
中級會員
|
好像不行,這寫法好像是PIC C18的寫法
我有下載HITECH C Bootloader的資料,裡面有寫到 #asm ; Reset vector redirection ; some equates for accessing the program counter PCL equ 02h PCLATH equ 0Ah psect redirect,abs,class=CODE,delta=2 ;absolute psect so it goes ;to address zero ;The boot loader code has been written so that it doesn't need any ;variable initialization runtime startup code. ;Because of this, we can jump directly into the main() function. global _main movlw _main >> 8 ;A "long" jump to main - this will cope with movwf PCLATH ;main being positioned anywhere movlw _main & 0xFF movwf PCL #endasm 不知道這是否是將主程式main定義在0xa02這個位址開始編輯的意思
發表於: 2010/2/4 10:57
|
|||
|
Re: HITECH C如何將某副程式固定在0x1e00的位址開始編輯
|
||||
---|---|---|---|---|
資深會員
|
參照:
#pragma code "subrutine" = addr void subrutine(void) {} 試試看
發表於: 2010/2/4 10:39
|
|||
My name is jan,Jan是棒的
|
||||
|
HITECH C如何將某副程式固定在0x1e00的位址開始編輯(設定程式的起始執行位址)
|
||||
---|---|---|---|---|
中級會員
|
以前在寫51及義隆組的合語言的時候只要設定ORG 1E00H即可
現在我的程式已經全部OK了,準備要開始寫Bootloader的功能,所以想要把該副程式設定在0x1e00以後,但我試了很多方式還是無法改變副程式的位址?不知道是否要使用特殊的方式才能達到這個功能
發表於: 2010/2/4 10:19
Edited by Ryang on 2010年03月25日 10:16:55
|
|||
|