-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5645120
Showing
103 changed files
with
14,658 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
184 changes: 184 additions & 0 deletions
184
2016/03/25/manage-vxworks-tornado-executable-project-using-tcl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!-- Begin Jekyll SEO tag v2.8.0 --> | ||
<title>用TCL(工具命令语言)管理Tornado (for VxWorks) 可启动工程 | Kaiwen’s personal website</title> | ||
<meta name="generator" content="Jekyll v3.9.2"> | ||
<meta property="og:title" content="用TCL(工具命令语言)管理Tornado (for VxWorks) 可启动工程"> | ||
<meta property="og:locale" content="en_US"> | ||
<meta name="description" content="尽管多数情况下要写VxWorks嵌入式应用程序代码常用Tornado编程环境,但有时可能会需要在命令行下完成简单的Tornado工程管理。本教程教授了如何将简单的工程管理迁移到Tornado外部并在命令行下实现(虽然这样做无法体验Tornado下的一些方便的功能)。"> | ||
<meta property="og:description" content="尽管多数情况下要写VxWorks嵌入式应用程序代码常用Tornado编程环境,但有时可能会需要在命令行下完成简单的Tornado工程管理。本教程教授了如何将简单的工程管理迁移到Tornado外部并在命令行下实现(虽然这样做无法体验Tornado下的一些方便的功能)。"> | ||
<link rel="canonical" href="https://kkew3.github.io/2016/03/25/manage-vxworks-tornado-executable-project-using-tcl.html"> | ||
<meta property="og:url" content="https://kkew3.github.io/2016/03/25/manage-vxworks-tornado-executable-project-using-tcl.html"> | ||
<meta property="og:site_name" content="Kaiwen’s personal website"> | ||
<meta property="og:type" content="article"> | ||
<meta property="article:published_time" content="2016-03-25T15:33:31+00:00"> | ||
<meta name="twitter:card" content="summary"> | ||
<meta property="twitter:title" content="用TCL(工具命令语言)管理Tornado (for VxWorks) 可启动工程"> | ||
<script type="application/ld+json"> | ||
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2016-03-25T15:33:31+00:00","datePublished":"2016-03-25T15:33:31+00:00","description":"尽管多数情况下要写VxWorks嵌入式应用程序代码常用Tornado编程环境,但有时可能会需要在命令行下完成简单的Tornado工程管理。本教程教授了如何将简单的工程管理迁移到Tornado外部并在命令行下实现(虽然这样做无法体验Tornado下的一些方便的功能)。","headline":"用TCL(工具命令语言)管理Tornado (for VxWorks) 可启动工程","mainEntityOfPage":{"@type":"WebPage","@id":"https://kkew3.github.io/2016/03/25/manage-vxworks-tornado-executable-project-using-tcl.html"},"url":"https://kkew3.github.io/2016/03/25/manage-vxworks-tornado-executable-project-using-tcl.html"}</script> | ||
<!-- End Jekyll SEO tag --> | ||
<link rel="stylesheet" href="/assets/main.css"> | ||
<link type="application/atom+xml" rel="alternate" href="https://kkew3.github.io/feed.xml" title="Kaiwen's personal website"> | ||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2YQN8LEHLR"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'G-2YQN8LEHLR'); | ||
</script> | ||
</head> | ||
<body> | ||
<header class="site-header" role="banner"> | ||
|
||
<div class="wrapper"> | ||
<a class="site-title" rel="author" href="/">Kaiwen's personal website</a><nav class="site-nav"> | ||
<input type="checkbox" id="nav-trigger" class="nav-trigger"> | ||
<label for="nav-trigger"> | ||
<span class="menu-icon"> | ||
<svg viewbox="0 0 18 15" width="18px" height="15px"> | ||
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"></path> | ||
</svg> | ||
</span> | ||
</label> | ||
|
||
<div class="trigger"> | ||
<a class="page-link" href="/tags/">Tags</a><a class="page-link" href="/docs/">Docs</a><a class="page-link" href="/about/">About</a> | ||
</div> | ||
</nav> | ||
</div> | ||
</header> | ||
<main class="page-content" aria-label="Content"> | ||
<div class="wrapper"> | ||
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting"> | ||
|
||
<header class="post-header"> | ||
<h1 class="post-title p-name" itemprop="name headline">用TCL(工具命令语言)管理Tornado (for VxWorks) 可启动工程</h1> | ||
<span><a href="https://kkew3.github.io/tags/dev--tcl"><code class="highlighter-rouge"><nobr>dev/tcl</nobr></code></a></span> | ||
<p class="post-meta"> | ||
<time class="dt-published" datetime="2016-03-25T15:33:31+00:00" itemprop="datePublished">Mar 25, 2016 at 15:33:31 | ||
</time></p> | ||
</header> | ||
|
||
<div class="post-content e-content" itemprop="articleBody"> | ||
<p>尽管多数情况下要写VxWorks嵌入式应用程序代码常用Tornado编程环境,但有时可能会需要在命令行下完成简单的Tornado工程管理。本教程教授了如何将简单的工程管理迁移到Tornado外部并在命令行下实现(虽然这样做无法体验Tornado下的一些方便的功能)。</p> | ||
|
||
<ol> | ||
<li> | ||
<p>准备Tornado软件。首先得有Tornado的全套软件。我的是Tornado2.2。Tornado是否经过破解或是否安装都问题不大,只要有它的安装目录就可以。</p> | ||
</li> | ||
<li> | ||
<p>配置环境。Tornado环境中已经配好了各种环境变量,所以我们要向在普通cmd下实现Tornado的基本功能,也需要手动配置相应的环境。a) 新建环境变量<code class="language-plaintext highlighter-rouge">WIND_BASE</code>,其值为Tornado的安装目录(例如我的Tornado安装在D盘Tornado2.2目录下,那么<code class="language-plaintext highlighter-rouge">WIND_BASE</code>值为<code class="language-plaintext highlighter-rouge">D:\Tornado2.2</code>;b) 新建环境变量<code class="language-plaintext highlighter-rouge">WIND_HOST_TYPE</code>,如果是Windows用户,那么需要将其值设为<code class="language-plaintext highlighter-rouge">x86-win32</code>,如果不是Windows用户,那么凭本人的知识就不太清楚了;c) 将<code class="language-plaintext highlighter-rouge">%WIND_BASE%\host\%WIND_HOST_TYPE%\bin</code>加入<code class="language-plaintext highlighter-rouge">PATH</code>环境变量;d) 新建环境变量<code class="language-plaintext highlighter-rouge">DIABLIB</code>,其值为<code class="language-plaintext highlighter-rouge">%WIND_BASE%/host/diab</code>(注意斜杠的方向)。注意这些变量必须真得加到系统环境变量中而不是仅在命令行上输<code class="language-plaintext highlighter-rouge">SET WIND_BASE=D:\Tornado2.2</code>等等。</p> | ||
</li> | ||
<li> | ||
<p>配置<code class="language-plaintext highlighter-rouge">diab</code>和<code class="language-plaintext highlighter-rouge">gnu</code>工具链。在cmd中执行以下两条批处理命令:</p> | ||
</li> | ||
</ol> | ||
|
||
<pre><code class="language-cmd">wtxtcl.exe %WIND_BASE%/host/resource/tcl/app-config/Project/gnuInfoGen.tcl diab | ||
wtxtcl.exe %WIND_BASE%/host/resource/tcl/app-config/Project/gnuInfoGen.tcl gnu | ||
</code></pre> | ||
|
||
<ol> | ||
<li>基本的工程管理方法(建议将下面的每条内容都写到TCL脚本文件中以方便调用)</li> | ||
</ol> | ||
|
||
<p>a) 建立新工程(本例中BSP(板级支持包)以三星的嵌入式开发板<code class="language-plaintext highlighter-rouge">S3c2410BP</code>为例)</p> | ||
|
||
<div class="language-tcl highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># 加载过程库文件cmpScriptLib.tcl,其中定义了工程管理所需的各种方法</span> | ||
source <span class="p">[</span>wtxPath host resource tcl app-config Project<span class="p">]</span>cmpScriptLib.tcl | ||
|
||
# 尝试创建名为<span class="s2">"Project0"</span>的可启动工程,注意Project0一定不能是已经存在的工程 | ||
# 新工程位于%WIND_BASE%<span class="se">\t</span>arget<span class="se">\p</span>roj目录下,该目录由可接受任意个参数的命令wtxPath指定 | ||
# S3c2410BP是BSP名,BSP应放在%WIND_BASE%<span class="se">\t</span>arget<span class="se">\c</span>onfig目录下 | ||
cmpProjCreate S3c2410BP <span class="p">[</span>wtxPath target proj Project0<span class="p">]</span>Project0.wpj | ||
cmpProjClose | ||
</code></pre></div></div> | ||
|
||
<p>b) 删除工程(以删除工程”Project0”为例)</p> | ||
|
||
<div class="language-tcl highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source <span class="p">[</span>wtxPath host resource tcl app-config Project<span class="p">]</span>cmpScriptLib.tcl | ||
|
||
cmpProjOpen <span class="p">[</span>wtxPath target proj Project0<span class="p">]</span>Project0.wpj | ||
cmpProjDelete | ||
</code></pre></div></div> | ||
|
||
<p>c) 向工程(以<code class="language-plaintext highlighter-rouge">Project0</code>为例)中添加文件(以<code class="language-plaintext highlighter-rouge">D:\my_directory\my_source_file.c</code>为例)</p> | ||
|
||
<div class="language-tcl highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source <span class="p">[</span>wtxPath host resource tcl app-config Project<span class="p">]</span>cmpScriptLib.tcl | ||
cmpProjOpen <span class="p">[</span>wtxPath target proj Project0<span class="p">]</span>Project0.wpj | ||
cmpFileAdd d:/my_directory/my_source_file.c | ||
cmpProjClose | ||
</code></pre></div></div> | ||
|
||
<p>d) 从工程(以<code class="language-plaintext highlighter-rouge">Project0</code>为例)中移除文件(以<code class="language-plaintext highlighter-rouge">D:\my_directory\my_source_file.c</code>为例)</p> | ||
|
||
<div class="language-tcl highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source <span class="p">[</span>wtxPath host resource tcl app-config Project<span class="p">]</span>cmpScriptLib.tcl | ||
cmpProjOpen <span class="p">[</span>wtxPath target proj Project0<span class="p">]</span>Project0.wpj | ||
cmpFileRemove d:/my_directory/my_source_file.c | ||
cmpProjClose | ||
</code></pre></div></div> | ||
|
||
<p>e) 获取工程中包含的文件列表(一行一个文件名,以<code class="language-plaintext highlighter-rouge">Project0</code>为例)</p> | ||
|
||
<div class="language-tcl highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source <span class="p">[</span>wtxPath host resource tcl app-config Project<span class="p">]</span>cmpScriptLib.tcl | ||
set projId <span class="p">[</span>cmpProjOpen <span class="p">[</span>wtxPath target proj Project0<span class="p">]</span>Project0.wpj<span class="p">]</span> | ||
set file_list <span class="p">[</span>prjFileListGet $projId<span class="p">]</span> | ||
cmpProjClose | ||
foreach item $file_list <span class="p">{</span> | ||
puts $item | ||
<span class="p">}</span> | ||
</code></pre></div></div> | ||
|
||
<p>f) 重新编译工程(以<code class="language-plaintext highlighter-rouge">Project0</code>为例)</p> | ||
|
||
<div class="language-tcl highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source <span class="p">[</span>wtxPath host resource tcl app-config Project<span class="p">]</span>cmpScriptLib.tcl | ||
cmpProjOpen <span class="p">[</span>wtxPath target proj Project0<span class="p">]</span>Project0.wpj | ||
cmpBuild clean | ||
cmpBuild | ||
cmpProjClose | ||
</code></pre></div></div> | ||
|
||
<p>本教程至此结束,若对TCL语言不很熟悉,请参阅工具命令语言(TCL)的相关教程。</p> | ||
|
||
</div> | ||
<a class="u-url" href="/2016/03/25/manage-vxworks-tornado-executable-project-using-tcl.html" hidden></a> | ||
</article> | ||
|
||
</div> | ||
</main><footer class="site-footer h-card"> | ||
<data class="u-url" href="/"></data> | ||
|
||
<div class="wrapper"> | ||
|
||
<h2 class="footer-heading">Kaiwen's personal website</h2> | ||
|
||
<div class="footer-col-wrapper"> | ||
<div class="footer-col footer-col-1"> | ||
<ul class="contact-list"> | ||
<li class="p-name">Kaiwen's personal website</li> | ||
<li><a class="u-email" href="mailto:[email protected]">[email protected]</a></li> | ||
</ul> | ||
</div> | ||
|
||
<div class="footer-col footer-col-2"> | ||
<ul class="social-media-list"><li><a href="https://github.com/kkew3"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#github"></use></svg> <span class="username">kkew3</span></a></li></ul> | ||
</div> | ||
|
||
<div class="footer-col footer-col-3"> | ||
<p>My blogs and research reports.</p> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</footer> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.