(1). CPU: Andes RISC CPU core_N12.
(2). 平台: ADP-XC5FF676 V1.1.
(3). Linux OS: Ubuntu10.04.
(4). Toolchains: AndeSight v1.3.3 for Linux.
(5). Embedded Linux2.6.18
2. 目的:
(1). 至 http://www.linuxfromscratch.org/blfs/view/cvs/multimedia/libmad.html 下載libmad 函式庫source code並移植至Andes Core.
(2). MAD(MPEG Audio Decoder)是提供MPEG音效解碼之用的函式庫,目前支援MPEG-1以及MPEG-2,與一般常使用到的MP3(MPEG-1 Layer 3).
3. 實驗步驟:
(1). 使用Terminal輸入〝source bashrc.nds32le-linux-V0〞指定交叉編譯路徑,這的步驟請參照setup步驟.
(2). 輸入〝tar xvf libmad-0.15.1b.tar.gz〞解壓縮.
(3). 輸入〝cd libmad-0.15.1b/〞至libmad目錄下.
(4). 開啟〝config.sub〞檔案修改程式.
Line 234增加,
Line 301增加 .
注意:〝Tab鍵〞與〝空白鍵〞差異.
(5). 輸入〝./configure --host=nds32le-linux CXX=nds32le-linux-g++ --prefix=/usr/local/mad〞自動設定Makefile參數.
(6). 輸入〝make〞開始編譯.
(7). 輸入〝sudo PATH=/home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin:$PATH make install〞,輸入password開始安裝.
(8). 安裝的函式庫位置在〝/usr/local/mad/〞下.
備註:
--enable-speed : optimize for speed over accuracy.
--enable-accuracy : optimize for accuracy over speed
--disable-debugging : do not compile with debugging support, and use more optimizations.
--disable-shared : do not build a shared library.
--enable-fpm=ARCH : use the ARCH-specific version of the fixed-point math assembly routines
--enable-sso : use the subband synthesis optimization,with reduced accuracy.
--disable-aso : do not use certain architecture-specific optimizations.
--enable-debugging : enable diagnostic debugging support and debugging symbols.
--enable-profiling : generate `gprof' profiling code.
--enable-experimental : enable code using the EXPERIMENTAL preprocessor define.
(2). 輸入〝
(3). 輸入〝
(4). 輸入〝
(5). 開啟〝
(6). 使其指定為for Andes Core的GCC做交叉編譯.
CC=
(8). 結果產生出
3. 輸入〝
4. 輸入〝
5. 在編譯前須先修改一些程式,至開啟目錄〝
6. 修改程式,增加line 246,
與line 327(注意有Tab鍵與空白鍵的差異).
7. 開啟目錄〝
8. 修改程式line 68 ,修改成
9. 輸入〝
10. 輸入〝
11. 編譯完成後,輸入〝
12. 結果產生在根目錄〝
4. 將上一章節的範例程式複製至Qt Creator,開啟OpenCV路徑〝
5. 開啟歨驟2~3所創造的New Project,使用滑鼠點選〝
下載完整程式:
7. 使用滑鼠點選〝
8. 按〝
4. 輸入〝
5. 輸入〝
6. 輸入〝
*注意: 編譯前要先使用〝Synaptic Package Manager〞安裝〝
7. 輸入〝
8. 安裝完畢,測試程式,輸入〝
9. 輸入〝
10. 輸入〝
