I have been trying for some time now with no success. I have tried flashing both Stationery built code as well as the CMX provided USB Mass Storage stuff to the M52223EVB (Rev B Board). I have religously followed (I think) the Targeting Coldfire (PDF) document.
Each time I try do an erase I get a message saying failed to write - error in connection. So I presume it can't be a badly built project cause the erase must happen before attmepting to load the Flash.
I then tried to use the Hardware Diagnostics option - I get:
" Connect Failed : Can't conenct to PE micro via USB "
There must be something simple that I am missing out on.
Does the J1 jumper of BDM_Config or JTAG have anything to do with this. I have tried both - same story.
All my code generated under Console Debug gets things like the PIT, ADC etc running quite nicely.
Maybe I have not read an important document prior to this??????
That tall building down the road looks like a good option - I am getting desparate.
I am unable to program flash on my board. This used to work, but CodeWarrior crashed a few days ago and since then I haven't been able to program flash. I am running CodeWarrior v6.4 build 4, target is MCF52230, connected via USB-TAP.
Flash erasure seems to work ok. I get this log:
====================================================================== === Execute: Erase === Timestamp: Thu Sep 20 12:44:41 2007 === Flash Device: CFM_MCF52230 === Flash Organization: 4Kx32x1 === Flash Mem Start Addr: 0x00000000 === Flash Mem End Addr: 0x0001FFFF ====================================================================== Using Algorithm: CFM_MCFCOMMON.elf
Loading Flash Device Driver at: 0x20000000 Flash Driver Buffer is at: 0x20001FB0 Flash Driver Buffer Size is: 0x00006050 Done
Programming 0x00002747 bytes of Target Memory at 0x00000000 Flash Programmer: Flash driver reports the following error(s): Operation Unsupported Timed Out Chip reported Low VPP Error Status Chip reported error during erase Chip reported error during program Device Protection Error
Attached is the XML file I got from the installation CD. I eventually edited the file myself and changed the base address for Flash to 0000_0000 up to 0000_3FFF and then all worked fine. So just need to hunt around for the reason why the mem stick not being reocognised.
Had trouble attaching a XML file so changed it to a .txt file.
First try the flash stick on a PC. Then plug it into the EVB and verify that the LED on the stick comes on. If not than you still have some kind of Vbus issue. Mearsure the voltage on the center pin of the Vbus jumper and make sure you have +5V.
If your problem has to do with the flash configuration, I had a similar problem. I don't think my xml file was being read properly, but you shouldn't have a problem setting it up manually. Your original problem didn't look like the same thing, but I figured I'd throw this out there.
Here are the settings I use in the flash programmer in CW. I'm working with a similar board (M52235EVB) and the memory settings are basically the same.
I have run a hardware test - on the CD provided by P&E. Tests out OK.
I went back and tried again - no joy. I get the feeling I have either got an incorrect config or initialisation file as I get an erro in the Status line showing:
" Error : could not write Flash driver to file - see details etc"
If I call up the Show Log option then the Flash Program Logger shows
Execute : Erase
Flash Device : CFM_MCF52223_48MHZ
Flash Organization : 8Kx32x1
Flash Mem Start Address : 0xFFE0000
Flash Mem End Add : 0xFFE3FFF
using Algorithm CFM_MCF52223_48MHz.elf
then it shows an error - so this leads me to believe it is an initialisation file that is the problem.
I have used Load Settings to select the file which appears to be correct as this then shows the 8Kx32x1 Flash organization.
What file extension should one be using - am worried that I may have the correct file name but chosen one of incorrect file extension or does the system take one to the correct subdirectory for file selection.
I was also a little confused as to why the Flash did not start at zero. It certainly bombs where the device driver is being loaded - according to the log.
I will carefully check the files - they certianly have not been tampered with after downloading the stuff of the CD.
I am still trying to get my (now highly over taxed) brain around this USB stuff - finding that understanding the protocol and seeing how this integrates with the Coldfire stuff quite heavy going - hence the query about some RAM based stuff that will allow me to easily follow through the USB setup and identifying the attachment of a device on hte Console Debug - any example stuff avail.
I'll keep plugging away - thanks again for the assistance - gretaly appreciated.
First all the console debug target that I know of are RAM based, meaning that they have linker file assocating all code and data to RAM. Beware that as soon as we get flashing working the next error you will get is that some address will not map to FLASH.
In the project settings, (the little button to the right of the target name) if you click on the right panel at the bottom are debugger settings. Select the remote debugger and in the top right of the screen is a button called "edit connection" select port 0 and increase the speed from 0. (mine has two).
Try flashing again.
If this does not work exit CW and with the debugger plugged in, go into hardware manager. (my computer, properties) and find the jungo USB driver. do an install. exit and disconnect the pod and you should get a new hardware found indication. Let windows reinstall. (you shouldn't need any CDs or such)
I have seen both these issues. I think the first is because you have a nice machine.
The second, I think is some form of windows corruption. I is like the installed driver is half there. Enough of windows to think is OK, but not enough for it to function.
I too have many issues burning flash on a Coldfire 5485 EVB from Phytec. In my case, the flash was upgraded to Intel 28F128J3D. This part is not supported properly in the Codewarrior IDE for this EVB. Since it is a multiple vendor issue, all vendors dutifully absolve themselves of responsibility. I'm the developer left with the non-functional tools at great cost.
CFFLASHER is a Windows tool that can be an alternative to the IDE flash environment. It talks to a P&E dongle but it has limitations in that it only writes to flash at the addresses the file is compiled for (ie where the S-records say to store). The IDE has a nice feature in that it can shift the image into address other than what it is compiled for. It's probably still worth it to try CFFLASHER to prove connectivity since the IDE can be problematic. I believe CFFLASHER is available from the Freescale website. You might try erasing and flashing your EVB using this tool just to prove connectivity to the P&E dongle. Keep in mind the dongle needs both lights on for it to be seen by your PC and the IDE. If your PC goes into powersave/sleep mode at any time, the P&E dongle will power off and it will need to be rescusitated by unplugging and replugging it to the USB after waking up your PC. Also, some PC's don't have enough drive current for the USB dongle to work properly. The P&E dongle is probably on the edge and requires the max. On some PCs the front USB ports have different drive current than the rear you might try switching your USB connection. Keep in mind you can only run CFFLASHER or the IDE because they both want to talk to the dongle so remember to exit the program you are not using. Fun stuff.
One very interesting experience I had recently was as follows: I had been using the Demo board with the embedded P&E debugger on a Athlon P1800+ WinXP system quite successfully for several months. Never had a single problem connecting. Then about a month ago I made the apparent mistake of upgrading my PC to a nice new Intel Core 2 duo machine. I did an identical install of CW6.3 and used the exact same project directory. On the new machine I could not get any reliable communication to the debugger. I could get it to do a chip erase about 70% of the time, but it was unreliable and seemed to take a long time. I could NEVER get it to program a full part.
After beating my head against the wall for some time, at the advice of a coworker, I tried connecting to the debugger through a USB 1.1 hub. Amazingly this fixed everything. It now works perfectly again. I've repeatedly verified that removing the hub causes the problems to reappear.
I did exchange e-mails with somebody at P&E and they claimed to not know of this issue. My suspicion is that there is some timing issue with their USB driver and it gets into trouble on very quick machines. The hub adds just enough delay to get things back in order. FYI I also tried disabling one of the cores on the dual core CPU without seeing any improvement.
I had a problem similar to what was reported with needing to reload the driver. This was only an issue when I upgraded from the preview version of CW6.3 to the release version. I did try it here but it was no help as this was a clean install of the the release version.
I have also tried the reinstallation thing - no joy there. Tried again last night to do a simple stationery generated prog and target to ROM. Then tried the configuration by loading settings, seeing all the FLASH stuff (Not sure if the config is correct shoiwng Flash not starting at 0000_0000), then trying an erase - no joy.
Tried ther hardware diagnostics - no joy - comms faliure.
My logic tells me (If there is any left) that a simple erase or hardware diagnostics run should not have anything to do with the program so even if that was not 100% correct, one should still be able to erase or do a walking one's etc.
Any other ideas - found that tall building and about to leap.
Well that brings me to my next question and set of woes.
I have had a look at the Remote Debugging Settings and note that under the PEMicro_USB config one can select USB0 USB 1 USB 2 or USB 3 - the default being 0.
Had a look under the System on my PC under Hardware and note that my PC has a HUB - has 5 USB ports - then also noticed that there is a Jungo (Driver?) showing Multilink 2.0 Properties - this reveals P&E Microcomputer Systems Inc - so Driver appears all there as I tested things when reinstalling the driver.
So does this all mean that I have to select the USB 0-3 - tried 0 and 3 and still cannot connect.