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

論壇索引


Board index » All Posts (fishinsea)




Re: 如何定住 .cinit 的位址?
#1
新會員
新會員


我找到方法修改了~改 .lkr 檔即可,
但是我不曉得要是未來 code 有變動,
這個 .cinit 的 size 會不會增加?
實在不曉得 .cinit 的這兩個 byte 有何用途???

發表於: 2007/10/26 14:27
頂部


如何定住 .cinit 的位址?
#2
新會員
新會員


我打開 .map 檔,發現有個 .cinit 這個 section,
請問怎麼定住他的位址?因為我程式要是多增加一些 code,
.cinit 的位址也會變動,
還有 .cinit 這個 section 到底是哪邊設定的呢?
感激

發表於: 2007/10/24 20:37
頂部


如何限定 startup 的位址??
#3
新會員
新會員


程式大概如上,不曉得為什麼,
_startup 等啟動模組都會跑到 0x1000 之後,
這樣我該怎麼處理阿?

#pragma code high_vector = 0x08
void high_interrupt(void)
{
    
_asm GOTO Timer0_ISR _endasm
}


#pragma code low_vector = 0x18    
void low_interrupt(void)
{
    
_asm GOTO INTP_ISR _endasm
}


main()
{

    
fw_entry();
}


#pragma code _intlow_entry = 0x1000

#pragma interruptlow INTP_ISR
void INTP_ISR(void)
{
        
// ....
}


#pragma code _inthigh_entry = 0x1200
#pragma interrupt Timer0_ISR
void Timer0_ISR(void)
{
        
// ....
}

#pragma code _fw_entry = 0x1400
void fw_entry ()
{
        
// ....
}


如果寫成底下,那 startup 就會跑到 0x1000 以上了,
只是這樣我沒辦法限定 fw_entry 的起始位址。

#pragma code _fw_entry = 0x1000

#pragma interruptlow INTP_ISR
void INTP_ISR(void)
{
        
// ....
}

#pragma interrupt Timer0_ISR
void Timer0_ISR(void)
{
        
// ....
}

void fw_entry ()
{
        
// ....
}

發表於: 2007/5/28 18:55
頂部


求救~寫 flash 的問題
#4
新會員
新會員


我是用 PIC18, 使用 C18 compiler

TBLPTR = Offset;
FSR0 = (unsigned short) &Buf[0];

for(i = 0; i < 64; i++)
{
TABLAT = Buf[i];
_asm TBLWT _endasm
EECON1bits.WREN = 1;
INTCONbits.GIE = 0;
EECON2 = 0x55;
EECON2 = 0xAA;
EECON1bits.WR = 1;
EECON1bits.WREN=0;
INTCONbits.GIE=1;
TBLPTR++;
}

以上是我寫 64 bytes 的資料,
但是寫到 flash 後,後面總是有好幾個 bytes 資料會錯掉,
不知是我程式哪有問題?
另外,有寫 flash 的 sample code 可以參考一下嗎?

發表於: 2007/5/24 13:16
頂部


Re: 請問版大,關於C語言的Bootloader
#5
新會員
新會員


可否版大也傳給我參考一下...
thx

發表於: 2007/5/16 14:32
頂部


如何更新 pic 的 code
#6
新會員
新會員


小弟最近要寫程式可以透過 i2c 去更新 pic,
可是用 C18 產生出來只看有 .hex, .cod 等檔案而已,
不曉得可以產生出 Binary File 嗎?

可以產生的話,可直接拿這 Binary File 來 upgrade 嗎?

或是大家都用什麼方式 upgrade pic 的呀?

謝謝

發表於: 2007/5/16 12:11
頂部






:::

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... ]

教育訓練中心

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