Home › ELEKTOR FORUMS › DigiButler (April & May 2008) › CFFlasher + TBLCF

ELEKTOR FORUMS

Please log in to post a reply or subscribe / unsubscribe to topics

Topic: CFFlasher + TBLCF

Author Post

HLaidet

61 posts

Frequent Visitor
Frequent Visitor

Read post 10-01-2010 13:05

Hello,

Now, my application with DigibutlerK3 exceeds 128kb.

I can not program the Flash memory MCF52259.

So i will use CFFlasher to program the microcontroller.

Here is a DLL that allows you to use CFFlasher with TBLCF.

This DLL "H_TBLCF.DLL" is only an interface who transfers CFFlasher calls to "tblcf.dll".

For using it, you have to copy "H_TBLCF.DLL" in folder "CFFlasher\BDM Protocol".
This will increase the list "BDM Communication".
Of course, "tblcf.dll" should be in "windows\system32" to be accessible from "H_TBLCF.DLL".

In addition, you can copy "Digibutler.cfg" and/or "DigibutlerK3.cfg" into "CFFlasher\cfg" to have the good "Target sytem".

I tested it only on Windows XP plateform.
It works with MCF52231(Digibutler), MCF52259(DigibutlerK3) and MCF5208(M5208EVB).

In CFFlasher interface, the z-order of windows is badly controled when the progress bar runs.
And sometimes, we think the soft hangs. But no, we only have to wait for the end.
In the case of CFFlasher ends with a Timout error, you can use "H_TBLCF_LOG.DLL" instead "H_TBLCF.DLL".
It is the same DLL but generates a trace file for debug.

Next step:
I think that i will make an application who uses Codewarrior algos (elf files) and XML configuration files.
It seems to be better, because CW Flasher uses a different method (large blocs transfered) and reduces BDMUSB stress.

Greetings, Henri

AttachmentH_TBLCF.zip

RufusVS

2 posts

Popping In
Popping In

Read post 28-10-2010 00:03

Greetings Henri,

I was very happy when I found the TBLCF project and your H_TBLCF.dll. It worked fine, but I had a question:

When I program the flash on my mcf5282 board using the PEMicro Multilink Pod and CFFlasher, it takes about 37 seconds to program and verify my flash.

However, when I use the TBLCF and H_TBLCF.dll with CFFlasher, it taskes about 3.5 minutes to program and verify. (Plus that strange progress bar you mentioned in your post)

Is this difference to be expected, or is there some configuration I need to do?

Rufus

HLaidet

61 posts

Frequent Visitor
Frequent Visitor

Read post 28-10-2010 18:56

Hello Rufus,

TBLCF is slower than P&E Multilink.
Daniel Malik explained 2 possible reasons:
http://forums.freescale.com/t5/68K-ColdFire-reg-Microprocessors/TBLCF-open-source-debugging-cable/td-p/7543


In addition, CFFlasher transferts small blocks (252 bytes) while internal RAM allows of bigger blocs.
So, there are too many transactions.

You can try "H_Flasher" who transfers large blocks.
Unfortunately, there is no verification operation (i will add this feature).

My test : MCF52231 + S19 file (size=0x19d00).
- CFFlasher + P&EMultilink
erase=2s, prog=13s, prog+verify=18s
- CFFlasher + TBLCF
erase=2s, prog=55s, prog+verify=65s
- H_Flasher + TBLCF
erase+prog=27s (it is 2 times faster than CFFlasher+TBLCF)

Greetings, Henri

RufusVS

2 posts

Popping In
Popping In

Read post 08-11-2010 19:22

Hi Henri,

I downloaded H_Flasher V1.2 and when the .exe file didn't run right away (requested re-installation), I recompiled it with Visual Studio Express 10.

We normally work with binary files so I used bin2s19.exe to create an S19 record file, compatible with H_Flasher.

However, I got a "Target error - can't write D2 register".

I've attached the screenshot.

Rufus

HLaidet

61 posts

Frequent Visitor
Frequent Visitor

Read post 11-11-2010 19:25

Hello Rufus,

I think the problem is:

In the "target init" function, the first instruction must be "RESET_HALT" to stop the microprocessor. otherwise it continues to run the program.
This instruction list is taken from the file "m5282evb.cfg".
It is a text file that i have not decoded correctly.

I used some config files ("mcf52231.cfg", "m5208evbe.cfg") to analyze their syntax.
And all the files i read began by the word "ResetHalt".
Except "m5282evb.cfg" that starts with "Stop".

The solution:
- The parser "ReadTargetInitFile()" knows now the word "Stop" and does the same thing as "ResetHalt".

In the same time, i added "verify" command.

I tried "H_Flasher v1.4" with:
- Digibutler MCF52231 internal Flash
- DigibutlerK3 MCF52259 internal Flash
- M5208EVB external Flash (AM29BDD160GB)

It is possible there are some other bugs.
I can't try with other micros.

Note: You should use exe in the "Release" folder when "Visual Studio C++" is not installed (because Debug libraries missing).


Greetings, Henri

Please log in to post a reply or subscribe / unsubscribe to topics

Subscribe now

Free Newsletter!

News, tips, offers, videos and more. Take out a free membership to Elektor.POST. In your email inbox each Friday!

 

Enter your Email address:

Follow Elektor

      

Act now!

FAQ

Before submitting questions, review our FAQ section!

Package Deals

Elektor Bundles

Check our Package Deals and save money! Discounts up to 19% now available!

Price Slashed

Elektor OSPV

This Open Source People Vehicle is perfect for factory halls, warehouses, hospitals, colleges, schools etc.