- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Im new to Quartus II and I read the forum, but I cant still find the answer to my problem. I have a need to run TCL scripts from Command Promt CMD (Windows Vista), In my script Im accessing the HW with command "get_service_paths master" and this Fails. I have already added "load_package systemconsole". In CMD i run C:\>quartus_sh -s tcl> get_service_paths master invalid command name "get_service_paths" tcl> In System-console It works... % get_service_paths master {/devices/5SGSMD5H(1|2|3)|5SGSMD5K1|..@1#USB-0/(link)/JTAG/(110:132 v1# 0)/phy_0/master} Why this error? Thanks for all your timeLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
get_service_paths is a system console command and can only be run from System console. It won't work from the quartus shell.
The system console executable can be found at C:\altera\*\quartus\sopc_builder\bin\system-console.exe . Maybe you can run that from Windows command prompt- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Maybe you can run that from Windows command prompt --- Quote End --- I'm not sure that the Windows command prompt will work, since it probably does not have paths setup correctly. System Console can be started from the command-line by using the Start menu to get to the "NIOS II Command Shell" (Cygwin shell) and typing system-console. Cheers, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually it works if you start it from the command line in the right path. It doesn't seem that System Console needs any environment configuration from Quartus. On my system it is in C:\altera\*\quartus\sopc_builder\bin\system-console.exe but it may be different in the new versions without SOPC builder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Actually it works if you start it from the command line in the right path. It doesn't seem that System Console needs any environment configuration from Quartus. On my system it is in C:\altera\*\quartus\sopc_builder\bin\system-console.exe but it may be different in the new versions without SOPC builder. --- Quote End --- As Im new to the Altera/quartus environment it took some time, but I think I found the solution to my "Thread" question. I missed to run command "initialize_systemconsole". So in CMD I can now run... quartus_sh -s load_package systemconsole initialize_systemconsole get_service_paths master This works fine!:) But now Im stuck on command "open_service".:( The reason for me running in CMD is that Im calling CMD from C# code using a process call. I tried the same routines with system-console but I lost the handle to the process and I could not control it. Thats why I'm trying with CMD. When I run tcl> initialize_systemconsole Info (345047): Preparing to create a connection to SystemConsole. This may tak several seconds. Info (345009): A connection to SystemConsole was successfully established on p t 63525 tcl> get_service_paths master {/devices/5SGSMD5H(1|2|3)|5SGSMD5K1|..@1#USB-0/(link)/JTAG/(110:132 v1# 0)/phy /master} To me this indicates a successfull connection to Systemconsole, anyone knows what I'm doing wrong? Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did a reply, but it seems to be lost...
The answer to the thread question is that I forgot to "initialize_systemconsole", I'm a beginner ;-). So type in CMD quartus_sh -s load_package systemconsole initialize_systemconsole get_service_paths master This work OK!, but next step is to "open_service" and this fails. According to initialize_systemconsole functionality... ************************************************************************* ------------ Description: ------------ Initializes the connection to System Console and registers all applicable System Console commands in the current interpreter. This command must be run before any other System Console commands can be executed. ************************************************************************* Here it states that "all applicable System Console commands in the current interpreter." But still "open_service" fail, it works OK when runned in "system-console.exe". I can also add that I succeeded to run "claim_service" in CMD. If that is to any help. Thanks for any assistance.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To close this thred.
To be able to call scripts, run commands via C#, process and StandardInput, StandardOutput. You need to use system-console.exe with arguments "--disable_readline --cli", like this... ProcessStartInfo processStartInfo = new ProcessStartInfo("system-console.exe"); processStartInfo.RedirectStandardInput = true; processStartInfo.RedirectStandardOutput = true; processStartInfo.RedirectStandardError = true; processStartInfo.ErrorDialog = true; processStartInfo.Verb = "runas"; processStartInfo.WorkingDirectory = "C:\test" processStartInfo.Arguments = "--disable_readline --cli"; processStartInfo.UseShellExecute = false; processStartInfo.CreateNoWindow = false; Process process = new Process(); process.StartInfo = processStartInfo; process.Start(); if (process != null) { process.StandardInput.WriteLine("cd C:\test"); process.StandardInput.WriteLine("source myscripts.tcl"); process.StandardInput.Close(); outputString = process.StandardOutput.ReadToEnd(); process.WaitForExit(); } outputString now contains the data/feedback from system-console for Pass/Fail verification. Thanks
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page