在Keil内调用Flash Magic命令行Flash ISP的应用方法(菜农三八节劳动实验): 1.在Tools菜单内打开Customize Tools Menu... 2.在Menu Content内加入 Program device with %H 3.在Command内加入 D:Program FilesFlash MagicFM.EXE 4.在Arguments内加入参数(擦除整片,烧写程序,加密/不加密,校验) a)Flash不加密 DEVICE(LPC2138, 11.0592) COM(1,28800) HARDWARE(BOOTEXEC, 25, 250) ERASE(DEVICE, PROTECTISP) HEXFILE(#H, NOCHECKSUMS, NOFILL, PROTECTISP) VERIFY(#H, NOCHECKSUMS) b)Flash加密 DEVICE(LPC2138, 11.0592) COM(1,28800) HARDWARE(BOOTEXEC, 25, 250) ERASE(DEVICE, PROTECTISP) HEXFILE(#H, NOCHECKSUMS, NOFILL, PROTECTISP, CODEREADPROTECTION) VERIFY(#H, NOCHECKSUMS) 5.选中Run Minimized时DOS界面最小化 6.在Tools菜单内运行Program device with RTC.HEX(注:本例为RTC.HEX)
如果COM口不存在或在使用,则运行结果如下: "D:Program FilesFlash MagicFM.EXE" DEVICE(LPC2138, 11.0592) COM(1,28800) HARDWARE(BOOTEXEC, 50, 250) ERASE(DEVICE, PROTECTISP) HEXFILE(D:LPC**RTCRTC.HEX, CHECKSUMS, NOFILL, PROTECTISP, CODEREADPROTECTION) Flash Magic Version 3.50.197 8051/XA Driver Version 2.31.196 ARM Driver Version 1.23.196 (C) Embedded Systems Academy 2000-2007 All rights reserved Connection failed: COM Port error
如果COM口存在且未使用,则运行结果如下: "D:Program FilesFlash MagicFM.EXE" DEVICE(LPC2138, 11.0592) COM(1,28800) HARDWARE(BOOTEXEC, 50, 250) ERASE(DEVICE, PROTECTISP) HEXFILE(D:LPC**RTCRTC.HEX, CHECKSUMS, NOFILL, PROTECTISP, CODEREADPROTECTION) Flash Magic Version 3.50.197 8051/XA Driver Version 2.31.196 ARM Driver Version 1.23.196 (C) Embedded Systems Academy 2000-2007 All rights reserved Connected Device selected Erase complete (DEVICE) Hex file programming complete (D:LPC**RTCRTC.HEX) Verify passed (D:LPC**RTCRTC.HEX)
菜地公告:引用本文必须注明出处!!!
雁塔菜农HotPower 2007.3.8 于西安大雁塔菜地 http://HotPower.21ic.org/
|