(1). CPU: Andes RISC CPU core_N12.
(2). 平台: ADP-XC5FF676 V1.1.
(3). Linux OS: Ubuntu9.04.
(4). Toolchains: AndeSight v1.3.3 for Linux.
(5). Embedded Linux2.6.18
2. 目的: 使用跨平台Qt Creator設計GUI介面,再移植至ADP-XC5實驗板.
3. 實驗步驟:
(1). 使用滑鼠選擇Ubuntu下的〝Applications〞->〝Programming〞->〝Qt Creator〞開啟Qt Creator.
注意:編譯前,先在根目錄指定Toolchains,使用〝Terminal〞輸入〝source bashrc.nds32le-linux-V0〞,指定編譯路徑.









注意:如要編輯程式請使用滑鼠選擇元件後按〝滑鼠右鍵〞->〝Go to slot...〞既可編輯程式.
(9). 開始編譯跨平台程式:
A. 方式一.使用〝Terminal〞編譯:
(a). 選擇Qt Creator下的〝File〞->〝Save All〞,跳出對話框按〝Save All〞存檔.





(a). 使用滑鼠選擇Qt Creator〝Tools〞->〝Options...〞->〝Qt4〞:
設定:
*Version Name: QtEmbedded-4.5.1-generic
*Path: /usr/local/Trolltech/QtEmbedded-4.5.1-generic(QT for Embedded Linuxu編譯結果存檔路徑)
*設定完成後按〝+〞符號按鈕,增加〝Default Qt Version: 〞的選項.
(b). 設定〝Default Qt Version: QtEmbedded-4.5.1-generic〞->〝OK〞.

# modifications to g++.conf
QMAKE_CC = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-gcc -EL -G0 -Wa,-mno-small-data
QMAKE_CXX = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-g++ -EL -G0 -Wa,-mno-small-data
QMAKE_LINK = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-g++ -EL -G0 -Wa,-mno-small-data
QMAKE_LINK_SHLIB = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-g++ -EL -G0 -Wa,-mno-small-data
# modifications to linux.conf
QMAKE_AR = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-ar cqs
QMAKE_OBJCOPY = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-objcopy
QMAKE_STRIP = /home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin/nds32le-linux-strip


注意:如ADP-XC5重新開機,請延續使用上一章節Embedded Linux系統視窗程式設計-QT(4-3)移植Qt for Enbedded Linux的步驟(17).~(22),如無重新開機可省略.



〝printf “\033[9;0]” > /dev/tty0〞,開啟.
注意:中斷測試程式按〝Ctrl+C〞.
(12). 程式執行完畢後要卸載SD需再根目錄輸入〝umount /tmp〞.

2個頁面, 在Embedded Linux/Ubuntu 上用QT做GUI有人會嗎?幫朋友問的,急…
回覆刪除你是使用Andes core嗎??
回覆刪除編譯的過程,這個部落格寫的非常清楚,依照歨驟操作一定做的出來.