This is a general error when FlashMagic can not connect to microcontroller.
1. Check if all switches are in correct position for programming.
2. Check if DTR/RTS signals come to the board (check your board schematic)
3. Check if RX/TX come to your board