TBDML debugging interface for HC12, S12, S12X and S12XE microcontrollers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TBDML debugging interface for HC12, S12, S12X and S12XE microcontrollers

39,468 Views
DanielM
Contributor III
TBDML is a low cost, open source debugging interface compatible with the CodeWarrior environment (version 4.1 or greater).

This project was previously published on freegeeks.net. Since the freegeeks site has now been shut down I am posting the latest version of the project here for the benefit of anyone interested.

When older HC12 MCU derivative was selected from the menu the debugger did not remember the choice when started again. GDI DLL version 1.8 in distribution 1.2F fixes this. There is no other change compared to distribution 1.2E.

Daniel

Message Edited by DanielM on 2006-11-06 11:15 AM

Message Edited by DanielM on 2006-11-06 11:18 AM

Message Edited by t.dowe on 2009-09-01 10:57 AM
0 Kudos
32 Replies

2,368 Views
hooziewhatsit
Contributor I
Hi, I just want to clarify something before I take the time to make the TBDML debugger.
 
So, I open CW5.7, and True-Time 6.1, open a command window in True-Time, type 'set gdi', then browse to the 'tbdml_gdi12.dll' file, and hit OK, I get an error saying:
 
"Driver DLL <file path\tbdml_12.dll> or one of its components not found or loaded.  System error 126: The specified mdoule could not be found"
 
It then goes back to the command window, where it says 'No link to target'.  After this True-Time does get a GDI menu item with Load, Reset and Connect options. 
 
So, my question is this:  Is this normal since I don't have the TBDML hardware connected to my system?  Once I make the TBDML, I presume the error should go away if I have the hardware connected, and it will all work like it should?
 
I'm using the latest distribution 12e as well. 
 
Thanks in advance,
-Dave
0 Kudos

2,368 Views
DanielM
Contributor III
Dave,

if you did not build&install TBDML yet, then the TBDML.DLL will not be in the right place (/windows/system32).

BTW, do not confuse TBDML.DLL with TBDML_GDI12.DLL. TBDML_GDI12.DLL lives in the debugger folder and does the interface for the debugger. TBDML.DLL is the low level communication library for TBDML. TBDML_GDI12.DLL uses TBDML.DLL to talk to hardware. If TBDML.DLL is not installed the debugger will complain when loading TBDML_GDI12.DLL as TBDML.DLL cannot be loaded.

I hope this helps.

Daniel
0 Kudos

2,368 Views
Alban
Senior Contributor II
Hi Dave,
 
CW5.7 for S12(X) ???
 - Never heard about this version.
 
File not found:
 - Have you copied the TBDML DLL to the /GDI directory of the installation ?
 - Yes it's normal to have an error message, it will tell you cannot find any TBDML.
 
Cheers,
Alban. {daily user of TBDML}
0 Kudos

2,368 Views
joose2006
Contributor I

hi

 can you anwersme , can I program eeprom in a hcs12 trough rx,tx in monitor mode what is metod irda

0 Kudos

2,368 Views
DanielM
Contributor III
joose2006,

there is no such thing on S12 as a monitor mode. Can you please re-phrase your question? I am not sure I understood. Is your question related to TBDML in any way?

Daniel
0 Kudos

2,368 Views
DanielM
Contributor III

Hi all,

some people have been asking me for an alternative format to the Gerber files for manufacturing the PCB. I am attaching a zip file with BMP and PostScript format of the PCB.

The gerbers are the best format, the PostScript is the next best thing. The files are oversized for better resolution. You will need to scale them to print in the correct size on your printer. BMP can be scaled in your favourite bitmap editor, PS can be scaled by editing it. Search the PS file for:

%% SCALE and MOVE example is below
%% Finetune to your printer
%% first number is X, second number is Y axis
%%
%% 10000 10000 translate
%% 0.33333 0.33333 scale

uncomment the scale (and optionally the translate) and tweak the values until you get the right size on your printer.

Daniel

 

TBDML_PCB_ps_and_bitmap.zip

Message Edited by t.dowe on 2009-09-01 10:58 AM
0 Kudos

2,368 Views
DavidB
Contributor I
Hello Daniel,

Thank you for the TBDML. I work in a small Electronical R&D company based on france which develop boards based on HC912 /HCS12 microcontrolers; we also make and sell these cards by small quantities. We don't use the TBDML for debugging purposes but for programming (our trainee use it for debugging). We would like to sell your TBDML (components mounted on board without a box) to our clients or everybody who doesn't want to buy components and mount the card by himself. And to keep in mind it must be low cost, we'll take only a small margin. Do You agree with this ? Can we do this ?

Best regards,

David
0 Kudos

2,368 Views
DanielM
Contributor III
Hello David,

I do not have the slightest problem with you doing that. In fact I appreciate that you ask me for a permission - legally the code is open source and you can use it for anything you like without even asking me.

I am constantly being asked by different people where they can buy a finished interface. So far I had to disappoint them by saying that the only option is to do it yourself in a garden shed. I think there might be a nice niche market for you if you go ahead and start manufacturing the cable. On word of warning though: if you sell it, you will need to support it and answer questions from your customers. I cannot promise that I will always have time for a timely response (although I will do my best to fix any bugs you or your customers might discover).

If you want to use my original PCB you are welcome as well. I am having it manufactured cheaply in eastern Europe. If you want, you can order it from the same manufacturer - that would save you the tooling charges. Send me a PM if you want to do that.

Daniel
0 Kudos

2,368 Views
DanielM
Contributor III
Hi all,

I was pointed to a small bug which causes the adress to be aligned on misaligned word writes by the debugger. It boiled down to a typo in the GDI DLL. A new DLL with the problem fixed is now available, the latest distribution is 1.2b. See the top of this thread for the file to download.

