1. 開發環境:
(1). CPU: Andes RISC CPU core_N12.
(2). 平台: ADP-XC5FF676 V1.1.
(3). Windows OS: MS-Windows XP.
(4). Toolchains: AndeSight v1.4 for MS-Windows XP.
2. 實驗目的:
(1). 使用ESL模擬平台環境下LCD顯示器控制.
(2). 此實驗目的主要是了解模擬實現LCD圖片顯示,如此一來使用者在不需實體開發板的環境下,也可事先開發LCD圖片顯示的程式.
(3). 使用STD C Project增加新的project.
(4). 增加.VEP內SID元件.
3. 實驗步驟:
(1). 建立新的STD C Project,使用滑鼠選擇〝
File〞->〝
New〞->〝
STD C Project〞.

程式下載:
http://cid-b01cb9ac20175eaa.office.live.com/self.aspx/6%5E_AndeSight%5E_VEP%5E_ESL%5E_LCD/6%5E_AndeSight%5E_VEP%5E_ESL%5E_LCD.zip
(2). 在〝
Project name:〞欄位輸入計畫名稱,這裡輸入〝
LCD〞,之後按下〝
Next>〞至下個一歨驟.

(3). 不需做任何設定,按〝
Finish〞結束選擇.

(4). 接下來要加入已撰寫好的程式,先使用〝
滑鼠左鍵〞點選Project,再點選〝
滑鼠右鍵〞,之後選擇〝
Import〞.

(5). 使用滑鼠點選〝
File System〞後,按〝
Next>〞至下一個走驟.

(6). 在〝
From directory:〞欄位輸入遇加入程式的路徑,這裡按〝
Browse〞來選擇.

(7). 選擇程式路徑,這裡選擇〝
LCD〞後按〝
確定〞.

(8). 勾選遇加入的程式檔案,選擇完畢按〝
Finish〞.
注意: 增加檔案時,如有〝
.cdtbuild〞,〝
.cdtproject〞,〝
.project〞的Project參數設定檔案請勿加入,以免覆蓋掉目前產生的Project參數.

(9). 最後編譯程式,先使用〝
滑鼠左鍵〞點選Project,再點選〝
滑鼠右鍵〞,之後選擇〝
Build Project〞.

(10). 接下來修改〝
.VEP〞,使用滑鼠點選〝
EX_LCD_V.vep〞,編輯視窗顯示目前的模擬架構.

(11). 將滑鼠游標移動至〝
Palette〞,這時會跳出所有模組的元件.

(12). 使用滑鼠用拖拉的方式加入〝
LCDC〞元件,之後再用〝
Connect〞將元件依照下圖所示連結起來.

(13). 設定LCD參數前,需開啟相關視窗,使用滑鼠選擇〝
Window〞->〝
Other〞.

(14). 使用〝
Ctrl+
滑鼠左鍵〞再選擇〝
Clock Setting〞與〝
Memory Map〞,選擇好後按〝
OK〞.

(15). 之後選擇〝
Clock Setting〞視窗,〝
Clock Setting〞欄位為下拉式選單,依照下圖所示選擇〝
HOST〞參數.

(16). 之後選擇〝
Memory Map〞視窗,在AHB下LCD的〝
Base〞欄位輸入〝
0x90600000〞, 〝Size(Byte)〞欄位輸入〝
0x00001000〞,其他參數會自動加入.

(17). 之後按〝
Save〞圖示ICOM存檔.

(18). 接下來要啟動之前設定好的ESL〝
.VEP〞設定檔,使用滑鼠擇〝
Target〞->〝
Fork VEP Target〞.

(19). 按〝
Browse...〞選擇project下已修改好的.VEP檔後按 〝
Finish〞.

(20). 最後可以看到模擬平台的VEP產生.

(21). 接下來要執行程式,先使用〝
滑鼠左鍵〞點選Project,再點選〝
滑鼠右鍵〞,之後選擇〝
Run As〞->〝
Run〞.

(22). 使用〝
滑鼠左鍵〞點兩下〝
Cross Platform Application〞.

(23). 之後如下圖所示.

(24). 之後再選擇〝
Debugger〞,在〝
GDB debugger:〞欄位選擇〝
nds32le-elf-gdb.exe〞的路徑,按〝
Browse〞選擇,設定完畢後按〝
Run〞.
注意: 〝
nds32le-elf-gdb.exe〞的選擇要與這個STD C Project下makefile所設定的編譯器〝
nds32le-elf-gcc〞路徑參數相同.

(25). 最後會在LCD(LCDC)模擬視窗顯示結果.

(26). 最後當程式執行完畢,需要修改程式之前,先至跳至〝
Debug〞視窗,請按〝
Remove All Terminated Launches〞圖示ICOM,將此次的程式設定清除.
沒有留言:
張貼留言