SHopper
New Contributor
1 month agoTrying to print warning messages from tcl build script
I am using quartus prime v22.1 std lite and have a build script for a max10 FPGA.
It seems to build correctly, but i want to create a log file containing any errors/warnings etc.
Every time the tcl fails at the 'get_messages' command (and also 'get_message_count' command), how can I generate the log file from within the tcl script?
Thanks
Section of script file shown below:
# set compilation output folder to "factory" and compile
project_open -revision wrapper factory-524-069
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY "./factory"
# open log file for writing
set log_file "quartus_warnings.log"
set fp [open $log_file w]
fconfigure $fp -encoding utf-8
execute_flow -compile
# filter warnings
# Quartus stores messages in the internal database; we can query them
load_package report
load_report
set msgs [get_messages -type warning]
# Write warnings to log file
foreach msg $msgs {
puts $fp $msg
}
project_close
# close log file
close $fp
the load_package report and load report seem to have no effect but were included in one example script I found.