Daniel

15/9/2006: A few more bugs were found in the meantime. Always check the top of the thread for the latest distribution

Message Edited by DanielM on 2006-09-15 06:10 AM

0 Kudos

2,368 Views
efan
Contributor I
 Dear DanielM!
      In the document of "tbdml_manual_15.pdf",there are some description about GDI DLL:  
      "The GDI DLL for the Metrowerks Hi-wave debugger was created based on information which is not available in the public domain. The license attached to these files is preventing me from disclosing them and the source code of this library."
     But I want to make a GDI DLL for my own BDM debugger.Now I only have a document about "Generic Debug Interface Instrument"(gdi126.pdf),Could you tell me how to get the necessary information for developing GDI DLL for Metrowerks Hi-wave debugger ?
    Best Regards,
    efan
0 Kudos

2,368 Views
DanielM
Contributor III
contact freescale, they own the information and nobody else can give it to you (without breaching the associated license agreement).

Daniel
0 Kudos

2,368 Views
efan
Contributor I
Daniel
         Thank you very much!I will try to contact freescale.
 
efan
0 Kudos

2,368 Views
DanielM
Contributor III
Efan,

if freescale are too slow or do not wat to give the info to you for whatever reason, you can try to "cheat" a little. My TBDML_GDI12.DLL uses TBDML.DLL to talk to the hardware. You can replace TBDML.DLL with your own DLL which talks to your own hardware. You only need to maintain the same API and things should work.

Daniel
0 Kudos

2,372 Views
cc_aa
Contributor I
Does bin_tbdml_gdi_dll_12.zip support Micro-P MC9S12KT256 AND MC9S12KG256?
 
 
Thanks!
Jacky
0 Kudos

2,372 Views
DanielM
Contributor III
Hi,

yes, all parts supported by the CodeWarrior debugger should work just fine. The BDM interface actually knows very little about the part it is talking to, the cleverness is hidden in the debugger. As far as I know the debugger supports these parts so there should be no problem.

Daniel
0 Kudos

2,372 Views
peg
Senior Contributor IV

Hi,

For me there seems to be too much mystery involved with the various BDM designs that are available. So I am going to present here what I believe to be the status quo.

Please correct me if I am wrong and understand that these are only my opinions and hopefully if wrong they will be corrected by the persons concerned.

************************

TBDML for HC(S)12

Designed by Daniel Malik now at Ver. 1.2 (Manual Ver.1.5) first released on freegeeks.net

Real name: Daniel Malik aka DanielM

Runs on a JB8 only with USB interface to Codewarrior/Hiwave

Available in this thread.

*********************

Persons unknown modified this to run on a JB16 that sits on an adapter on the original PCB and is posted here in the 16-bit community files

You appear to be able to obtain a built up one from here:

http://www.tsinghua-mot.net/kfgj/TBDML.htm

If you can read Chinese.

*************************

Real name Alvin aka Nabla69 then took the original TBDML and modified it to run on a JB16 and talk only to S08 devices.

Known as Open Source BDM for S08 and posted in the 8-bit community files.

******************************

Real name Joerg Schnyder aka joerg produced an alternate pcb for the OSBDM for S08 found here:

http://www.systech-gmbh.ch/indexHCS08.html

********************************

The owner of the old freegeeks.net aka freegeek (Freescaler)

is working on an as yet unreleased BDM for Coldfire shown here:

http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=223

****************************

An older Coldfire design at:

http://www.cvs.cx/Documents/CFPOD.pdf

************************************

A new very simple BDM for S08 using serial port and a QT1 designed by Gabriel Dubatti. Originally in Spanish, I have assisted in the translation to English and somebody else to Chinese. Now released as 3 languages in one. I am currently still working with him to clear up some issues with the QG's but it works well for the GB/GT and possibly others.

Does not interface to Codewarrior/Hiwave, has its own basic programmer/debugger/disassembler.

Latest version is H/W 02C S/W 1.4

Found here:

http://www.ingdubatti.com.ar/eng/index.htm

***************************************************

Is this all correct?

There are others that have not been mentioned here.

Regards David

 

Message Edited by peg on 2006-07-07 09:06 PM

Message Edited by peg on 2006-07-07 09:18 PM

Message Edited by peg on 2006-07-07 09:42 PM

Message Edited by peg on 2006-07-07 11:09 PM

Message Edited by peg on 2006-07-11 09:55 PM

Message Edited by peg on 2006-07-11 10:00 PM

0 Kudos

2,372 Views
anthrax
Contributor I

Hi all,

It would be nice if TBDML could program HCS08 microcontrollers.

Does anyone know if there is a free programmer for HCS08 available?

Regards

0 Kudos

2,372 Views
peg
Senior Contributor IV

Hi anthrax,

If you read my previous posts in this thread you will see that there is, and where it is.

Regards David

0 Kudos

2,372 Views
DanielM
Contributor III
Hi David,

you did not get all the names and associations with Freescale right (CompilerGuru is someone else), but as far as the SW/HW goes (which is the important thing) I believe this correct. The latest version of TBDML is 1.2 (do not confuse version of the doc with version of the cable).

I agree, distribution of the different versions of HW & SW is a mess. I am trying to keep a high level change log. Other people go about this differently - I would appreciate if everyone could sign their work. If their work was based on some prior work, it would also be good to document what version it is based on... I.e. it is not apparent what version of my JB8 TBDML was used to produce the JB16 versions.

Daniel

Message Edited by DanielM on 2006-07-07 06:37 AM

Message Edited by DanielM on 2006-07-07 06:49 AM

0 Kudos

2,372 Views
peg
Senior Contributor IV

OK Daniel,

I removed the reference to Compiler Guru in my previous post by editing it.

Regards David

 

0 Kudos