eCos Configuration Tool build on ubuntu 10.04 AMD64

发布时间:2024-06-26  

这篇主要解决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  2011-01-31 10:00:18

Committer: Ricky Wu  2011-01-31 10:00:18

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.

文章来源于:电子工程世界    原文链接
本站所有转载文章系出于传递更多信息之目的,且明确注明来源,不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。

我们与500+贴片厂合作,完美满足客户的定制需求。为品牌提供定制化的推广方案、专属产品特色页,多渠道推广,SEM/SEO精准营销以及与公众号的联合推广...详细>>

利用葫芦芯平台的卓越技术服务和新产品推广能力,原厂代理能轻松打入消费物联网(IOT)、信息与通信(ICT)、汽车及新能源汽车、工业自动化及工业物联网、装备及功率电子...详细>>

充分利用其强大的电子元器件采购流量,创新性地为这些物料提供了一个全新的窗口。我们的高效数字营销技术,不仅可以助你轻松识别与连接到需求方,更能够极大地提高“闲置物料”的处理能力,通过葫芦芯平台...详细>>

我们的目标很明确:构建一个全方位的半导体产业生态系统。成为一家全球领先的半导体互联网生态公司。目前,我们已成功打造了智能汽车、智能家居、大健康医疗、机器人和材料等五大生态领域。更为重要的是...详细>>

我们深知加工与定制类服务商的价值和重要性,因此,我们倾力为您提供最顶尖的营销资源。在我们的平台上,您可以直接接触到100万的研发工程师和采购工程师,以及10万的活跃客户群体...详细>>

凭借我们强大的专业流量和尖端的互联网数字营销技术,我们承诺为原厂提供免费的产品资料推广服务。无论是最新的资讯、技术动态还是创新产品,都可以通过我们的平台迅速传达给目标客户...详细>>

我们不止于将线索转化为潜在客户。葫芦芯平台致力于形成业务闭环,从引流、宣传到最终销售,全程跟进,确保每一个potential lead都得到妥善处理,从而大幅提高转化率。不仅如此...详细>>