首先,建立两个文件夹,如图:
分别将C51和MDK装到相应盘里,MDK破解,C51不用破解
将C51目录下的如下文件夹复制到MDK相应文件夹里,同名跳过。
将C51中的TOOLS.INI打开将C51以下的代码复制到MDK里的TOOLS.INI的末尾,并把路径改成和MDK路径一样(改的时候记事本打开就好),大功告成!这时候就可以卸载C51了,想建C51程序了,在选PACK那里有51的包的。
注意事项:不要用中文目录和空格!复制C51到MDK末尾的时候不要加回车。
改完的TOOLS.INI效果如下,注意断行前后的文字。
[UV2]
ORGANIZATION="lishigongsi"
NAME="li", "xiaolong "
EMAIL="11111111111"
ARMSEL=1
USERTE=1
TOOL_VARIANT=mdk_std
RTEPATH="G:\keil MDK\ARM\PACK"
[ARM]
PATH="G:\keil MDK\ARM\"
VERSION=5.24a
PATH1="C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q1-update\"
TOOLPREFIX=arm-none-eabi-
CPUDLL0=SARM.DLL(TDRV16,TDRV17,TDRV18) # Drivers for ARM7/9 devices
CPUDLL1=SARMCM3.DLL(TDRV0,TDRV1,TDRV2,TDRV3,TDRV4,TDRV5,TDRV6,TDRV7,TDRV8,TDRV9,TDRV10,TDRV11) # Drivers for Cortex-M devices
CPUDLL2=SARMCR4.DLL(TDRV3) # Drivers for Cortex-R4 devices
CPUDLL3=SARMV8M.DLL(TDRV3,TDRV12,TDRV13,TDRV14,TDRV15) # Drivers for ARMv8-M devices
BOOK0=HLP\RELEASE_NOTES.HTM("Release Notes",GEN)
BOOK1=HLP\ARMTOOLS.chm("Complete User's Guide Selection",C)
BOOK2=http://infocenter.arm.com/help/topic/com.arm.doc.dui0837g/index.html("Fixed Virtual Platforms Reference Guide",GEN)
TDRV0=BIN\UL2CM3.DLL("ULINK2/ME Cortex Debugger")
TDRV1=BIN\ULP2CM3.DLL("ULINK Pro Cortex Debugger")
TDRV2=BIN\CMSIS_AGDI.dll("CMSIS-DAP Debugger")
TDRV3=Segger\JL2CM3.dll("J-LINK / J-TRACE Cortex")
TDRV4=BIN\DbgFM.DLL("Models Cortex-M Debugger")
TDRV5=STLink\ST-LINKIII-KEIL_SWO.dll ("ST-Link Debugger")
TDRV6=PEMicro\Pemicro_ArmCortexInterface.dll("PEMicro Debugger")
TDRV7=NULink\Nu_Link.dll("NULink Debugger")
TDRV8=BIN\lmidk-agdi.dll("Stellaris ICDI")
TDRV9=SiLabs\SLAB_CM_Keil.dll("SiLabs UDA Debugger")
TDRV10=BIN\ABLSTCM.dll("Altera Blaster Cortex Debugger")
TDRV11=TI_XDS\XDS2CM3.dll("TI XDS Debugger")
TDRV12=BIN\ULP2V8M.DLL("ULINK Pro ARMv8-M Debugger")
TDRV13=BIN\UL2V8M.DLL("ULINK2/ME ARMv8-M Debugger")
TDRV14=BIN\CMSIS_AGDI_V8M.DLL("CMSIS-DAP ARMv8-M Debugger")
TDRV15=BIN\DbgFMv8M.DLL("Models ARMv8-M Debugger")
TDRV16=BIN\UL2ARM.DLL("ULINK2/ME ARM Debugger")
TDRV17=BIN\ULP2ARM.DLL("ULINK Pro ARM Debugger")
TDRV18=Segger\JLTAgdi.dll("J-LINK / J-TRACE ARM")
LIC0=76FUH-WLTX9-5TB3W-Q3RNT-X3RTS-SJMY3
[ARMADS]
PATH="G:\keil MDK\ARM\"
PATH1=".\ARMCC\bin\"
DEFAULT_ARMCC_VERSION_CM0="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_CM0P="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_CM23="Unspecified: use latest compiler version 6"
DEFAULT_ARMCC_VERSION_CM3="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_CM33="Unspecified: use latest compiler version 6"
DEFAULT_ARMCC_VERSION_CM4="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_CM7="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_SC000="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_SC300="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_ARM7="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_ARM9="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_CR4="Unspecified: use latest compiler version 5"
DEFAULT_ARMCC_VERSION_OTHER="Unspecified: use latest compiler version 6"
CPUDLL0=SARM.DLL(TDRV16,TDRV17,TDRV18) # Drivers for ARM7/9 devices
CPUDLL1=SARMCM3.DLL(TDRV0,TDRV1,TDRV2,TDRV3,TDRV4,TDRV5,TDRV6,TDRV7,TDRV8,TDRV9,TDRV10,TDRV11) # Drivers for Cortex-M devices
CPUDLL2=SARMCR4.DLL(TDRV3) # Drivers for Cortex-R4 devices
CPUDLL3=SARMV8M.DLL(TDRV3,TDRV12,TDRV13,TDRV14,TDRV15) # Drivers for ARMv8-M devices
BOOK0=HLP\mdk5-getting-started.pdf("MDK-ARM Getting Started (PDF)",GEN)
BOOK1=HLP\mdk5-getting-started_jp.pdf("MDK-ARM Getting Started (Japanese/PDF)",GEN)
BOOK2=HLP\RELEASE_NOTES.HTM("Release Notes",GEN)
BOOK3=HLP\ARMTOOLS.chm("Complete User's Guide Selection",C)
BOOK4=ARMCC\sw\info\releasenotes.html("Release Notes for ARMCC 5.06u5",GEN)
BOOK5=ARMCLANG\sw\info\releasenotes.html("Release Notes for ARMCLANG 6.7",GEN)
BOOK6=HLP\DUI0592E_02_mdk_getting_started_guide.pdf("ARM Compiler Getting Started Guide v5.06 for 礦ision (PDF)",GEN)
BOOK7=HLP\DUI0375G_02_mdk_armcc_user_guide.pdf("ARM Compiler v5.06 for 礦ision (PDF)",GEN)
BOOK8=HLP\DUI0377G_02_mdk_armlink_user_guide.pdf("ARM Linker v5.06 for 礦ision (PDF)",GEN)
BOOK9=HLP\DUI0378G_02_mdk_libraries_user_guide.pdf("ARM Libraries and Floating Point Support Guide v5.06 for 礦ision (PDF)",GEN)
BOOK10=HLP\DUI0379G_02_mdk_armasm_user_guide.pdf("ARM Assembler User Guide v5.06 for 礦ision (PDF)",GEN)
BOOK11=HLP\DUI0459F_02_mdk_fromelf_user_guide.pdf("Using the fromelf Image Converter v5.06 for 礦ision (PDF)",GEN)
BOOK12=HLP\DUI0590E_02_mdk_armar_user_guide.pdf("Creating Static Software Libraries with armar v5.06 for 礦ision (PDF)",GEN)
BOOK13=HLP\DUI0591E_02_mdk_errors_and_warnings_reference_guide.pdf("ARM Compiler Error and Warnings Reference Guide v5.06 for 礦ision (PDF)",GEN)
BOOK14=HLP\DUI0593E_02_mdk_migration_compatibility_guide.pdf("ARM Migration and Compatibility Guide v5.06 for 礦ision (PDF)",GEN)
BOOK15=http://infocenter.arm.com/help/topic/com.arm.doc.dui0837g/index.html("Fixed Virtual Platforms Reference Guide",GEN)
TDRV0=BIN\UL2CM3.DLL("ULINK2/ME Cortex Debugger")
TDRV1=BIN\ULP2CM3.DLL("ULINK Pro Cortex Debugger")
TDRV2=BIN\CMSIS_AGDI.dll("CMSIS-DAP Debugger")
TDRV3=Segger\JL2CM3.dll("J-LINK / J-TRACE Cortex")
TDRV4=BIN\DbgFM.DLL("Models Cortex-M Debugger")
TDRV5=STLink\ST-LINKIII-KEIL_SWO.dll ("ST-Link Debugger")
TDRV6=PEMicro\Pemicro_ArmCortexInterface.dll("PEMicro Debugger")
TDRV7=NULink\Nu_Link.dll("NULink Debugger")
TDRV8=BIN\lmidk-agdi.dll("Stellaris ICDI")
TDRV9=SiLabs\SLAB_CM_Keil.dll("SiLabs UDA Debugger")
TDRV10=BIN\ABLSTCM.dll("Altera Blaster Cortex Debugger")
TDRV11=TI_XDS\XDS2CM3.dll("TI XDS Debugger")
TDRV12=BIN\ULP2V8M.DLL("ULINK Pro ARMv8-M Debugger")
TDRV13=BIN\UL2V8M.DLL("ULINK2/ME ARMv8-M Debugger")
TDRV14=BIN\CMSIS_AGDI_V8M.DLL("CMSIS-DAP ARMv8-M Debugger")
TDRV15=BIN\DbgFMv8M.DLL("Models ARMv8-M Debugger")
TDRV16=BIN\UL2ARM.DLL("ULINK2/ME ARM Debugger")
TDRV17=BIN\ULP2ARM.DLL("ULINK Pro ARM Debugger")
TDRV18=Segger\JLTAgdi.dll("J-LINK / J-TRACE ARM")
RTOS0=Dummy.DLL("Dummy")
RTOS1=VARTXARM.DLL ("RTX Kernel")
ARMCCPATH0="ARMCC" ("5.06 update 4 (build 528)")
ARMCCPATH1=".\ARMCLANG" ("V6.7")
[C51]
PATH="G:\Keil MDK\C51\"
VERSION=V9.02a
BOOK0=HLP\Release_Notes.htm("Release Notes",GEN)
BOOK1=HLP\C51TOOLS.chm("Complete User's Guide Selection",C)
TDRV0=BIN\MON51.DLL ("Keil Monitor-51 Driver")
TDRV1=BIN\ISD51.DLL ("Keil ISD51 In-System Debugger")
TDRV2=BIN\MON390.DLL ("MON390: Dallas Contiguous Mode")
TDRV3=BIN\LPC2EMP.DLL ("LPC900 EPM Emulator/Programmer")
TDRV4=BIN\UL2UPSD.DLL ("ST-uPSD ULINK Driver")
TDRV5=BIN\UL2XC800.DLL ("Infineon XC800 ULINK Driver")
TDRV6=BIN\MONADI.DLL ("ADI Monitor Driver")
TDRV7=BIN\DAS2XC800.DLL ("Infineon DAS Client for XC800")
TDRV8=BIN\UL2LPC9.DLL ("NXP LPC95x ULINK Driver")
RTOS0=Dummy.DLL("Dummy")
RTOS1=RTXTINY.DLL ("RTX-51 Tiny")
RTOS2=RTX51.DLL ("RTX-51 Full")
LIC0=LSX01-CBRRX-E2VLB-2P3D3-Y5SIY-ZLTVQ