1 2 Previous Next 17 Replies Latest reply on Jul 22, 2012 9:15 PM by user.free

    CyScript command line utility

    user_1078263
              Development would be much faster if CyScript could be called by command line. Is there anything similar?   
         
      Alternatively, would Cypress open CyScript source code?   
         
      Regards   
        • 1. Re: CyScript command line utility
          anand.srinivasan.asokan
                  You might want to create a tech support case and get clarification on this... Why do you need a command line version of cyscript?? the main reason behind this question is that once you generate the firmware, you will generate the script file from it... one time usage, end of story... so what is the advantage of having a command line version of it???   
          • 2. Re: CyScript command line utility
            user_1078263
                    Thanks aasi!   
               
            I understand your point. After building project in Keil I generate the .spt, copy it to the system32 folder and reset the board. I make this boring process because the firmware doesn't work as should downloading the .hex using CyConsole (the same .hex as script always works).   
               
            I'm using CY7C68013A (100pins) with Keil. Am I doing something wrong? Is there a fast way to download and execute the hex during development, instead of my boring script process?   
            • 3. Re: CyScript command line utility
              anand.srinivasan.asokan
                      I'm little confused by what you have mentioned... What do u mean when u say the .hex doesn't work but the .spt works... i mean the script just is a different way of downloading the .hex and there shouldn't be any difference between the two... can you explain the difference u r seeing???   
              • 4. Re: CyScript command line utility
                user_1078263
                        The hex firmware downloaded via CyConsole does not work. A simple led does not blink, for example. After downloading the hex it appears that the chip is not reseted.   
                   
                The spt generated with CyScript and copied into system32 folder works good, and the led blinks. The major difference is that here I do a hard reset (turn off 3.3V) after overwriting the spt file in the system32 folder.   
                • 5. Re: CyScript command line utility
                  anand.srinivasan.asokan
                          This behavior sounds a little unexplainable to me... bec there shouldn't be any difference between the two and both should behave the exact same way....   
                  However i suspect only one possible reason for this... Windows has the habit of saving separately files that are deleted or replaced in system32 folder... after u reset the board and the script loads, go to the system32 folder and do a compare (size) of the file there and the one you just now generated and placed there...   
                  If i remem well the folder where windows saves these system32 files is LastGood... I think the location is C:\Windows\LastGood... you might want to check that and remove it to if this is the case....   
                  • 6. Re: CyScript command line utility
                    user_1078263
                            I do not understand your point. The Windows stuff are all ok, no need to check what it is doing. The problem is when I download the hex using CyConsole.   
                    • 7. Re: CyScript command line utility
                      anand.srinivasan.asokan
                              All i'm saying is... .spt is just another way of downloading the hex and if the hex doesn't work properly then the spt should show the same behaviour... i just wanted you to confirm that a older spt is not being used accidentally...   
                      I've faced problems in the past while working with driver versions due to this behaviour of windows...   
                      • 8. Re: CyScript command line utility
                        tony.beckett
                                I have took over a project for a product that uses the .spt file to   
                        download the code to the device. I have had to buildup an development   
                        environment and have not been able to find the CyScript software.   
                        Please advise.   
                        • 9. Re: CyScript command line utility
                          douglas.lee

                          Regardless of downloading spt versus hex cyscript should have a command line interface.  Most companies run automated daily builds and need to be able to convert the hex output from the Keil compiler to spt without manually running cyscript.  Can you please provide the source for cyscript so we can make this trivial modification ourselves?

                          • 10. Re: CyScript command line utility
                            anand.srinivasan.asokan

                            Hi,

                               

                            automating using .spt is not as easy as it seems. Using the inf file you'll be using .spt like a system file. If you overwrite it in the system folder the OS will most probably load a older version from its backup. (there will be a folder called LastGood)

                               

                            If you place it in a common folder you'll be forced to point the device to the inf file everytime.

                               

                             

                               

                            My understanding is that .spt and .iic would be used only after the firmware (.hex) has been tested and the final build is ready. I'm slightly confused with your point. Please address the above concerns, let us figure this out further.

                               

                            Regards,

                               

                            Anand

                            • 11. Re: CyScript command line utility
                              douglas.lee

                              Hi Anand,

                                 

                              I understand your point about the .spt file being part of the driver install.  Our intention is not to overwrite it in the system folder.  We simply want to be able to create a batch file which will run the Keil compiler to create the .hex file and which will then run CyScript to convert the .hex file to an .spt file.

                                 

                              You're right that developers test the .hex files but other people run daily builds which create the .spt files which are ultimately shipped.  Those people are not going to interrupt their automated processes, which run these and many other steps, to manually run CyScript.

                                 

                              Regards,

                                 

                              Doug

                              • 12. Re: CyScript command line utility
                                arturas.isajenko

                                Hi,

                                   

                                In my work I also have to regenerate .SPT file after Keil project recompile often. At the moment I do this manually using CyControl app, command line tool to generate .SPT from .HEX would be very helpful. The good thing is that full source code (C#) of CyControl is available at "C:\Cypress\Cypress Suite USB 3.4.6\CyUSB.NET\examples\Control Center\" so when I will tired of doing this conversion manually maybe I will find a time to modify it to handle command line params, this should be not difficult...

                                • 13. Re: CyScript command line utility
                                  user.free

                                  By adapting and use this vbscript, you can achieve your goal without the command line version of CyScript.exe:

                                     

                                   

                                     

                                   

                                     

                                  set s = WScript.CreateObject("WScript.Shell")

                                     

                                  a = s.Run("CyScript.exe")

                                     

                                  WScript.Sleep 1000

                                     

                                  s.AppActivate a

                                     

                                   

                                     

                                  s.SendKeys "{ENTER}"

                                     

                                  WScript.Sleep 200

                                     

                                  s.SendKeys "slavefifo.hex{ENTER}{TAB}{TAB}{ENTER}"

                                     

                                  WScript.Sleep 200

                                     

                                  s.SendKeys "Y{ENTER}"

                                     

                                  WScript.Sleep 200

                                     

                                  s.SendKeys "%{F4}"

                                     

                                   

                                     

                                  Wscript.quit

                                     
                                          
                                  • 14. Re: CyScript command line utility
                                    content.librarian

                                    Hi !

                                       

                                    I'm currently working on Linux, so I don't have the tools like CyControl and CyScript.

                                       

                                    I have to develop a driver for Android, for a peripheral that uses an EZ-USB FX2LP chip.

                                       

                                    I need to do the Renumeration, to be able to send commands to the firmware.

                                       

                                    The thing is, I only have a .spt file, which is a CyScript file I suppose. I don't think there is a way for me to use that file on an Android device, since only CyScript can interpret it, and CyScript only runs on Windows. Am I correct ?

                                       

                                    So, I was wondering if since december 2012 ( this post: http://www.cypress.com/?app=forum&id=167&rID=73219), someone had found or created a solution to convert a .spt to a .hex ?

                                       

                                     

                                       

                                    Thank you very much

                                       

                                    Matthieu

                                    1 2 Previous Next