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.
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.
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?
TBLCF is slower than P&E Multilink.
Daniel Malik explained 2 possible reasons:
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)
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.
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 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).