📄 commands.cfg
字号:
###############################################################################
##
## commands.cfg : dummy procedures for all commands. Used by all tools so that
## commands not understood by a tool can be safely ignored.
##
###############################################################################
if (clsymbol "commands") {
clerror "commands.cfg already included"
} else {
commands = 1
}
proc alias { }
proc addressof { $$ = 0 }
proc alter { }
proc bootdata { }
proc break { }
proc chip { }
proc compare { }
proc connect { }
proc context { }
proc copy { }
proc core { }
proc define { }
proc disconnect { }
proc display { $$ = 0 }
proc dump { }
proc emi { }
proc endorder { }
proc entry { }
proc entrypoint { }
proc events { }
proc export { }
proc file { }
proc fill { }
proc forward { }
proc getprocessid { $$ = 0 }
proc gettime { $$ = 0 }
proc go { }
proc heap { }
proc initstack { }
proc inform { }
proc informs { }
proc import { }
proc jtag { }
proc load { }
proc log { }
proc memory { }
proc memset { }
proc modify { }
proc modules { }
proc peek { $$ = 0 }
proc place { }
proc poke { }
proc print { }
proc processor { }
proc profile { }
proc program { }
proc quit { }
proc register { }
proc reset { }
proc restart { }
proc romfilename { }
proc romimage { }
proc romorigin { }
proc romimage { }
proc romslice { }
proc runtime { }
proc searchpath { }
proc simdll { }
proc simmem { }
proc sizeof { $$ = 0 }
proc sizeused { $$ = 0 }
proc space { }
proc st20ccoptions { }
proc stack { }
proc startstate { }
proc startorder { }
proc statement { }
proc step { }
proc stepout { }
proc stop { }
proc store { }
proc symbols { }
proc target { }
proc task { }
proc timer { }
proc trace { }
proc tracebuffer { }
proc tracedump { }
proc traceload { }
proc traphandler { }
proc wait { }
proc watch { }
proc where { }
proc window { }
## new commands
proc bootiptr { startstate $* }
addhelp bootiptr \
"bootiptr iptr\n\
specify starting iptr\n"
## synonyms for backward compatibility
proc delete { events -remove $* }
proc disable { events -disable $* }
proc enable { events -enable $* }
proc run { go }
proc continue { go }
proc errors { clerror $* }
## major commands implemented mostly (or completely) in the command language
proc st20toolsetversion \
_ST_local_res ; \
_ST_local_tmp ; \
_ST_local_file ; \
_ST_local_vstr ; \
_ST_local_i ; \
{
if ($# > 1) {
clerror "too many arguments"
}
if (($# == 0) || (($1 << 2) == "-q")) {
_ST_local_file = (getenv ST20ROOT)+"/version"
## open the version file
_ST_local_res = fopen(_ST_local_file, "r")
if (0 == _ST_local_res) {
## get the version string
_ST_local_vstr = fgets(_ST_local_file)
fclose(_ST_local_file)
## if we are not quiet then output our current version
if ($# == 0) {
write (_ST_local_vstr)
}
## extract the release number from the version string
_ST_local_vstr = (_ST_local_vstr * "R[0-9]*\..*$") % "R"
} else {
## no version file
## this should only affect internal wavefront releases and we
## therefore force are very high version number (note that we use
## signed comparison so the top bit must be 0)
_ST_local_vstr = "127.255.255.255"
if ($# == 0) {
write "This is an unknown ST20 toolset"
}
}
} else {
## get the version string from the first argument
_ST_local_vstr = (mkstr $1)
}
## simply string processing by guaranteeing the string contains at
## least 3 dots.
_ST_local_vstr += "..."
_ST_local_res = 0
for (_ST_local_i=24; _ST_local_i >= 0; _ST_local_i -= 8) {
## get the current component number
_ST_local_tmp = (mknum (_ST_local_vstr / "."))
## detect over large component numbers
if (_ST_local_tmp > 255) {
clerror ("version number too large-"+(mkstr (_ST_local_tmp)))
}
## pack the data into the results
_ST_local_res += (_ST_local_tmp << _ST_local_i)
## move onto the next part
_ST_local_vstr %= "."
}
$$ = _ST_local_res
}
addhelp st20toolsetversion "\
st20toolsetversion [-q]\n\
get the version number of the current toolset\n\
where\n\
-q[uiet] return result only, don't display it\n\n\
st20toolsetversion <version string>\n\
calculate the version number of a previous toolset\n\
where\n\
<version string> string of form `a', `a.b', `a.b.c' or `a.b.c.d' where\n\
a, b, c and d are integers less than 255.\n\n\
e.g.\n\
if ((st20toolsetversion -q) < (st20toolsetversion \"1.9\") { ... }\n"
include emidelay.cfg
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -