Memoirs of Fls'Zen

Thursday, June 28, 2007

Extending the Freescale USBSPYDER08 BDM Programmer

UPDATE: Refer to this post for information about driver version 2.0.92.

Do you feel restricted by the USBSPYDER08 from Freescale? I did. The MC9S08QD4, MC9S08QG4, and MC9S08QG8 are nice chips, but they are limited. The SPYDER08 uses Freescale's BDM to communicate with the microcontrollers. I would suggest that BDM is a standard and does not need to be restricted to only certain chips. I recently wanted to program a MC9S08GT16A chip, and I didn't want to spend $100 for another programmer.

Enter a hack. If you look in your CodeWarrior/prog/gdi directory, you will see a file entitled SofTec_BDC08.dll. I have found that this file is used by HIWAVE to communicate through the inDART and USBSPYDER devices. This file contains the chip identifier strings that are used for making ALL of the programming logic work. This is where a change has to happen.

Since I could care less about the QD4 chip, I looked for it in the file using a hex editor. (I prefer 0xED). Upon finding it, I modified it to read MC9S08GT16A. Even though this identifier is two characters longer, the compiler for the DLL nicely left us 3 NULLs, which is just enough. You can download my hacked DLL file here. Have a look and see for yourself what changes were made. You can presumably put in any identifier for an HCS08 that does not exceed 11 characters.

Labels: , , , ,