相信大部分新手都是和我一样从51走过来的,接触STM32才发现keil分很多版,刚开始不明所以装上发现根本不能用啊,后来才知道有51和arm版,但是这样一来就得装两个keil了,吾等强迫症果断不舒服,于是网上找了半天总结了这个方法,给新手分享一下,只需要装一个keil就可以同时用51和arm了,强迫症的朋友不要错过了!
过程:
首先先装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版的安装目录下,或者去网上搜个C51包也行,然后选择器件里就有爱特梅尔的51系列单片机了,
想添加STC单片机那么再去STC官网下个STC.CDB文件复制到安装目录下的UV4文件夹,图片中的样子了
这样想建立STM32工程就选上面那个,然后选STM32的型号,建立51的工程就选下面那个,或者ARM工程里也有AT的51单片机可选。我试过了,4.12版本以上的都可以用,我的是5.10版本MDK。工程可以随意打开不会冲突,用起来比装两个MDK方便多了!
下面附STC.cdb文件
|
|