How to start "Xilinx SDK" from command line instead of from Vivado "File->Launch-SDK" Menu? - vivado

I'm wondering how to start "Xilinx SDK Eclipse GUI" (XSDK) directly from the command line?
Currently, I'm launching XSDK by first launching "vivado", and then going to the "File->Launch SDK" menu. However, this is a bit cumbersome to always open Vivado first, just to open "Xilinx SDK". What I want to do, is launch "Xilinx SDK" directly from my Git bash Shell under windows 10 and then open the previous project under "project_1.sdk" and to continue with what I was working on last time.

My Git Bash Setup:
#~/.bashrc:
export PATH=/c/Xilinx/Vivado/2017.3/bin:$PATH
export PATH=/c/Xilinx/SDK/2017.3/bin:$PATH
Then:
$ xsdk -workspace your_project_dir.sdk &
Also:
$ xsdk -h
Display Options:
-help
Help -- just display this message and quit.
-version
Display Version and quit.
-batch
SDK Tcl Batch Mode.
-wait
Wait for SDK to complete.
Options:
-workspace <Workspace location>
Specify the Workspace directory for SDK projects
-hwspec <hardware specification file>
Specify the XML file to load.
-bit <bitstream file>
Specify the Bitsteam file to use for programming FPGA
-bmm <bmm file>
Specify the BMM file to use for BRAM initialization
-batch -source <tcl script file>
Specify tcl Script file to executee all commands in SDK batch mode
{-lp <repository_path>}
Add <repository_path> to the list of Driver/OS/Library search directories.
-eclipseargs <eclipse arguments>
Any other arguments that should be passed to Eclipse.
This should follow all other SDK arguments.
-vmargs <java vm arguments>
Any other arguments that should be passed to Java VM.
This should follow all other SDK arguments.
Also useful:
SDK Command Line Batch Mode

The Eclipse/SDK can be launched in these two other ways
(1) Launch from the Vivado TCL Command Line:
Going from Vivado to SDK often has these steps
- File > Export (Hardware)
- File > Launch SDK
Each of these commands prints information in blue text in the Tcl Console.
Those commands can be copied into a tcl script and run from Tcl Console.
By default Tcl runs from this folder
C:\Users\WinUserName\AppData\Roaming\Xilinx\Vivado
If the script is placed there (e.g. zz1.tcl, or just zz1)
Then it can be run from the Tcl Console as
source zz1.tcl
That will execute the commands in zz1.tcl -> export hardware and launch the SDK
(2) Or, run Eclipse/SDK from Windows, then select the SDK folder:
The SDK can be run directly and can be found here:
C:\Xilinx\SDK\2019.1\bin\xsdk.bat
When it runs it will ask for a Workspace
Click [Browse] and navigate to the .SDK folder in the Vivado project
It will open and run as usual, without Vivado running, etc
Note: I have noticed that Vivado/SDK can be temperamental about how and when project folder contents are changed. Including if the SDK is launched and another SDK is already running in that folder. In some cases, the easiest recovery is to rename the ~corrupt SDK folder, create a new HelloWorld project, get HelloWorld running, and then update files into the new folder.

Related

View logs of electron-builder packaged AppX package

I've created an Electron app and I'm packaging it using Electron Builder. I'm using the AppX (Windows Store) format for Windows.
How can I view the app's logs i.e. console.logs from main node process?
I need to be able to view logs for the packaged version of the app as the app launches fine without AppX packaging, but fails with it.
On macOS, Linux and 'Windows with NSIS' instead of AppX, launching the app via the command line is sufficient to view logs
I've already tried launching AppX packages from the command line:
The only way to launch Windows Store apps from the command line is to follow these steps:
From here
Run explorer.exe shell:AppsFolder in cmd
Find the app, and create it's shortcut on the desktop
Open the shortcut's properties and copy the "Target" field
Run get-appxpackage > list.txt in PowerShell
Open the file (located in %USERPROFILE%)
Find and make a note of the PackageFamilyName and InstallLocation corresponding to the Target name copied earlier
Open the file AppxManifest.xml present in the InstallLocation
Search for "Executable=" in the file, make a note of the value of "Application Id" above the line containing "Executable=".
Run the command explorer.exe shell:appsFolder\<PackageFamilyName>!<Application Id>, substituting <PackageFamilyName> for the Package Family name noted earlier and <Application Id> for the Application Id noted earlier to run your app.
This works but doesn't actually connect node's stdout to the terminal
I don't know how you can see the log but the part where you launch the app from the command line seems like overcomplicated.
Here is a thread on how to launch an app from an appx/msix from the command line properly:
How to properly set AppExecutionAlias so the program could be launched from command line?

