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

SOPC_BUILDER exit codes

Altera_Forum
Honored Contributor II
1,683 Views

Does anyone know what the exit codes from sopc_builder are? 

 

I've googled and looked in various documentation, but can't find it. 

 

The problem I have is what looks like a good build doesn't return 0 ! 

 

echo "Running sopcbuilder..." 

sopc_builder --generate g110_core 

if [ $? -ne 0 ];then 

printf "sopc_builder failed" 

exit 1 

fi 

 

Will fail.
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
798 Views

You could check the "sopc_bulider_log.txt" file and see what it says. 

 

I don't know what the codes are. However, I will submit one possible cause for this that perhaps might be useful. 

 

1 - SoPC builder expects there to be an associated Quartus project with your SoPC system. 

2 - SoPC builder tries to run a TCL script for the associated Quartus project at the end of its system generation. 

3 - If it cannot find the associated project for whatever reason, the entire system will generate completely correctly. However, SoPC builder will throw an error because the TCL script failed to run properly. 

 

This is normal for me. I launch SoPC builder as a megawizard not associated with a Quartus project so even when I generate my SoPC system from the GUI, I get this error. It's no big deal and I ignore it. It seems feasible to me that the same would occur when running SoPC builder from the command line. 

 

Here is what the error looks like: 

Info: Command: quartus_sh -t trio_sopc_setup_quartus.tcl Error: Evaluation of Tcl script trio_sopc_setup_quartus.tcl unsuccessful Error: Quartus II Shell was unsuccessful. 1 error, 0 warnings Error: Peak virtual memory: 45 megabytes Error: Processing ended: Tue Jan 20 09:21:10 2009 Error: Elapsed time: 00:00:00 Error: Total CPU time (on all processors): 00:00:00 ------------------------------------------------ ERROR: Project does not exist or has illegal name characters: C:/Projects/trio/fpga/X2/trio_top/src/sopc/. Specify a legal project name. while executing "project_open -current_revision "C:/Projects/trio/fpga/X2/trio_top/src/sopc/"" (file "trio_sopc_setup_quartus.tcl" line 2) ------------------------------------------------ # 2009.01.20 09:21:11 (*) Completed generation for system: trio_sopc. # 2009.01.20 09:21:11 (*) THE FOLLOWING SYSTEM ITEMS HAVE BEEN GENERATED: SOPC Builder database : C:/Projects/trio/fpga/X2/trio_top/src/sopc/trio_sopc.ptf System HDL Model : C:/Projects/trio/fpga/X2/trio_top/src/sopc/trio_sopc.v System Generation Script : C:/Projects/trio/fpga/X2/trio_top/src/sopc/trio_sopc_generation_script # 2009.01.20 09:21:11 (*) SUCCESS: SYSTEM GENERATION COMPLETED. Warning: System generation was successful, though errors were reported. 

 

I pulled the above text from the "sopc_builder_log.txt" file. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

My output ends like this: 

 

Info: Quartus II Shell was successful. 0 errors, 0 warnings Info: Allocated 42 megabytes of memory during processing Info: Processing ended: Thu Apr 23 16:30:48 2009 Info: Elapsed time: 00:00:00# 2009.04.23 16:30:49 (*) Completed generation for system: g110_core.# 2009.04.23 16:30:49 (*) THE FOLLOWING SYSTEM ITEMS HAVE BEEN GENERATED: SOPC Builder database : c:/Development/EmbeddedApps/Products/trunk/Firmware/13_channel/G110X/g110_core.ptf System HDL Model : c:/Development/EmbeddedApps/Products/trunk/Firmware/13_channel/G110X/g110_core.vhd System Generation Script : c:/Development/EmbeddedApps/Products/trunk/Firmware/13_channel/G110X/g110_core_generation_script # 2009.04.23 16:30:49 (*) SUCCESS: SYSTEM GENERATION COMPLETED. Info: System generation was successful.
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

I'm starting to get a vague recollection of having the same problem. I believe everything generates correctly and I chose to ignore the exit code. This is what my build script looks like for the SoPC generation: 

 

# !/bin/sh echo Generating sopc system. This can take several minutes. Please be patient ... sopc_builder --generate  

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

Sorry for the thread necro, but I'm running into this. Using "sopc_builder --generate", I see an error code of '4' being returned. Anyone know what this means? The log file indicates that the system built successfully with no errors or warnings. I'd expect an exit code of '0' in this instance, indicating no problems encountered. 

 

Thanks, 

--tim
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

Been here as well. 

I just ignore the error code in our build scripts. 

I did raise this with Altera Support many years ago.
0 Kudos
Reply