(5) 選擇選單項project build target 或快捷鍵f7,生成目標**。
(6) 選擇選單項debug start/stop debug session 或快捷鍵ctrl+f5,即可進入除錯模式。這裡使用的是μvision3 ide中的軟體**器。
(7) 選擇選單項debug run 或快捷鍵f5,即可執行**;在memory視窗中,觀察位址0x30000058~0x30000094的內容,與位址0x300000a8 ~0x300000e4的內容。
(8) 單步執行程式並觀察和記錄暫存器與memory的值的變化,注意觀察步驟(7)中位址的內容變化,當執行stmfd、ldmfd、stmia指令的時候,注意觀察其後面引數所指位址段或暫存器段的內容變化。
5、實驗參考程式
global reset_handler
area start,code,readwrite
entry
code32
num equ 20set number of words to be copied */
reset_handler
ldr r0, =srcr0 = pointer to source block */
ldr r1, =dstr1 = pointer to destination block */
mov r2, #numr2 = number of words to copy */
ldr sp, =0x30200000set up stack pointer (r13) */
blockcopy
movs r3,r2, lsr #3number of eight word multiples */
beq copywordsless than eight words to move ? */
stmfd sp!, {r4-r11s**e some working registers */
octcopy
ldmia r0!, {r4-r11load 8 words from the source */
stmia r1!, {r4-r11and put them at the destination */
subs r3, r3, #1decrement the counter */
bne octcopycopy more */
ldmfd sp!, {r4-r11don't need these now - restore originals */
copywords
ands r2, r2, #7number of odd words to copy */
beq stopno words left to copy ? */
wordcopy
ldr r3, [r0], #4a word from the source */
str r3, [r1], #4store a word to the destination */
subs r2, r2, #1decrement the counter */
bne wordcopycopy more */
stop
b stop;
ltorg;
src dcd 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4
dst dcd 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
end6、實驗結果
7、實驗總結
通過本次實驗,我掌握了使用idm/stm、b、b1等質量完成較為複雜的儲存區訪問和程式分的方法。
學會了如何使用條件碼,並進一步加強了對cpsr的認識。
嵌入式實驗
1 實驗目的 1 學會qt e在arm裝置上的移植方法與步驟 2 學習qt中訊號與槽的程式設計 3 掌握qt e在arm裝置上的常用輸入輸出裝置移植方法。2 實驗內容 1 移植qt e到up arm2410cl上 2 在qt e中新增觸控螢幕滑鼠等裝置支援 3 在qt designer下編寫程式,a...
嵌入式 實驗三
嵌入式處理器實驗 指導書 掌握pcb檔案的新建和pcb基本設定 介紹如如何新建pcb檔案以及載入封裝圖。通過實驗聯絡,掌握實驗內容。1.實驗三新建pcb檔案以及pcb基本設定 2.實驗目的 掌握pcb檔案的新建以及pcb基本設定 3.實驗要求 通過實驗,達到實驗目的。4.實驗原理及內容 在prote...
嵌入式流水燈實驗
一 實驗目的 熟悉lpc2000系列arm7微控制器的gpio輸入控制。二 實驗裝置 硬體 pc機一台 lpc2131教學實驗開發平台一套 軟體 windows 98 xp 2000系統,ads1.2整合開發環境。三 實驗內容 1.p0.7管腳控制easyarm教學實驗開發平台上的蜂鳴器報警。2.g...