这篇主要解决eCos的配置工具运行在Ubuntu 64bit上的诸多问题。
先放截图,要不然大家看到代码头疼就看不到真相了。可以从Linux公社的资源服务器中下载打包的文件。 免费的
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是www.linuxidc.com
具体下载目录在 /2011年资料/嵌入式Linux/eCos Configuration Tool build on ubuntu 10.04 AMD64/
我们暂且把ecoscentric提供的方法附上
需要的资源
hg clone http://hg-pub.ecoscentric.com/ecos/
wxGTK-2.8.8.tar.bz2 (for Linux/GTK+)
Building for Linux/GTK+
The following instructions assume that you are working at a bash prompt and that the GTK+ and Tcl libraries have been installed from your Linux distribution. First, extract the wxWidgets sources:
mkdir ~/src cd ~/src bunzip2 -c wxGTK-2.8.8.tar.bz2 | tar xf - cd wxGTK-2.8.8
Configure wxWidgets for static linking without socket support, then build and install:
mkdir ~/wx-build cd ~/wx-build $HOME/src/wxGTK-2.8.8/configure --disable-shared / --disable-sockets --prefix=$HOME/wxGTK-2.8.8 make make install
Configure, build and install the eCos host infrastructure:
mkdir ~/infra-build cd ~/infra-build $HOME/cvs/ecos/host/configure --prefix=$HOME/ecos-tools make make install
Build and install the eCos Configuration Tool (INSTALLDIR must match the eCos host infrastructure prefix):
mkdir ~/configtool-build cd ~/configtool-build make -f ~/cvs/ecos/host/tools/configtool/standalone/wxwin/makefile.gnu / install WXDIR=$HOME/wxGTK-2.8.8 ECOSSRCDIR=$HOME/cvs/ecos/host / INSTALLDIR=$HOME/ecos-tools
The eCos Configuration Tool binary should now be located at: ~/ecos-tools/bin/configtool
实际过程中,因为操作系统是64位的问题,会有int指针类型和tcl,tk的错误。
1)遇到tcl,tk错误的时候
你需要做如下的link
ricky@ricky-laptop:/usr/local/libexec/ecos/hal/synth/arch/share$ ls -al
总用量 8
drwxr-xr-x 2 root root 4096 2011-01-28 11:58 .
drwxr-xr-x 4 root root 4096 2011-01-28 11:45 ..
lrwxrwxrwx 1 root root 23 2011-01-28 11:58 tcl8.3 -> /usr/local/share/tcl8.3
lrwxrwxrwx 1 root root 22 2011-01-28 11:58 tk8.3 -> /usr/local/share/tk8.3
ricky@ricky-laptop:/usr/local/libexec/ecos/hal/synth/arch/share$
2)编译错误,大致需要修改以下一些文件
Revision: 3019
Branch: default
Author: Ricky Wu Committer: Ricky Wu Parent: 3018:d45320ea4f56 (first add minigui to ecos hg version) Child: 3027:4bc997522efd (merge ricky soluation) 1.fix configtool on linux 64bit issue 2.use firefox as default web browser 3.fix mw driver bitblit issue user: Ricky Wu branch 'default' changed host/tools/Utils/common/eCosSerial.cpp changed host/tools/Utils/common/eCosSocket.cpp changed host/tools/Utils/common/eCosTrace.cpp changed host/tools/configtool/standalone/wxwin/packagesdlg.cpp changed host/tools/configtool/standalone/wxwin/propertywin.cpp changed host/tools/ecostest/common/TestResource.cpp changed host/tools/ecostest/common/eCosTestDownloadFilter.cpp changed packages/hal/synth/arch/current/host/ecosynth.tcl changed packages/services/gfx/mw/current/src/drivers/scr_synth_ecos.c -------------------- host/tools/Utils/common/eCosSerial.cpp -------------------- @@ -36,7 +36,7 @@ // Usage: // //####DESCRIPTIONEND#### - +#include #include 'eCosStd.h' #include 'eCosSerial.h' #include 'eCosThreadUtils.h' @@ -340,7 +340,7 @@ bool CeCosSerial::Close() { - bool rc=m_pHandle && (-1!=close((int)m_pHandle)); + bool rc=m_pHandle && (-1!=close((intptr_t)m_pHandle)); m_pHandle=0; return rc; } @@ -427,7 +427,7 @@ TRACE(_T('Changing configuration.../n')); // Get current settings. - if (tcgetattr((int) m_pHandle, &buf)) { + if (tcgetattr((intptr_t) m_pHandle, &buf)) { fprintf(stderr, _T('Error: tcgetattr/n')); return false; } @@ -494,7 +494,7 @@ } // Set the new settings - if (tcsetattr((int) m_pHandle, TCSADRAIN, &buf)) { + if (tcsetattr((intptr_t) m_pHandle, TCSADRAIN, &buf)) { fprintf(stderr, _T('Error: tcsetattr/n')); return false; } @@ -503,7 +503,7 @@ // error if _all_ settings fail. If just a few settings are not // supported, the call returns true while the hardware is set to a // combination of old and new settings. - if (tcgetattr((int) m_pHandle, &buf_verify)) { + if (tcgetattr((intptr_t) m_pHandle, &buf_verify)) { fprintf(stderr, _T('Error: tcgetattr/n')); return false; } @@ -522,7 +522,7 @@ bool CeCosSerial::Flush (void) { - return 0==tcflush((int) m_pHandle, TCIOFLUSH); + return 0==tcflush((intptr_t) m_pHandle, TCIOFLUSH); } bool CeCosSerial::Read (void *pBuf,unsigned int nSize,unsigned int &nRead) @@ -530,7 +530,7 @@ if (!m_bBlockingReads) { nRead = 0; - int n = read((int)m_pHandle, pBuf, nSize); + int n = read((intptr_t)m_pHandle, pBuf, nSize); if (-1 == n) { if (EAGAIN == errno) return true; @@ -558,7 +558,7 @@ fd_set rfds; FD_ZERO(&rfds); - FD_SET((int)m_pHandle, &rfds); + FD_SET((intptr_t)m_pHandle, &rfds); // Start with total timeout. struct timeval tv; @@ -568,10 +568,10 @@ unsigned char* pData = (unsigned char*) pBuf; nRead = 0; while (nSize) { - switch(select((int)m_pHandle + 1, &rfds, NULL, NULL, &tv)) { + switch(select((intptr_t)m_pHandle + 1, &rfds, NULL, NULL, &tv)) { case 1: { - int n = read((int)m_pHandle, pData, nSize); + int n = read((intptr_t)m_pHandle, pData, nSize); if (-1 == n && EAGAIN != errno) { ERROR(_T('Read failed: %d/n'), errno); return false; // FAILED @@ -608,7 +608,7 @@ bool CeCosSerial::Write(void *pBuf,unsigned int nSize,unsigned int &nWritten) { bool rc; - int n=write((int)m_pHandle,pBuf,nSize); + int n=write((intptr_t)m_pHandle,pBuf,nSize); if(-1==n){ nWritten=0; if (errno == EAGAIN) -------------------- host/tools/Utils/common/eCosSocket.cpp -------------------- @@ -36,7 +36,7 @@ // Usage: // //####DESCRIPTIONEND#### - +#include #include 'eCosStd.h' #include 'eCosSocket.h' #include 'eCosSerial.h' @@ -96,7 +96,7 @@ m_nSock(-1), m_nClient(0) { - VTRACE(_T('Create socket instance %08x/n'),(unsigned int)this); + VTRACE(_T('Create socket instance %08x/n'),(uintptr_t)this); } CeCosSocket::CeCosSocket (int sock /*result of previous call of Listen*/, bool *pbStop): @@ -104,7 +104,7 @@ m_nSock(-1), m_nClient(0) { - VTRACE(_T('Create socket instance %08x/n'),(unsigned int)this); + VTRACE(_T('Create socket instance %08x/n'),(uintptr_t)this); Accept(sock,pbStop); } @@ -113,7 +113,7 @@ m_nSock(-1), m_nClient(0) { - VTRACE(_T('Create socket instance %08x/n'),(unsigned int)this); + VTRACE(_T('Create socket instance %08x/n'),(uintptr_t)this); Connect(pszHostPort,dTimeout); } @@ -312,7 +312,7 @@ CeCosSocket::~CeCosSocket() { Close(); - VTRACE(_T('Delete socket instance %08x/n'),(unsigned int)this); + VTRACE(_T('Delete socket instance %08x/n'),(uintptr_t)this); } bool CeCosSocket::CloseSocket(int &sock) -------------------- host/tools/Utils/common/eCosTrace.cpp -------------------- @@ -61,7 +61,7 @@ fclose(OutInfo.f); } if(nVerbosity>=TRACE_LEVEL_TRACE){ - _ftprintf(stderr,_T('Output -> %s (%08x)/n'),pszFilename,(unsigned int)f); + _ftprintf(stderr,_T('Output -> %s (%08x)/n'),pszFilename,(uintptr_t)f); } OutInfo.f=f; OutInfo.strFilename=pszFilename; ------------ host/tools/configtool/standalone/wxwin/packagesdlg.cpp ------------ @@ -507,7 +507,7 @@ int itemIndex = -1; if (toDelete > -1) { - itemIndex = (int) from -> GetClientData(toDelete); + itemIndex = (intptr_t) from -> GetClientData(toDelete); from -> Delete(toDelete); } @@ -686,7 +686,7 @@ wxString str = versionChoice->GetString(versionChoice->GetSelection()); // itemIndex is the index into the list of item names. It gets stored with all the listbox items. - int itemIndex = (int) pListBox->GetClientData((*selected)[nIndex]);
上一篇:eCos DM9000网卡在MINI2440 QEMU的测试
下一篇:RTEMS Hello World for MINI2440 QEMU
推荐阅读最新更新时间:2024-11-20 00:12
设计资源 培训 开发板 精华推荐
- EVAL-AD7887CB,使用 AD7887、125 kSPS、12 位、2 通道微功耗模数转换器的评估板
- 使用符合 EN50121-3-2 标准的带有 EMC 滤波的 RP40-243.3SFR DC/DC 转换器的典型应用(单输出)
- LE50CD-TR带抑制功能极低压降稳压器的典型应用
- 具有 PWM 调光功能的 NSV50350ADT4G LED 灯串的典型应用
- Ap3125B绿色模式PWM控制器的典型应用
- USB-TTL-PL2303SA
- 用于汽车的 1.8V、3.3V DC 至 DC 多输出电源
- AM6TW-4815SH35Z 15V 6瓦双输出DC/DC转换器的典型应用
- LTC3630AMPMSE 4V 至 24V 输入至 3.3V 输出、具有外部软启动、小尺寸的 250mA 稳压器的典型应用电路
- EVAL-ADG772EBZ,用于 ADG772 CMOS 低功耗双路 2:1 Mux/Demux USB 2.0 (480 Mbps)/USB 1.1 (12 Mbps) 的评估板