作者ast9869 (甘愿为你~)
看板ASM
标题[问题] Keil C 的 .m51 ,code memery ***GAP***
时间Sat Aug 9 21:51:24 2008
为什麽会产生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
1F:推 zstar:有限制 code 的空间吗?或用 link 档将 function 定址 08/10 12:36
2F:→ zstar:ex. 倒数第二的 ICE_DOWNLOAD_SNL2 似乎是被刻意排在3800H 08/10 12:37
3F:→ zstar:而您的 code 尚未填满记忆体,自然有没使用到的 GAP。 08/10 12:39
4F:→ ast9869:CODE( ?PR?*?ICE(0x1200), ICE_SNL200_Parallel,...) 08/10 15:10
5F:→ ast9869:^^^^^^^^^^^^^==>打错了 0x2000才对 08/10 15:11
6F:→ ast9869:如果没有用?PR?*ICE(0x2000)的话,BL51会很Smart的帮你塞 08/10 15:13
7F:→ ast9869:塞到刚好,但还是会有GAP, 只是会很少GAP... 08/10 15:15
※ 编辑: ast9869 来自: 123.110.225.153 (08/10 21:39)