must have BDM to develop coldfire based applications?

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

must have BDM to develop coldfire based applications?

4,443 Views
bluehacker
Contributor III
hi, everyone.
I am a newbie for coldfire. recently ,I am going to develop one board for industrial control using coldfire v4 core cpu. maybe mcf5407. I am not sure some important issues for coldfire based development. hope some explanation.thanks advaned!
1. how to debug coldfire, must use BDM? how about JTAG?  during these years, I develop arm based board( s3c2410 etc) only using one parallel jtag cable, no need any emulators. for me , I only want to find one method to write the bootloader/OS image into flash. when I can write image into flash, I can use printk... to debug os kernel or device driver. can jtag do this?
2. if BDM is a must have. where I can buy one BDM supported v4 core in china( I am a chinese)? thanks!
3. the mcf54455evb and mcf5407evb contains one BDM emulator?
4. because CW is not free, I am just an amateur NO money afford the license fee. can  I use GNU tool to develop? how to connect BDM with GDB etc? 
forgive my poor english!
I am eagerly wait for your reply!
Labels (1)
0 Kudos
12 Replies

1,370 Views
bluehacker
Contributor III
hi, thanks all!
I maybe didn't express my question correctly.  if you develop one board using coldfire, at the beginning, the board is a "bare" board.you must burn image into flash from scrath. my question is if or not onemust use BDM do this? can use another way to burn flash from scrath?
is TBLCF support coldfire v2? how about v4?
I  will open eyes widely on the new update open source bdm!
0 Kudos

1,370 Views
ChrisJohns
Contributor I
Bootstrapping code into flash can be done in couple of ways. If you have the production ability you could program the flash before placement on the board. I have not seen this done but I assume it can be. The other way is to use BDM and here a few of solutions exist.

Some commercial tool suppliers such as P&E have products that can program flash incircuit. These do cost but can be cost effective on a production line where time and ease of use and important.

The open source BDM package can also program flash devices inciruit. There are a couple of ways to do this. The first is to program the flash directly via BDM. The BDM project provides a "bdmflash" command that supports a number of common flash devices. The internal flash in Coldfire devices such as the 52223 is currently not supported but there are plans to add this support in the near future. The bdmflash command will work with any of the supported pods and the TBLCF pod is one of these. Programming flash directly from BDM has a performance overhead. The other solution is to use BDM to download flash programming code into the RAM of the board or the Coldfire processor and then to run this code to program the flash device. I have used a boot monitor to perform this task in the past. This is fast as downloading code is fast and if you can a network connection on the board you can get the boot monitor to download an image from the network to program into flash.

The TBLCF supports v2 and v4 processors. The debug version B and B+ support is now available. The v4e or debug version C is also supported.

Regards
Chris


0 Kudos

1,370 Views
ChrisJohns
Contributor I
Hi,

No you do not need BDM to develop software on a Coldfire. Linux uses software such as a gdbserver or maybe even gdb these days runing natively to debug programs. Some commercial suppliers provide software only solutions using a serial port or ethernet. For an embedded application BDM is very nice and worth using. It has support such as watchpoints and hardware breakpoints.

BDM is not that different to JTAG on the ARM (serial interface etc) and I feel BDM has some advantages. As far as I know JTAG does not support debugging on the Coldfire.

To use BDM with the GNU tools and GDB go to the BDM project's web page and download the code:

 http://bdm.sourceforge.net/

