Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CyScript command line utility

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



CyScript command line utility
Moderator:
RSKV

Post Reply
Follow this topic



CyScript command line utility

grubin posted on 05 Oct 2009 7:42 AM PST
Member
4 Forum Posts
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


Re: CyScript command line utility

aasi posted on 07 Oct 2009 04:50 AM PST
Cypress Employee
1090 Forum Posts
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???

Re: CyScript command line utility

grubin posted on 07 Oct 2009 07:20 AM PST
Member
4 Forum Posts
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?

Re: CyScript command line utility

aasi posted on 07 Oct 2009 11:51 AM PST
Cypress Employee
1090 Forum Posts
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???

Re: CyScript command line utility

grubin posted on 07 Oct 2009 12:28 PM PST
Member
4 Forum Posts
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.

Re: CyScript command line utility

aasi posted on 07 Oct 2009 06:22 PM PST
Cypress Employee
1090 Forum Posts
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....

Re: CyScript command line utility

grubin posted on 08 Oct 2009 07:25 AM PST
Member
4 Forum Posts
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.

Re: CyScript command line utility

aasi posted on 08 Oct 2009 12:43 PM PST
Cypress Employee
1090 Forum Posts
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...

Re: CyScript command line utility

tonybeckett posted on 29 Oct 2009 07:07 AM PST

1 Forum Post
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.

Re: CyScript command line utility

Stud Muffin posted on 06 Oct 2011 12:40 PM PST
Member
2 Forum Posts

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?



Re: CyScript command line utility

aasi posted on 09 Oct 2011 12:59 PM PST
Cypress Employee
1090 Forum Posts

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



Re: CyScript command line utility

Stud Muffin posted on 10 Oct 2011 01:22 PM PST
Member
2 Forum Posts

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



Re: CyScript command line utility

arturasi posted on 13 Dec 2011 11:35 PM PST
Member
6 Forum Posts

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...



Re: CyScript command line utility

Tom2068 posted on 22 Jul 2012 07:15 PM PST

1 Forum Post

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

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20