Line 27... |
Line 27... |
#
|
#
|
# Author(s):
|
# Author(s):
|
# - Olivier Girard, olgirard@gmail.com
|
# - Olivier Girard, olgirard@gmail.com
|
#
|
#
|
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
# $Rev: 17 $
|
# $Rev: 106 $
|
# $LastChangedBy: olivier.girard $
|
# $LastChangedBy: olivier.girard $
|
# $LastChangedDate: 2009-08-04 23:15:39 +0200 (Tue, 04 Aug 2009) $
|
# $LastChangedDate: 2011-03-25 23:01:03 +0100 (Fri, 25 Mar 2011) $
|
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
|
|
###############################################################################
|
###############################################################################
|
# PARAMETER CHECK #
|
# PARAMETER CHECK #
|
###############################################################################
|
###############################################################################
|
Line 87... |
Line 87... |
puts "ERROR Cannot open input file $ihex"
|
puts "ERROR Cannot open input file $ihex"
|
exit 1
|
exit 1
|
}
|
}
|
|
|
# MEMH Output
|
# MEMH Output
|
|
if { "$out"=="-"} {
|
|
set f_out stdout
|
|
} else {
|
if [catch {open $out w } f_out] {
|
if [catch {open $out w } f_out] {
|
puts "ERROR Cannot create output file $out"
|
puts "ERROR Cannot create output file $out"
|
exit 1
|
exit 1
|
}
|
}
|
|
}
|
|
|
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
# CONVERSION #
|
# CONVERSION #
|
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
|
|
Line 146... |
Line 149... |
}
|
}
|
puts -nonewline $f_out " [format "%02s" $mem_arr($i) ]"
|
puts -nonewline $f_out " [format "%02s" $mem_arr($i) ]"
|
}
|
}
|
|
|
puts $f_out "\n"
|
puts $f_out "\n"
|
|
|
|
if { "$out"!="-"} {
|
close $f_out
|
close $f_out
|
|
}
|
|
|
exit 0
|
exit 0
|
|
|
No newline at end of file
|
No newline at end of file
|