Author Topic: m68332 BDM and …. gdb ???  (Read 26008 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
m68332 BDM and …. gdb ???
« on: July 30, 2014, 11:41:36 am »
hi guys
i am toying with a tiny mc68332 board which has BDM interface
and i guess if there is a working debug interface for gdb or … anything else around

let me know
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: m68332 BDM and …. gdb ???
« Reply #1 on: July 30, 2014, 12:26:38 pm »
Have a look at the BDM tools package. Never used it myself.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #2 on: July 30, 2014, 05:57:57 pm »
yeah, but it seems old, and i'd like to have feedback about  :-+

also, anybody toying with gdb-stub for m68k ?
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: m68332 BDM and …. gdb ???
« Reply #3 on: July 30, 2014, 08:04:30 pm »
Quote
it seems old
The 68332 is an OLD chip...
Likewise, you shouldn't have any trouble finding a gdb stub for 68k.  It WAS one of the first CPUs suppored by gdb.   IIRC, the 68k gdb_stub most people use was written at HP, back when they were selling 68k workstations.  (Hmm.  The one I found looks like it would need some editing before it will compile with a modern version of gcc.  Strings (asm) with embedded newlines have been deprecated for a long time.)
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #4 on: July 30, 2014, 09:55:58 pm »
BDM is stills used by freescale, unfortunately they have and sell closed and expensive debuggers and Applications
and about easier and cheaper ones  .. it seems there is no one using gdb with it.
I have found an old (2003) project that aims for that, but .. no feedback from his author
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26891
  • Country: nl
    • NCT Developments
Re: m68332 BDM and …. gdb ???
« Reply #5 on: July 30, 2014, 10:55:03 pm »
A couple of years ago some Freescale rep. tried to push their 68k based microcontrollers. After finding out there are no easy/cheap tools for 'flashing' those I quickly send the demo board back for a refund.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #6 on: July 31, 2014, 07:24:37 am »
i simply like m68k, especially m68332, i have recently realized two tiny boards and i'd like to put a debugger on. I am currently using dbug32, which is able to upload srec and .. may be it can used with gdb, too. btw, i'd like to have a debug interface to the BDM.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #7 on: July 31, 2014, 07:30:41 am »
after finding out there are no easy/cheap tools for 'flashing' those

Motorola has released a free tool package which contains BDM-LPT schematic to make you able to realize a low cost BDM cable, and a DOS program that drives such a cable

the whole is able to flash a binary to the flash simply attaching the BDM cable on a running system, that means … i was able to put my old DOS laptop back to the present and use it to put dbug32 on the flash chip i have soldered on my two tiny boards

i mean: i have soldered everything on these boards, and i have soldered an empty flash on them, then i connect the BDM cable and i flashed them throughout the motorola BDM software, which is free


My problems are:
1) such an interface is DOS only, and i can't run DOS on my modern systems
2) such an interface is using the LPT port, and i do not have any LPT port on my modern systems (only USB, ethernet, eSata)
3) such an interface has no debug implementation support, it is only able to flash things

 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #8 on: July 31, 2014, 07:35:46 am »
you are right for those who want professional tools and don't want to spend $500 USD for a P&E USB BDM  :palm:
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26891
  • Country: nl
    • NCT Developments
Re: m68332 BDM and …. gdb ???
« Reply #9 on: July 31, 2014, 07:59:48 am »
Well compare $500 to the $5 USB to serial converters I use to load software in the NXP controllers I use. You have to sell a lot of units to make up for the difference IF the controllers from Freescale are actually cheaper. You may think that a business comes with a tree with free money but the reality is that you have to think about every penny you spend. Return on investment is the key word here. In my case the $500 is not worth spending just to use the M68k controllers from Freescale.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #10 on: July 31, 2014, 09:18:02 am »
Well compare $500 to the $5 USB to serial converters I use to load software in the NXP controllers I use.

it seems to me like comparing an home made extremely cheap (and limited) download cable with the professional one  :palm:


edit:
btw, i am looking for a good BDM, i am not interested about these considerations.

edit2:
see this bdm ICE for hc12, it's very impressive, also the sw interface is cool
« Last Edit: July 31, 2014, 09:38:57 am by legacy »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #11 on: July 31, 2014, 09:43:23 am »
i have found this project, OpenSource BDM Interface
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #12 on: July 31, 2014, 09:48:10 am »
and https://github.com/osfreedom/bdm-osbdm this other bdm-osbdm project
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: m68332 BDM and …. gdb ???
« Reply #13 on: July 31, 2014, 10:20:17 am »
For hardware interfaces, there's USBDM and PE Micro's OSBDM, but I don't think either supports CPU32.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: m68332 BDM and …. gdb ???
« Reply #14 on: July 31, 2014, 11:00:49 am »
None of the CPU32 chips have any flash, do they?
Coldfire had a $99 bdm adapter...

 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #15 on: July 31, 2014, 11:21:23 am »
None of the CPU32 chips have any flash, do they?

nope, no flash, and i like they do not have flash inside the CPU package!
i have designed a pair of MRam chips on my two tiny boards, and i am very happy about that.

about BDM … which cable are you talking about, and which software is driving such a cable ?
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: m68332 BDM and …. gdb ???
« Reply #16 on: July 31, 2014, 08:54:57 pm »
Quote
which cable are you talking about, and which software is driving such a cable ?
https://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=USBMULTILINKBDM

