I tried your text file and it still failed with the same error. After experimenting a little using your text file, I found that the ERASEUSED and the ERASE(1, PROTECTISP) work OK. I only get the error when the ERASE(DEVICE, PROTECTISP) command is included.
This text file works:
DEVICE(89LPC935,7.372)
READSIGNATURE
COM(1,7200) HARDWARE(KEILMCB900, 50, 100) ERASE(1, PROTECTISP)
ERASEUSED(blinky.hex, PROTECTISP) HEXFILE(blinky.hex, NOCHECKSUMS, NOFILL, PROTECTISP)
Here is the result:
>fm @fm.txt
Flash Magic Version 3.27.130
8051/XA Driver Version 2.14.130
ARM Driver Version 1.13.128
(C) Embedded Systems Academy 2000-2006 All rights reserved
Connected
Device selected
Manufacturer ID: 0x15
Device ID 1: 0xDD
Device ID 2: 0x1E
Erase complete (BLOCK 1)
Erase complete (USED)
Hex file programming complete (blinky.hex)
This text file gives the "Erase failed: invalid commend (DEVICE)" error:
DEVICE(89LPC935,7.372)
READSIGNATURE
COM(1,7200) HARDWARE(KEILMCB900, 50, 100) ERASE(DEVICE, PROTECTISP) ERASE(1, PROTECTISP)
ERASEUSED(blinky.hex, PROTECTISP) HEXFILE(blinky.hex, NOCHECKSUMS, NOFILL, PROTECTISP)
Here is the result:
>fm @fm.txt
Flash Magic Version 3.27.130
8051/XA Driver Version 2.14.130
ARM Driver Version 1.13.128
(C) Embedded Systems Academy 2000-2006 All rights reserved
Connected
Device selected
Manufacturer ID: 0x15
Device ID 1: 0xDD
Device ID 2: 0x1E
Erase failed: invalid command (DEVICE)
I tried this on another PC (both are running WinXP, SP2) with the same results.
I noticed that you are using:
8051/XA Driver Version 2.20.130
ARM Driver Version 1.14.128
These drivers (especially the 8051/XA) are newer than what I downloaded yesterday:
8051/XA Driver Version 2.14.130
ARM Driver Version 1.13.128
Could this make a difference?
Ed