GT2440 加载可执行文件到开发板步骤

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

本人只是一个初学者,吃了很多苦头,现在将一些经验分享一下,希望可以帮助到后来者。系统与《国嵌》视频中的系统一样。该“简单计算器”程序可在我的另一份文档中找到。这只是一个例子,其他程序可以依样画葫芦弄出来。[root@localhost~]#cd/home/lgl/calculator[root@localhostcalculator]#lscwidget.cppcwidget.hmain.cpp[root@localhostcalculator]#qmake-project[root@localhostcalculator]#qmake[root@localhostcalculator]#makeg++-c-pipe-Wall-W-O2-g-pipe-Wall-Wp,-D_FORTIFY_SOURCE=2-fexceptions-fstack-protector--param=ssp-buffer-size=4-m32-march=i386-mtune=generic-fasynchronous-unwind-tables-DQT_NO_DEBUG-DQT_SHARED-DQT_THREAD_SUPPORT-I/usr/lib/qt-3.3/mkspecs/default-I.-I.-I/usr/lib/qt-3.3/include-ocwidget.ocwidget.cppcwidget.cpp:31:warning:unusedparameter‘parent’cwidget.cpp:31:warning:unusedparameter‘name’cwidget.cpp:Inmemberfunction‘voidCWidget::setValue()’:cwidget.cpp:68:warning:comparisonbetweensignedandunsignedintegerexpressionsg++-c-pipe-Wall-W-O2-g-pipe-Wall-Wp,-D_FORTIFY_SOURCE=2-fexceptions-fstack-protector--param=ssp-buffer-size=4-m32-march=i386-mtune=generic-fasynchronous-unwind-tables-DQT_NO_DEBUG-DQT_SHARED-DQT_THREAD_SUPPORT-I/usr/lib/qt-3.3/mkspecs/default-I.-I.-I/usr/lib/qt-3.3/include-omain.omain.cppmain.cpp:15:2:warning:nonewlineatendoffile/usr/lib/qt-3.3/bin/moccwidget.h-omoc_cwidget.cppg++-c-pipe-Wall-W-O2-g-pipe-Wall-Wp,-D_FORTIFY_SOURCE=2-fexceptions-fstack-protector--param=ssp-buffer-size=4-m32-march=i386-mtune=generic-fasynchronous-unwind-tables-DQT_NO_DEBUG-DQT_SHARED-DQT_THREAD_SUPPORT-I/usr/lib/qt-3.3/mkspecs/default-I.-I.-I/usr/lib/qt-3.3/include-omoc_cwidget.omoc_cwidget.cppg++-ocalculatorcwidget.omain.omoc_cwidget.o-L/usr/lib/qt-3.3/lib-lqt-mt-lXext-lX11-lm[root@localhostcalculator]#lscalculatorcwidget.cppcwidget.omain.omoc_cwidget.cppcalculator.procwidget.hmain.cppMakefilemoc_cwidget.o//上面生成的可执行文件“calculator”的名字是跟文件夹的名字相同的[root@localhostcalculator]#./calculator//生成的简单计算器如图左上角所示。生成的计算器可在Linux虚拟系统中运行,但不可加载到GT2440开发板上面,只是一个虚拟程序。若想生成可加载到开发板的程序,则需用另一种编译方法。在GT2440开发板的资料中有hello这个可测试文件,我们就用它来修改就行了,将hello文件夹中的build和hello.pro文件复制到calculator文件夹中,之后[root@localhostlgl]#cdcalculator[root@localhostcalculator]#lsbuildcwidget.cppcwidget.hhello.desktophello.promain.cpp//如果build的颜色为黑色,则须执行[root@localhostcalculator]#chmod+xbuild//将build变为可执行文件,然后[root@localhostcalculator]#vihello.pro//打开hello.pro之后可看到如图界面,将其修改为:DESTDIR=$(pwd)表示在当前目录下生成可执行文件,TARGET=calculator表示生成的文件名字为“calculator”,保存后[root@localhostcalculator]#lsbuildcwidget.cppcwidget.hhello.desktophello.promain.cpp[root@localhostcalculator]#./buildrm-f.obj/release-shared/moc_cwidget.orm-f.moc/release-shared/moc_cwidget.cpprm-f.obj/release-shared/cwidget.o.obj/release-shared/main.orm-f*~core*.corearm-linux-g++-c-pipe-DQWS-fno-exceptions-fno-rtti-Wall-W-Os-DQT_NO_QWS_VFB-DQTOPIA_DATA_LINKING-DQCONFIG=\qconfig-qpe.h\-DQTOPIA_TARGET=\calculator\-DQTOPIA_TRTARGET=\calculator\-DQT_NO_DEBUG-I/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qtopia/mkspecs/qws/linux-arm-g++-I.-I/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qtopia/include-I/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qt2/include-I.ui/release-shared/-I.moc/release-shared/-o.obj/release-shared/cwidget.ocwidget.cppcwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:29:warning:deprecatedconversionfromstringconstantto'char*'cwidget.cpp:31:warning:unusedparameter'parent'cwidget.cpp:31:warning:unusedparameter'name'cwidget.cpp:Inmemberfunction'voidCWidget::setValue()':cwidget.cpp:68:warning:comparisonbetweensignedandunsignedintegerexpressionsarm-linux-g++-c-pipe-DQWS-fno-exceptions-fno-rtti-Wall-W-Os-DQT_NO_QWS_VFB-DQTOPIA_DATA_LINKING-DQCONFIG=\qconfig-qpe.h\-DQTOPIA_TARGET=\calculator\-DQTOPIA_TRTARGET=\calculator\-DQT_NO_DEBUG-I/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qtopia/mkspecs/qws/linux-arm-g++-I.-I/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qtopia/include-I/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qt2/include-I.ui/release-shared/-I.moc/release-shared/-o.obj/release-shared/main.omain.cpp/opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qt2/bin/moccwidget.h-o.moc/release-shared/moc_cwidget.cpparm-linux-g++-c-pipe-DQWS-fno-except

1 / 6
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功