How can I suppress “Terminate batch job (Y/N)” confirmation in PowerShell?

When I press Ctrl+C in PowerShell, I receive:
Terminate batch job (Y/N)?
Similar to https://superuser.com/questions/35698/how-to-supress-terminate-batch-job-y-n-confirmation, except for Windows PowerShell.
Does PowerShell provide any more control over batch jobs than what CMD does?
The behavior is neither caused by PowerShell nor can PowerShell change it (as evidenced by the PowerShell source-code repo not containing the prompt message).
The behavior is built into cmd.exe - Powershell, in this case, is calling a .cmd file (batch file), which is interpreted by cmd.exe.
If you explicitly control the invocation of the target executable, you can fix this by moving to Powershell - note this has its own considerations, see below.
If you do not explicitly control the invocation of the target executable, you're out of luck (unless you're willing to install third-party cmd.exe replacements) and must press Ctrl+C twice in order to terminate execution.
A[n ill-advised] workaround is to modify the cmd.exe binary - see article with instructions on how to patch the cmd.exe executable in order to suppress the prompt. Additionally, you can post a feature request on GitHub to request that this behavior be fixed at the source, though that is unlikely to happen for reasons of backward compatbility.
To demonstrate the behavior:
The examples assume that Node.js is installed and that node.exe is therefore in your PATH:
First, invoke node.exe directly, with a tight loop that requires you to press Ctrl+C to terminate the process.
PS> node -e "while (true);"
As you'll see, pressing Ctrl+C instantly terminates the process - no confirmation prompt.
Now, let's create a sample batch file that invokes the same command and invoke that batch file:
PS> "#echo off`nnode -e `"while (true);`"" | Set-Content test.cmd
PS> ./test.cmd
As you'll see, pressing Ctrl+C now presents the undesired Terminate batch job (Y/N)? prompt. (You'd get the same behavior if you ran the batch file from cmd.exe.)
To demonstrate that gulp is a cmd file:
You say you're running your command via gulp's CLI.
On Windows, the entry point for the gulp CLI is gulp.cmd [see update in the bottom section] - i.e., a batch file. That is how it works in general for npm-package "binaries" (executables) implemented as either JS files or shell scripts.
That gulp invokes gulp.cmd can be verified as follows:
# Execute from a project folder that has `gulp` installed as a dependency.
# If `gulp` is installed *globally*
# Note: CLI `npx` requires npm version 5.2.0+
PS C:\some\NodeJs\project> npx where gulp
You'll see something like:
C:\some\NodeJs\project\node_modules\.bin\gulp
C:\some\NodeJs\project\node_modules\.bin\gulp.cmd
Note that where.exe also lists the extension-less Unix-shell script, ...\gulp; however, from cmd.exe / Powershell such a shell script isn't directly executable, and it is ...\gulp.cmd - the batch file - that is executed.
(If in doubt, place a command such as #set /p dummy="Press a key" at the start of the gulp.cmd file, and you'll see that this command executes when you invoke gulp without the .cmd extension.
Also note that there is no gulp.exe.)
More generally, on Windows, a project's node_modules\.bin subfolder contains pairs of CLI entry points for the CLIs that come with packages that the project depends on locally:
node_modules\.bin\<some-cli> is the Unix shell script (whose executing interpreter is controlled via its shebang line).
node_modules\.bin\<some-cli>.cmd is the helper batch file for Windows.
Updates and future considerations:
In the context of npm modules, the problem would go away if a PowerShell script (*.ps1) were used as the helper script on Windows. There are tickets for npm, yarn and similar software to do this. There are also some drawbacks:
*.ps1 files aren't directly executable from outside of PowerShell, notably from cmd.exe and File Explorer (and changing that is nontrivial).
PowerShell still hasn't fully replaced cmd.exe as the default shell, as of Windows 10 (and won't anytime soon, if ever).
When called from PowerShell, a *.ps1 file would be found and run in-process, so a possible solution is for the npm project to also provide *.ps1 helper scripts, which would take precedence over *.cmd files of the same name.
Update:
Recent versions of npm (verified in 6.14.10) indeed DO install such *.ps1 files.
Alternative package manager yarn, since v2 does not seem to use batch files anymore at all, so the original problem is bypassed there; (v1, by contrast, still uses batch files (only); upgrading from v1 must be done on a per-project basis see the migration instructions).
As the other answer notes, the correct fix is to replace cmd scripts with ps1 versions.
However another workaround for users of the Hyper shell is 'Hyper yes', a plugin that automatically hits y for you when the prompt comes up.
best way to avoid it is to not start it, in my case, is not to type npm run devStart but instead type nodemon ./server.js localhost 3000
here's how it looks like
#echo off
start /w "" "C:\myfile.bat" 2>nul|findstr /i "termin"
if errorlevel 1 goto bypass
:bypass
echo hello by stexup YouTube channel!
timeout /t 5 >nul

Installing SoapUI on Amazon AMI Linux command line

I need to install and run SoapUI on linux OS (Amazon AMI linux).
This is a command line version (no GUI)
I was able to successfully download and unzip SoapUI tar using the below commands
Download SoapUI installation files
wget http://freefr.dl.sourceforge.net/project/soapui/soapui/5.0.0/SoapUI-5.0.0-linux-bin.tar.gz
Extract Contents
tar -xzf SoapUI-5.0.0-linux-bin.tar.gz -C /opt/
Install SoapUI
cd /opt/SoapUI-5.0.0/bin/
After this when i run the following command:
./soapui.sh
I get below exception
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:842)
at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:697)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.r...(EventDispatchThread.java:91)
Is there something missing here or any other commands needs to be called ?
SoapUI itself is a graphical tool, and the main application isn't going to like running without a graphics display.
When I've run the SoapUI stuff on a Linux server without X11, it's been the mock service facility that I'm after - I use it to provide substitute SOAP or REST services for automated testing etc.
The mock service runner runs well without an X11 server - you just have to tell java not to look for a graphical user interface.
So you add -Djava.awt.headless=true to the command line:
./mockservicerunner.sh -Djava.awt.headless=true
If you just to that it will give you a 'help' output, because this tool is designed to use an existing SoapUI project file to provide preconfigured responses, rather than for interactive use.
The alternative is to use X-Forwarding, so SoapUI runs on your server, but the UI is displayed on your local workstation. I've never done that (because, as I said, I'm after the standalone interaction for automated testing), but this page has some detail: http://blog.ashwani.co.in/blog/2013-01-10/soapui-mockservicerunner-on-linux-without-x-config/
(it also mentions the 'headless' option for mockservicerunner.sh.
This page has some detail about setting up a project in SoapUI first before using it for one of the automated tools (loadrunner in this case): http://www.soapui.org/load-testing/command-line-execution.html
I just installed and executed SoapUI in AWS (Red Hat) without using any graphical interface:
1.- Download SoapUI directly from soapui.org; search for the latest Linux version, copy the link address and download the software into any Linux directory using the wget command. This should have downloaded an installation script file (for example, SoapUI-x64--5.3.0.sh).
2.- Execute the previous installation script from command line and answer the installation prompts. Once you have finished go to the directory where you elected to install it and verify that you have all the folders and files (bin, lib, etc.).
3.- To run SoapUI from the command prompt, go to your SoapUI home directory and execute an instruction like this:
sh bin/testrunner.sh -s"Your Suite Name" -c"Your Test Case Name" -f/your/output/path/ /your/project/path/your-soapui-project.xml

How to create files and folder in Atom using the command line?

I was watching a speedy workflow tutorial about Atom text editor, and saw how the guy uses Linu commands like ls (to check the files in the directory), touch (to create files eg. style.css) and mkdir (to create folders). Now in my Atom editor I am able to open the command line using the following command.
CTRL + SHIFT + T
Now in my command line the default windows command line opens up, I am able to create folder using mkdir, but the commands touch and ls don't work, which makes me wonder weather Atom has its own command line?
See the SCREENSHOT to see how this guy is creating folders, files and using the ls command.
So my question is, how do I create files in Atom? How do I get the touch command to work?
It looks like the tutorial is using the Term2 package for opening a shell within the editor (http://code.tutsplus.com/courses/speedy-workflows-with-atom/lessons/term2). Since you seem to be able to open a terminal using the described screenshot, you seem to have the Term2 package installed - so far so good.
This package opens a standard command window within the editor. The tutorial seems to be using Linux or Mac OS X as the operating system. If you're running Windows, you will only have the Windows CMD interpreter available.
Windows does not natively support the touch command (but it has a mkdir command). There is a unxtools project that provides some of the common Gnu tools. If you install that, you should be able to run touch from the Windows command shell as well. More details can be found here.

linux eclipse: run a shell command as the pre-build command

How can I have the pre-build step in eclipse/CDT (Linux) run a simple shell command, echo specifically. I think eclipse has a screwed up value for PKG_CONFIG_PATH and want to see what Linux thinks the value is.
Under the covers, Eclipse uses "make". You can simly edit the project's makefile:
help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm
You can also create an:
"External Tool", which is up there beside the Debug and Run buttons in
the toolbar. Then I tell the external tool to run the shell with the
configure script and any of it's arguments as arguments to the tool.
http://www.eclipse.org/forums/index.php/t/61866/

Resources