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: , , , ,

5 Comments:

  • Why not just spend the $39.99 and get a BDM from somewhere like www.witztronics.com?

    By Anonymous Anonymous, At 9/10/2008 12:59 PM  

  • It is good to see that there are other products out there now. It is unfortunate that the ones you mention are not listed on Freescale's site.

    By Blogger flszen, At 10/17/2008 8:50 PM  

  • FYI, I have a BDM from Witztronics.com and it works great!

    By Anonymous Anonymous, At 11/05/2008 1:18 AM  

  • I just started with freescale mcu's
    and have the same problem.

    Softec Spyder can only handle S08QD and S08QG, strange isn't it ?
    even the open source OSBDM version can handle other mcu's from same family.
    on more clue: softec also sells "indart hcs08" for al lot more money ...

    you gessed it - it's blocked in side the driver.

    find the driver - SofTec_BDC08.dll
    its in C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.2\prog\gdi
    and in C:\Program Files\NoICE\bin

    edit the table inside - to much work for me, but you can do it ;)
    I just dissabled checking.

    in SofTec_BDC08.dll version 02.00.72
    find F8 7B 04 10 (table adres)
    after that there is an
    cmp [...]
    jne ...
    change it to jmp

    for SofTec_BDC08 version 02.00.72
    file offset 1D18 is 74 change it to EB (used by noICE)
    file offset 430D is 74 change it to EB (used by CodeWarrior)

    WARNING: you can select any device - even if spyder can not handle it - use at you own risk !

    Jombo !

    By Anonymous Anonymous, At 10/11/2009 4:15 PM  

  • To make the usbspyder08 work with all RS08 mcus, there's a method similar to the one the above commenter did.

    Open the file C:\program files\freescale\CodeWarrior for Microcontrollers V6.3\prog\gdi\inDART_RS08.dll in a hex editor and change the part starting at 0x3EF0 from
    41 04 74 0D 8B
    to
    41 04 EB 0D 8B

    for those of you stumbling upon this later by which time the file has been updated (maybe), what you're doing is changing a JE SHORT to JMP SHORT in

    00003EEB 8B4424 18 MOV EAX,DWORD PTR SS:[ESP+18]
    00003EEF 3941 04 CMP DWORD PTR DS:[ECX+4],EAX
    00003EF2 74 0D JE SHORT 00003F01
    00003EF4 8B41 08 MOV EAX,DWORD PTR DS:[ECX+8]
    00003EF7 83C1 08 ADD ECX,8
    00003EFA 83F8 FF CMP EAX,-1

    By OpenID doodle77, At 11/14/2010 5:57 PM  

Post a Comment

Subscribe to Post Comments [Atom]



<< Home