Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

How can I load a .sof and .elf file to a target using System Console

Altera_Forum
Honored Contributor II
1,697 Views

Hello, 

 

I want to use System Console to download my project which consists of a SRAM object file and a .elf file to a target board. 

 

Hopefully someone can answer the following questions: 

 

1. How can I execute a .TCL script from the System Console command line? 

I guess there should be a command which I can used instead of "File" -> "Execute Script..." 

 

2. Where can I find more informations about the plugins System Console provides? 

System Console provides some plugins which are providing additional functionality (for example the "DesignsPluginProvider"). Where can I find additional informations about the functionalities of the plugins. The only source I found is the following PDF document: http://www.altera.com.cn/literature/ug/ug_system_console.pdf (http://www.altera.com.cn/literature/ug/ug_system_console.pdf) Unfortunately this document doesn't elaborate on the features of the plugins. 

 

3. Is it possible to search for an element in a TCL list? 

The examples are using command like this one to select specific elements: 

set device_path 0] 

which in this example would set device_path to: 

/devices/EP2C35@1#USB-0 

But the order in which the devices are named could change, so it would be better if I could search the elements returned by get_service_paths for the term ep2c35 and select that specific element. 

 

 

This is the prototype of the script I'm working on: 

set project_path /home/archie/my_project set device_path 0] design_load $project_path set design_path 0] design_link $design_path $device_path device_download_sof device_load_jdi elf_download  

 

Obviously the last three functions are still missing some needed arguments 

 

 

Best regards 

Martin
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
711 Views

1. The TCL source command reads a file and executes it as a script. This is availble from the SystemConsole TCL window. If you're on windows watch out for escapes and backslashes - it is often easier to write the path with forward slashes rather than trying to work out the escaping (TCL will silently convert them to backslashes) 

 

2. Each SystemConsole plugin contributes commands, service types and/or drivers that implement these features. Most users will be able to ignore details of exactly which plugin provides which services. What do you need to know about plugins. 

 

3. I don't know of a standard TCL command which searches within a TCL list, but if you write a proc yourself then you should be able to use the regexp command to match parts of the string 

 

Finally, for your script you are probably best off setting the auto usercode option in Quartus and loading your sof file and project first. Once both of these are loaded SystemConsole will automatically link the design to the JTAG connections so you won't need to use the design_link command or the (deprecated) device_load_jdi command.
0 Kudos
Altera_Forum
Honored Contributor II
711 Views

Hi Martin, 

 

According to the latest quartus 12.1 documentation device_load_jdi is deprecated.  

But device_download_sof is fairly easy to use.  

 

For example: 

 

device_download_sof {/devices/5SGXEA7H(1|2|2ES|3|3ES)|..@1#USB-0/(link)/JTAG} {C:\design\synth\design.sof} 

 

You can find device path by running "get_service_paths device" command. 

 

Thanks, 

Evgeni
0 Kudos
Altera_Forum
Honored Contributor II
711 Views

 

--- Quote Start ---  

According to the latest quartus 12.1 documentation device_load_jdi is deprecated.  

But device_download_sof is fairly easy to use.  

 

--- Quote End ---  

 

 

Sorry, I should have been more explicit in my previous post. device_load_jdi is deprecated, it has been replaced by the design_load command. Compile your project in 12.1 and do design_load <myproject.sof> - this doesn't affect the hardware but it does load all the debug information into SystemConsole.
0 Kudos
Reply