building TBDML

Non-EMS Electronics related discussions and projects in here please.
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

building TBDML

Post by nitrousnrg »

"TBDML is a low cost, open source debugging interface compatible with the CodeWarrior environment (version 4.1 or greater)."
All the data I have is available here.

Why do we need it?
Well, FreeEMS uses a microcontroller that comes from the factory without any kind of software inside. To load freeems-vanilla we need some kind of bootloader. In our case, its Freescale's Serial Monitor (SM).

That SM, can't be loaded in flash quite easily, because the only way to do it is through a BDM interface (Background Debug Mode). Once you flash the SM in the MCU, you're able to load the latest freeems-vanilla firmware :-)

The Adapt board comes with a SM already loaded, TBDML is only needed if you bought the microcontroller and a pcb separately.

This is what the guys who developed it provide:
• complete HW description which enables you to build the interface
• binary of firmware for the interface, USB drivers and DLL interface library for
Windows (I hope to add support for Linux at some point in time - anybody
out there who would volunteer to help?)
• source code of the firmware and the DLL interface
• binary of GDI DLL library for Metrowerks Hi-wave debugger
So I started building it, not using their pcb design, but a universal board following the schematic.

Image
Sorry, no camera for some days. Don't expect good pics. And yes, that is me at 3:30am hoping to get a free haircut someday.

With time, I'm putting more information in this thread, right now i'm checking connectivity before plugging it into my PC.

The TBDML has 3 connector headers:
1. DB9 to load the firmware to the TBDML microcontroller (used once)
2. USB connection to the PC.
3. BDM header: it goes straight to the microntroller you want to flash/debug

3 ICs:
1. Freescale MC68HC908 microcontroller
2. A 74HC125 quad buffer
3. MAX232

The rest are little things, 6 MHz crystal, resistors, capacitors, etc.

I don't remember what was the deal with the PC software. A linux command line app would be awesome, but afaik, it doesn't exist yet. It works with Codewarrior wich is multiplatform, but not free.
Marcos
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: building TBDML

Post by Fred »

Is that freescale micro the same one as found on the jimstim by chance? If so, I have a spare.

LOVE the photo! :-)

ROFL at "free haircut"

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: building TBDML

Post by nitrousnrg »

Its an HC908JB8...

So far, nobody dares to do the job.
Marcos
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: building TBDML

Post by Fred »

Fly me over, I'll have a crack, no guarantees, though.

M9S08QG8 is the older JimStim chip, I guess that's no good.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: building TBDML

Post by nitrousnrg »

The tbdml manual suggest to use a program called prog08 to load the firmare, because it is freeware blah blah...

Turns out 4 years ago prog08 stopped being freeware, now it costs some bucks (Stallman is laughing at me right now). I'm asking a friend that may have it, to program the hc908 just once.

Freescale should provide these tools, this is crazy.
Marcos
User avatar
EssEss
LQFP112 - Up with the play
Posts: 244
Joined: Thu Sep 10, 2009 9:23 am
Location: Dayton, OH

Re: building TBDML

Post by EssEss »

freescale is not a toolset vendor (and never was) .. don't blame them. They contract out all of their toolset requirements to 3rd parties and those are the people you need to blame. Up until about 15yrs ago they would regularly provide home-grown helpful tools (assemblers, monitors) until they realized how expensive it was to maintain and update, which then caused them to contract out to others to stay competitive (P&E primarily). Hardware and its usage was also MUCH easier back then (therefore, 'in-house' tools were also more manageable).

nothing is free - someone had to pay or provide labor for that service/product. sorry, but entitlement strikes a pretty deep nerve with me :lol:
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: building TBDML

Post by nitrousnrg »

yeh, I was probably expecting a microchip-like experience.

Isn't it strange that there isn't any mcu programmer in the repositories? I can find many for microchip, arm and avr, but none for freescale.
Marcos
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: building TBDML

Post by jharvey »

I think that explains why ARM takes 80% of all embedded devices. It's almost like gcc comes with the -m switch which I understand is a feature that's maintained by ARM developers. Therefore you will always have a free option. It's certainly nice that IAR and Keil have made easier to use, more stream lined and more portable, paid for options, but free (as in beer) tools make it easier for new comers to develop with your chip. They also use a well known jtag standard instead of this TBDML thing. Live stepping through code is nice.

Any how, not to toot the ARM whistle to much, this is a thread about TBDML after all.
User avatar
EssEss
LQFP112 - Up with the play
Posts: 244
Joined: Thu Sep 10, 2009 9:23 am
Location: Dayton, OH

Re: building TBDML

Post by EssEss »

not really, it's been a long time. I remember the days of dialing into motorola's bbs before they put stuff up on the internet... it was shortly after that transition they stopped providing any support at all. It's probably hard for you because if you haven't seen the particular tools you're looking for you don't know what to search for :P ...

its cheaper for a commercial entity to simply buy a tool + support and hire anyone off the street then to seek out savvy embedded dev's who don't need those items. most of those savvy devs also prefer to use their tools in a superficial manner instead of developing an intimate relationship with them. they get paid more for turning out product then they do for understanding their tools better. in the old days the relationship was much different .. there were no tools and the developer was the toolset creator. now we have sparkfun and readily available foss and anyone can do it .. which is really cool I think.

ok, enough of me hijacking your thread ...
for anyone in the US that needs me to burn code into your board, I can do it too, just pay return shipping.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: building TBDML

Post by Fred »

EssEss wrote:in the old days the relationship was much different .. there were no tools and the developer was the toolset creator
Why not in 2011? Is the microcontroller spec available? Come on Marcos, show us what you're made of! :-)
for anyone in the US that needs me to burn code into your board, I can do it too, just pay return shipping.
That's awesome, Sean! You're a legend! :-)

Edit: I assumed you meant load to xdp512, not to the tbdml, but is that possible too? Or did you mean that?

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply