After long time, I found some time to work on my new P89V51RD2 (8051 MicroController from NXP) kit. NXP provides FlashMagic tool to flash the assembled HEX file. Unfortunately this tool is available only for MS-Windows versions. Since I am using only Linux for all my home works, for last few months I had been trying to make it work with Linux using wine (Windows Emulator). Today I found it is succesfully flashing. I am using FlashMagic version 4.33. Fine, let us see how to get it done?
- P89V51RD2 based Microcontroller kit from Emblitz
- FlashMagic 4.33 – Previous versions are not working (atleast for me)
- OpenSUSE 11.0 (linux kernel 2.6.25)
- Wine 1.0-rc3
1. Ensure that wine is installed on your linux machine.
2. Download FlashMagic (only Windows version) from this site.
3. Install the FlashMagic ($wine FlashMagic.exe). Follow the installation wizard and get it installed.
4. Ensure that your login has permission to use serial port (which you use to communicate with kit for flashing). Mostly you may have to be a member of uucp group.
5. Run FlashMagic ($wine ~/.wine/drive_c/Program Files/Flash Magic/FlashMagic.exe)
6. Set the Step-1 Communications section parameters as per your Kit’s requirement.
7. For me, this setting was not enough to get it done. I had to do the following settings also.
Options -> Advanced options -> Hardware config -> Use DTR to control RTS should be unchecked.
Options -> Advanced options -> Hardware config -> Assert DTR and RTS while COM Port open should also be unchecked.
8. Then to ensure that FlashMagic successfully communicates with Kit, read the signature of Microcontroller using ISP -> Read Device Signature option. It may ask you to reset the kit in ISP mode; do it as per your kit. If you are able to read the signature, you will be able to flash the chip.
Enjoy the world of chips and l-o-w l-e-v-e-l languages happily!
Update: Detailed instruction for My NXP P89V51RD2 based Emblitz 8051 Kit
1. Power off the device keeping serial port connected to Host computer.
2. J7 – 1 & 2 connected (External Program Memory disabled)
3. J22 – 1 & 2 connected (Execution mode)
4. USB Power on (or) S5 – 1 & 2 connected
5. Start Flash Magic tool and test by menu ISP -> Read Device Signature… -> Wait for diaglog box to show “Reset the device into ISP mode now”
6. J22 – 2 & 3 connected (ISP mode)
7. Press Reset switch S4
8. Device Signature should be read and displayed on screen.
9. Now select your hex file to program and click start button in Flash Magic too. Wait till the programming completed.
10. J22 = 1 & 2 connected again (Execution mode)
11. Press Reset switch S4 to put the device in execution mode