I haven't actually used it, and I see it's actually from PE-micro rather than direct from motorola...
(there is also: http://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320137 )

Huh.  Freescale made a pretty big deal about making the BDM "open", and about OSBDM.  It seems strange that there aren't more "hobbyist level" tools around...
 

Offline snoopy

  • Frequent Contributor
  • **
  • Posts: 767
  • Country: au
    • Analog Precision
Re: m68332 BDM and …. gdb ???
« Reply #17 on: August 01, 2014, 03:14:08 am »
A couple of years ago some Freescale rep. tried to push their 68k based microcontrollers. After finding out there are no easy/cheap tools for 'flashing' those I quickly send the demo board back for a refund.

That is the typical motorola business model. Sell you a chip and expect you to pay 3rd parties megabucks for software support. What a racket that was and it's good to see that other chip vendors never followed this ridiculous and elitist model :(

I remember a place I worked at years ago payed out $40,000 for a German made ICE just to debug code for a 68000 based product. I argued with them at the time to go down the x86 route but they wouldn't listen to me :(

My advice to anyone is don't use motorola 68K stuff. The architecture was good in its heyday but is ancient by comparison now.

cheers
« Last Edit: August 01, 2014, 03:16:19 am by snoopy »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #18 on: August 01, 2014, 05:44:04 am »
The architecture was good in its heyday but is ancient by comparison now.

i think the m68K ISA is still the most elegant and easy one
ARM is complex, MIPS is much more complex at the assembly level
especially if you have to deal with pipeline approach!

btw, i have already built 2 tiny boards with 68332 on them, it's for hobby purpose
so in my choice i could not use the BDM, i could use a gdb-stub instead, but …
… i'd like to see if i can use the BDM because  have its tap inside chips,
so why don't to make it a chance ?
 

Offline snoopy

  • Frequent Contributor
  • **
  • Posts: 767
  • Country: au
    • Analog Precision
Re: m68332 BDM and …. gdb ???
« Reply #19 on: August 01, 2014, 06:16:22 am »
The architecture was good in its heyday but is ancient by comparison now.

i think the m68K ISA is still the most elegant and easy one
ARM is complex, MIPS is much more complex at the assembly level
especially if you have to deal with pipeline approach!

btw, i have already built 2 tiny boards with 68332 on them, it's for hobby purpose
so in my choice i could not use the BDM, i could use a gdb-stub instead, but …
… i'd like to see if i can use the BDM because  have its tap inside chips,
so why don't to make it a chance ?

No one bothers with assembler these days because the C/C++ compilers of today do such a good job at optimizing the code.

We had all of those BDM pods etc for the 68340's etc and none of them worked properly. We even had this debugging kernel which was supposed to work over a serial port. It never worked properly either especially when you were debugging an RTOS. I'm glad that motorola became obsolete. They needed to be shown the door.

cheers



 

Offline bwat

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: se
    • My website
Re: m68332 BDM and …. gdb ???
« Reply #20 on: August 01, 2014, 06:55:58 am »
I remember a place I worked at years ago payed out $40,000 for a German made ICE just to debug code for a 68000 based product.

Lauterbach?
"Who said that you should improve programming skills only at the workplace? Is the workplace even suitable for cultural improvement of any kind?" - Christophe Thibaut

"People who are really serious about software should make their own hardware." - Alan Kay
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: m68332 BDM and …. gdb ???
« Reply #21 on: August 01, 2014, 08:06:56 am »
Geeze...  We debugged our 68k products (68000, 68020, 68ec030, 68331, 68302, probably more...) with a "rom monitor" (one breakpoint, deposit/examine/etc commands) and (later) a gdb stub over a serial line.  And the occasional oscilloscope...
 

Offline snoopy

  • Frequent Contributor
  • **
  • Posts: 767
  • Country: au
    • Analog Precision
Re: m68332 BDM and …. gdb ???
« Reply #22 on: August 01, 2014, 01:06:23 pm »
I remember a place I worked at years ago payed out $40,000 for a German made ICE just to debug code for a 68000 based product.

Lauterbach?

yep you guessed it ;) And they are still in business today !!
 

Offline snoopy

  • Frequent Contributor
  • **
  • Posts: 767
  • Country: au
    • Analog Precision
Re: m68332 BDM and …. gdb ???
« Reply #23 on: August 01, 2014, 01:15:29 pm »
Geeze...  We debugged our 68k products (68000, 68020, 68ec030, 68331, 68302, probably more...) with a "rom monitor" (one breakpoint, deposit/examine/etc commands) and (later) a gdb stub over a serial line.  And the occasional oscilloscope...

It wasn't my idea to spend that ridiculous amount of money just to debug some code on a 68K. I told them to ditch the 68K and go for the PC in an industrial case. At the same time I was working on other projects which used a PC motherboard running MSDOS in a flash based disk emulator. It was easy to develop and debug code using Visual C++ or Turbo C even under DOS. Numega Soft ICE gave me ICE like functionality using the 386 debug registers etc if I needed it.

Every joint I worked at that used 68K stuff had the same problem of having inadequate tools to debug their code simply because they didn't want to spend 30K or more to do it.

cheers
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68332 BDM and …. gdb ???
« Reply #24 on: August 01, 2014, 01:41:57 pm »
Geeze...  We debugged our 68k products  with a "rom monitor" (one breakpoint, deposit/examine/etc commands) and (later) a gdb stub over a serial line.  And the occasional oscilloscope...

i have put dbug32, such a rom monitor, inside the main flash of my tiny boards, it should be compatible with gdb-server as it is working as gdb-stub.
I am using dbug32 to upload things through the serial line in S19 format, also i have used the BDM interface to put dbug32 into the flash (on board flash programming through debug interface, something like programming a flash through a jtag)

i have realized also a big board with a 68060 on it, and in this case …. i have no BDM, but the 68060 should have a jtag port, i got its BSDL file from Motorola (opening a free customer care ticket) and it may be i could ever use it.

i am just looking for the best way to do debug
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf