6 Replies Latest reply on Apr 9, 2010 6:18 PM by anand.srinivasan.asokan

    Can't get CyConsole to transfer HEX file?

              Ultimately I want to create a script file ... but first, I need to get CyConsole to actually download my hex file to my device (FX2). No matter what I have tried, I always get a "download failed" error.   
      If I select the "EZ-Usb Interface" .... and on that dialog I click "Download" and point to my hex file .... the hex file loads and my device resets and renumerates as it should.   
      Also, if I use the CyControl application, and on that menu I select "Program FX2" and point to my hex file .... everything works properly.   
      But, the "Record" option will not track those operations to create a script file, it will only track actual manual File Transfer operations.   
      I have tried every endpoint and configuration and no matter what whenever I select "File Transfer" there will be a long pause, and then "Transfer Failed" error message.   
      My hex file is 8402 bytes in size.   
      Any idea WHAT I need to do to get my hex file to load to my device through the File Transfer method????   
      Thanks much for any suggestions or advice.   
        • 1. Re: Can't get CyConsole to transfer HEX file?
                  Okay ... I was making a dumb mistake .... BEFORE doing the File Transfer I needed to put the cpu into reset mode.   
          So, now I do a 0xA0 bRequest and send a 0x01 to put the cpu into reset mode, and THEN when I do a file transfer and point to my hex file .... the file does download successfully ... and then I do another 0xA0 bReguest sending a 0x00 to take the cpu out of RESET .... BUT .... still my code does not run (I do not get a renumeration).   
          If I select "Download" from the EZUSB Interface panel, then I see the 0x01 get sent, then my file is sent, and then the 0x00 is sent and my device renumerates properly and everything is working.   
          WHY can I not get this to work when I manually use the "Transfer File" option instead of the "Download" option???? Is there something else that I need to specify??   
          By the way, as I said in the first post, my hex file is 8402 bytes, and I am surprised that this works even with the Download function as I assume that I am loading to the onboard device ram which I thought just had 8K of program space??   
          • 2. Re: Can't get CyConsole to transfer HEX file?
                    you have said you get download failed error... but in the next line you mention download is working properly... when are you getting the download failed error????   
            cyconsole is capable of keeping track of transfers and recording them even when download button is used... have u tried that...   
            the file transfer method of cyconsole works only with files upto 4092bytes... you can find this information in the release notes of suiteusb3.4... regarding the 8k internal RAM are you using one of the older chips coz fx2lp has 16k internal RAM.... there is a lot of things to be sorted out and if you need help please post composed messages with just the doubts and problems... we'll take it one step at a time...   
            • 3. Re: Can't get CyConsole to transfer HEX file?
                      Thank you for your reply ... it really seems to me that the Cypress documentation has got to be the worst I have ever seen!   
              Regarding your comment about "Download" .... using CyConsole, if I activate the EZ-USB interface and from the EZ-USB dialog I select "Download" and point to my HEX file ... it will properly download. BUT, if I stay in the main CyConsole interface and try to download my hex file using "Transfer" ... it will not work.   
              In any case, I downloaded and was using "Cypress USB Suite" ... I could not find anywhere the files that were being referenced .... it turns out that in order to get those files I had to ALSO download and install the Cypress DVK seperately ... THEN ... when I did that ... I found in the bin folder the CyScript program (which is NOT included in the USB Suite download for some strange reason).   
              Sooooo .... using the CyScript program I WAS able to create a script file by pointing to my hex file. NOW, I can go into CyConsole and select my script file, and run the script and my firmware properly downloads to my device, and the device then does a renumeration (which is what I want it to do after my firmware download).   
              MY PROBLEM NOW IS .... now, I can NOT get that script file to be executed from my INF file!!! (grrrrrrr arrrrgghhhh) .....   
              I have just simply modified the CYUSB.INF file by only just adding my VID/PID and by adding this section (I have renamed my script file to CYUSB.spt):   
              I have the CYUSB.INF file in the \windows\inf folder   
              I have CYUSB.SYS and CYUSB.SPT in the \windows\system32\drivers folder   
              I can use CyConsole and point to that script file, and run the script and it downloads and my device renumerates.   
              However, if I just attach my device with that INF file active ... my device does NOT renumerate, which tells me that the script file did not execute.   
              I have also tried this:   
              And that does not work either!   
              HELP .....   
              • 4. Re: Can't get CyConsole to transfer HEX file?
                        By transfer i believe you are talking about file transfer method... download button parses the hex and send the firmware part of the hex file using A0 vendor command... when you do the file transfer method it actually takes the whole hex file and shoves it down to the device which is not how this is supposed to be done... the entire operation is different as you can see...   
                What OS are you running i.e. xp32, vista64 etc etc.... I remember script successfully running in all 4 OS variations...   
                • 5. Re: Can't get CyConsole to transfer HEX file?
                          Thank you for your reply .... yes, I did eventually discover the difference between "Download" and "Transfer" ..... so, I am past that issue, and I now have a script file that will work correctly from within CyConsole.   
                  I am using regular XP (32bit, SP2) .... and I can NOT get the script file to execute from within my INF file.   
                  I inserted the relevant lines from my INF file in previous message ... do you see anthing that is wrong or missing that would explain why the script file does not execute on device attachment??   
                  • 6. Re: Can't get CyConsole to transfer HEX file?
                            upload your inf file here... i'll check it out and let you know....