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

論壇索引


Board index » All Posts (w9190040)




關於mplab 使用 startup.as 做 reset 動作流程
#1
新會員
新會員


目前我使用Mplab中選項 keep generated startup.as 生成後,按照Hi-Tech PICC v2.0.pdf 教學文件的第131頁,去修改 startup.as。在取消keep generated startup.as 。在編譯,去查看Program Memory 並沒有把startup.as載入進去 。不知道是否要勾選甚麼選項才會載入。

目前我把 mystartup() 放在main.c裡面
void mystartup( void )
{
PORTC = 0x00;
TRISC = 0x00;
#asm
clrf _STATUS
clrf _PORTB
bsf _STATUS,5
clrf _TRISB
movlw high start
movwf _PCLATH
goto ( start & 0x7FF )
#endasm
}

然後修改的startup.as 內容為
.....
.....
extern mystartup

psect reset_vec
reset_vec:
; No powerup routine
;global start

; jump to start
;goto start & 0x7FF | (reset_vec & not 0x7FF)

goto (mystartup & 0x7FF)


psect init
start
_exit
psect end_init
global start_initialization
.....
.....

我有嘗試把 startup.as 放入到 soruec中更著一起編譯但出現了********** Build failed! ********** 沒有任何提示哪裡錯誤

請哪位有用過的大大幫幫我,目前成是都完成了 只差這個還搞不定 跪求了

發表於: 2020/5/7 12:18
頂部


Re: 關於16系列 C語言 Compiler的問題
新會員
新會員



發表於: 2011/8/3 17:46
頂部



(1) 2 »



:::

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

教育訓練中心

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