正常情况下MDK是不能同时支持51和AMM的,除非装两个,但是这样太麻烦了,这个修改方法很简单,已经用了很久了,不知道的可以试试。
首先先装ARM版,破解一下,然后把安装目录下的TOOLS.INI
文件里面添加红字内容(最好备份下),注意路径
[UV2]
CDB0=UV4\STC.CDB("STC")
ORGANIZATION="Microsoft"
NAME="Microsoft", "1"
EMAIL="1"
ARMSEL=1
USERTE=1
BOOK0="UV4\RELEASE_NOTES.HTM" ("uVision Release Notes",GEN)
RTEPATH="D:\KEIL05\PACK"
DEVICE_BOOKS=
SocketPort=1969854680
[ARM]
PATH="D:\KEIL05\ARM\"
VERSION=5.00
PATH1="C:\Program Files\GNU Tools ARM Embedded\4.7 2012q4\"
TOOLPREFIX=arm-none-eabi-
CPUDLL0=SARM.DLL(TDRV0,TDRV5,TDRV6,TDRV9)
# Drivers for ARM7/9 devices
CPUDLL1=SARMCM3.DLL(TDRV1,TDRV2,TDRV3,TDRV4,TDRV5,TDRV7,TDRV8,TDRV10,TDRV11,TDRV12,TDRV13,TDRV14,TDRV15)
# Drivers for Cortex-M devices
CPUDLL2=SARMCR4.DLL(TDRV7)
#
Drivers for Cortex-R4 devices
BOOK0="HLP\RELEASE_NOTES.HTM" ("Release Notes",GEN)
BOOK1="HLP\ARMTOOLS.chm" ("Complete User's Guide
Selection",C)
TDRV0=BIN\UL2ARM.DLL("ULINK2/ME ARM Debugger")
TDRV1=BIN\UL2CM3.DLL("ULINK2/ME Cortex Debugger")
TDRV2=BIN\AGDIRDI.DLL("RDI Interface Driver")
TDRV3=BIN\ABLSTCM.dll("Altera Blaster Cortex Debugger")
TDRV4=BIN\lmidk-agdi.dll("Stellaris ICDI")
TDRV5=Signum\SigUV3Arm.dll("Signum Systems JTAGjet")
TDRV6=Segger\JLTAgdi.dll("J-LINK / J-TRACE ARM")
TDRV7=Segger\JL2CM3.dll("J-LINK / J-TRACE Cortex")
TDRV8=BIN\ULP2CM3.DLL("ULINK Pro Cortex Debugger")
TDRV9=BIN\ULP2ARM.DLL("ULINK Pro ARM Debugger")
TDRV10=NULink\Nu_Link.dll("NULink Debugger")
TDRV11=SiLabs\SLAB_CM_Keil.dll("SiLabs UDA Debugger")
TDRV12=STLink\ST-LINKIII-KEIL_SWO.dll ("ST-Link Debugger")
TDRV13=BIN\CMSIS_AGDI.dll("CMSIS-DAP Debugger")
TDRV14=BIN\DbgFM.DLL("Fast Models Debugger")
TDRV15=PEMicro\Pemicro_ArmCortexInterface.dll("PEMicro Debugger")
LIC0=TIV74-FXUYI-GI05Q-NP6N4-0EQBH-JEH8Y
[ARMADS]
PATH="D:\KEIL05\ARM\"
PATH1=".\ARMCC\bin\"
CPUDLL0=SARM.DLL(TDRV0,TDRV5,TDRV6,TDRV9)
# Drivers for ARM7/9 devices
CPUDLL1=SARMCM3.DLL(TDRV1,TDRV2,TDRV3,TDRV4,TDRV5,TDRV7,TDRV8,TDRV10,TDRV11,TDRV12,TDRV13,TDRV14,TDRV15)
# Drivers for Cortex-M devices
CPUDLL2=SARMCR4.DLL(TDRV7)
#
Drivers for Cortex-R4 devices
BOOK0="HLP\RELEASE_NOTES.HTM" ("Release Notes",GEN)
BOOK1="HLP\ARMTOOLS.chm" ("Complete User's Guide Selection",C)
TDRV0=BIN\UL2ARM.DLL("ULINK2/ME ARM Debugger")
TDRV1=BIN\UL2CM3.DLL("ULINK2/ME Cortex Debugger")
TDRV2=BIN\AGDIRDI.DLL("RDI Interface Driver")
TDRV3=BIN\ABLSTCM.dll("Altera Blaster Cortex Debugger")
TDRV4=BIN\lmidk-agdi.dll("Stellaris ICDI")
TDRV5=Signum\SigUV3Arm.dll("Signum Systems JTAGjet")
TDRV6=Segger\JLTAgdi.dll("J-LINK / J-TRACE ARM")
TDRV7=Segger\JL2CM3.dll("J-LINK / J-Trace Cortex")
TDRV8=BIN\ULP2CM3.DLL("ULINK Pro Cortex Debugger")
TDRV9=BIN\ULP2ARM.DLL("ULINK Pro ARM Debugger")
TDRV10=NULink\Nu_Link.dll("NULink Debugger")
TDRV11=SiLabs\SLAB_CM_Keil.dll("SiLabs UDA Debugger")
TDRV12=STLink\ST-LINKIII-KEIL_SWO.dll ("ST-Link Debugger")
TDRV13=BIN\CMSIS_AGDI.dll("CMSIS-DAP Debugger")
TDRV14=BIN\DbgFM.DLL("Fast Models Debugger")
TDRV15=PEMicro\Pemicro_ArmCortexInterface.dll("PEMicro Debugger")
RTOS0=Dummy.DLL("Dummy")
RTOS1=VARTXARM.DLL ("RTX Kernel")
[C51]
PATH="D:\KEIL05\C51\"\" \"
SN=K1DZP-5IUSH-A01UE
VERSION=V9.01
BOOK0="HLP\RELEASE_NOTES.HTM"
("Release Notes",GEN)
BOOK1="HLP\GS51.PDF" ("uVision2
Getting Started",GEN)
BOOK2="HLP\C51.PDF" ("C51 User's
Guide",GEN)
BOOK3="HLP\C51LIB.CHM" ("C51 Library
Functions",C)
BOOK4="HLP\A51.PDF"
("Assembler/Utilities",GEN)
BOOK5="HLP\TR51.CHM" ("RTX51 Tiny
User's Guide",GEN)
BOOK6="HLP\DBG51.CHM" ("uVision2
Debug Commands",GEN)
BOOK7="HLP\ISD51.CHM" ("ISD51 In
System Debugger",GEN)
BOOK8="HLP\FlashMon51.CHM" ("Flash
Monitor",GEN)
BOOK9="MON390\MON390.HTM" ("MON390:
Dallas Contiguous Mode Monitor",GEN)
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")
RTOS1=RTXTINY.DLL ("RTX-51 Tiny")
RTOS2=RTX51.DLL ("RTX-51 Full")
LIC0=76PCX-HP74U-IRIXW-QEPXN-32TWY-CALVY
[C251]
BOOK0="HLP\RELEASE_NOTES.HTM"
("Release Notes",GEN)
BOOK1="HLP\GS51.PDF" ("uVision2
Getting Started",GEN)
BOOK2="HLP\C251.PDF" ("C251 User's
Guide",GEN)
BOOK3="HLP\C251LIB.CHM" ("C251
Library Functions",C)
BOOK4="HLP\A51.PDF"
("Assembler/Utilities",GEN)
BOOK5="HLP\DBG251.CHM" ("uVision2
Debug Commands",GEN)
TDRV0=BIN\MON251.DLL ("Keil Monitor-251
Driver")
VERSION=V3.5
修改后保存,然后把keil51的安装文件夹下的C51文件夹复制到ARM版的安装目录下,然后选择器件里就有51系列单片机了
之后再去STC官网下个STC.CDB文件复制到安装目录下的UV4文件夹,就变成这样了