GNU tools are available from many places. Check out Codesourcery for a generic set of GNU tools for the Coldfire. For a realtime OS with tools check out RTEMS (http://www.rtems.org/).

Regards
Chris
0 Kudos

1,370 Views
bluehacker
Contributor III
hi,Chris
thanks for your reply. you said develop coldfire applications  using software only solution. but how I can write bootloader or kernel image into flash without BDM? I am not a application software developer, I am focus on hardware and BSP development.  can write image into flash via serial rs232/ ethernet cable?
thanks again!
0 Kudos

1,370 Views
JimDon
Senior Contributor III
I disagree - you do need a BDM.
You can get a M52233DEMO for 49.00, and it will work.
You can use CFFLASHER to burn it.

Read this thread.

0 Kudos

1,370 Views
ChrisJohns
Contributor I
Hi Jim,

My reading of the initial post asked a question about the need to use BDM to debug software on a Coldfire. You do not need BDM in all cases. I also stated BDM is best when debugging embedded software. I always use BDM when not using Linux on a Coldfire and have some experience with BDM and its history.

I agree in this case BDM is best.

I had read this thread. I looked at the M52233DEMO board info on the Freescale website. It states a BDM pod is supplied yet that thread talks about a USB-BDM pod on the demo board. Which is it ?

I use a Axiom TBLCF pod with all open source software and very pleased with the results.

Regards
Chris


0 Kudos

1,370 Views
JimDon
Senior Contributor III
A P&E CF Multilink is on the board. I asked the question because on other demo boards that I used as a BDM the chip was socketed, so you could just pull the chip. When set the jumper the pins go to imput or tri-state.

You do the jumpers like the post instructs, solder in a 26 pin header and get a short peice of 26 pin flat cable.
This picture seems to show the 26 pin header in there, but I don't think it really is.

A M52221DEMO should work just as well, but it is 10 bucks more.

The statement "
One BDM (Background Debug Mode) "wiggler" cable" is an error I believe. There are parallel BDM cables, but they need a custom programmed GAL so they are not very cheap.

I have a M52223EVB, but that is 299.00 but it does come with a "real" P&E BDM, which normally costs 250.00, so if you need to board it is a good deal.

Sorry, I didn't mean to sound bossy :--).

0 Kudos

1,370 Views
ChrisJohns
Contributor I
Hi Jim,

Thanks for the detail and you did not sound bossy. I think BDM is a fantastic feature of the Coldfire processor family, but some people do not use it and use serial or ethernet debugging solutions.

I do not support the P&E USB solution in the BDM project on Sourceforge because P&E have not published the USB protocol. I could reverse engineer the protocol but I have a GPL solution in the TBLCF pod that works and I did not need to waste time figuring it out.

An issue with the P&E ref F parallel pods is faster speed Coldfires. I have had problems with them and a 5235 running at 150MHz. The P&E response was to use a more expensive solution of theirs. I did not and selected the Axiom TBLCF pod and I am very happy with it.

Regards
Chris
0 Kudos

1,370 Views
JimDon
Senior Contributor III
Well, the only thing is if you are developing the hardware and the software, you do need to burn from scratch at some point.

I have not tried the TBLCF, but I did not have such a good experience on HCS08 and HCS12 with the open source BDMs. The problem is that there is little support for them. I wish I could get Daniel to take a look at the TBDML for HCS12 as there is a problem - it can't read the registers when the PLL is engaged.

The P&E routines for their BDMs cost money, they do not publish the interface spec.

On the 08 and 12, they provide excellent support for CW and NOICE, and so far the CF  USB version has worked fine.




0 Kudos

1,370 Views
ChrisJohns
Contributor I
Yeap you do need to burn from scratch at some point. The BDM project has support to write to flash. I currently do not think the internal Coldfire flash is supported but it could be added. Or maybe Freescale will create a cflasher for the TBLCF. I have tended to download into RAM code using BDM to write to the flash.

I have not seen any problems with the TBLCF and given Axiom are selling this pod I am sure they would generate any updates if we needed one. I plan to port the firmware to the sdcc compiler at some stage so the GPL firmware would not need a costly commercial compiler.

Regards
Chris
0 Kudos

1,370 Views
JWW
Contributor V
All:

Some great discussion on BDM.

Couple of interesting bits...

A new "open-source" updated design is coming soon. Finishing firmware, will use hardware with slightly more memory and will allow the same basic hardware design to be used for S08, V1 ColdFire, and V2-V4 ColdFire.

As for the P&E BDM. I believe CodeSourcery does have a GDB stub driver for the P&E USB wiggler.

Probably need to draw more attention to that.. :smileyhappy:

Also, the 5445x board does have the P&E wiggler built into the board. As do a lot of our newer EVBs. And the 5445x board does have Uboot, so you can reflash the second flash with your test kernel, firmware, etc... and then flip switch 1 on the board and the board will boot from the other flash. This allows you to keep your protected Uboot on the small boot flash, and then use the other flash for development. Technically, you don't need a wiggler or probe at all, if you just use Uboot to download and PrintF, Printk, etc... for debug messages.

Hope this helps...

I'll post when the new open source design becomes available.

-JWW
0 Kudos

1,370 Views
ChrisJohns
Contributor I
Thanks for the update about the new pods. This is excellent news and I look forward to seeing them they become available.

If you are updating info about the CodeSourcery P&E support, could you please also point out the BDM project on Sourceforge and its support for TBLCF. I think the more options developers have the better.

The BDM project's gdbserver should work with the CodeSourcery GDB.

I am please to see BDM integrated into the eval boards how-ever the P&E wiggler is closed source with a specific license. The completely open nature of the eval boards in the past has been a strength.

Regards
Chris
0 Kudos