[問題] Keil C 的 .m51 ,code memery ***GAP***

看板ASM (組合語言)作者 (甘願為妳~)時間16年前 (2008/08/09 21:51), 編輯推噓1(106)
留言7則, 2人參與, 最新討論串1/4 (看更多)
為什麼會產生GAP啊?這樣很浪費空間說?能不能讓他無GAP?? //=================== // *.M51 部分內容 //=================== C:\KEIL\C51\BIN\BL51.EXE .\Obj\F34x_USB_Descriptors.obj, .\Obj\F34x_USB_ISR.obj, .\Obj\F34x_USB_Main.obj, .\Obj\F34x_USB >> _Standard_Requests.obj, .\Obj\F34x_USB_Utilities.obj, .\Obj\STARTUP.obj, .\Obj\ICE.obj, .\Obj\ICE_SNL200_Parallel.obj >> , .\Obj\ICE_SNL200_Spi.obj TO .\Obj\ICE_8051 PRINT (.\LST\ICE_8051.m51) NOLINES, NOSYMBOLS RAMSIZE (256) CODE (?PR?*? >> ICE (0X2000), ?PR?*?ICE_SNL200_PARALLEL, ?PR?*?ICE_SNL200_SPI, ?CO?ICE, ?CO?ICE_SNL200_PARALLEL, ?CO?ICE_SNL200_SPI) TYPE BASE LENGTH RELOCATION SEGMENT NAME CODE 226DH 00E7H INBLOCK ?PR?INITMODULE_SNL200_ CODE 2354H 0007H INBLOCK ?PR?_WR_PARALLEL?ICE_S CODE 235BH 0010H INBLOCK ?PR?RD_PARALLEL?ICE_SN CODE 236BH 003BH INBLOCK ?PR?_CR_SNL200_PARALLE CODE 23A6H 0047H INBLOCK ?PR?_SETCR_SNL200_PARA CODE 23EDH 0046H INBLOCK ?PR?FLASHDELAY_SNL200_ CODE 2433H 0152H INBLOCK ?PR?_MCU_GETREGISTER_S CODE 2585H 00F2H INBLOCK ?PR?_MCU_SETREGISTER_S 2677H 0189H *** GAP *** ==>>這裡有0x189 CODE 2800H 0512H INBLOCK ?PR?MCU_GETREGIOS_SNL2 CODE 2D12H 015CH INBLOCK ?PR?MCU_SETREGIOS_SNL2 CODE 2E6EH 0189H INBLOCK ?PR?_GETONERAM_SNL200_ 2FF7H 0009H *** GAP *** ==>> 0x09 CODE 3000H 0120H INBLOCK ?PR?_SETONERAM_SNL200_ CODE 3120H 00FEH INBLOCK ?PR?MCU_GETPC_SNL200_P CODE 321EH 0030H INBLOCK ?PR?MCU_SETPC_SNL200_P CODE 324EH 003CH INBLOCK ?PR?ICE_FASTWRITE_SNL2 CODE 328AH 0057H INBLOCK ?PR?ICE_FASTREAD_SNL20 CODE 32E1H 005BH INBLOCK ?PR?CPU_RESET_SNL200_P CODE 333CH 0083H INBLOCK ?PR?VERIFYDEVICE_SNL20 33BFH 0441H *** GAP *** ====>>0x441 太多了吧@@ CODE 3800H 054FH INBLOCK ?PR?ICE_DOWNLOAD_SNL20 CODE 3D4FH 0236H INBLOCK ?PR?ICE_ADDBREAKPOINT_ -- ████████████████ █ █████████████ ██████████████ █ ██████████████ ██████████████ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.110.225.153

08/10 12:36, , 1F
有限制 code 的空間嗎?或用 link 檔將 function 定址
08/10 12:36, 1F

08/10 12:37, , 2F
ex. 倒數第二的 ICE_DOWNLOAD_SNL2 似乎是被刻意排在3800H
08/10 12:37, 2F

08/10 12:39, , 3F
而您的 code 尚未填滿記憶體,自然有沒使用到的 GAP。
08/10 12:39, 3F

08/10 15:10, , 4F
CODE( ?PR?*?ICE(0x1200), ICE_SNL200_Parallel,...)
08/10 15:10, 4F

08/10 15:11, , 5F
^^^^^^^^^^^^^==>打錯了 0x2000才對
08/10 15:11, 5F

08/10 15:13, , 6F
如果沒有用?PR?*ICE(0x2000)的話,BL51會很Smart的幫你塞
08/10 15:13, 6F

08/10 15:15, , 7F
塞到剛好,但還是會有GAP, 只是會很少GAP...
08/10 15:15, 7F
※ 編輯: ast9869 來自: 123.110.225.153 (08/10 21:39)
文章代碼(AID): #18dQ3UCu (ASM)
文章代碼(AID): #18dQ3UCu (ASM)