<var id="fnfpo"><source id="fnfpo"></source></var>
<rp id="fnfpo"></rp>

<em id="fnfpo"><object id="fnfpo"><input id="fnfpo"></input></object></em>
<em id="fnfpo"><acronym id="fnfpo"></acronym></em>
  • <th id="fnfpo"><track id="fnfpo"></track></th>
  • <progress id="fnfpo"><track id="fnfpo"></track></progress>
  • <tbody id="fnfpo"><pre id="fnfpo"></pre></tbody>

  • x
    x
    查看: 3856|回復: 1
    打印 上一主題 下一主題

    Jlink+RVDS單步調試 ARM11(S3C6410)裸奔程序

    [復制鏈接]
    跳轉到指定樓層
    樓主
    發表于 2013-9-30 14:19:26 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
    關鍵詞: Jlink , RVDS , ARM11 , S3C6410
    作者:武漢華嵌技術部
    開發平臺:XP
    目標平臺:S3c6410
    開發工具:RVDS  J-LINK(V8)

    一、搭建開發環境:
    1、下載rvds2.2安裝程序軟件包。
    2、解壓后,進入RVDS軟件包中的Crack文件夾中,運行keygen,用generate產生license file (注意自己的系統時間   最好是真實的當前時間,如果時間比較舊的話,產
    生的license file 將不能注冊。license file 和系統時間、網卡物理地址、硬盤的序列號有關)
    2、安裝軟件。
    3、在安裝過程中會出現選擇license Wizard     選  Install Wizard   ...   選擇 license.dat 目錄  
    4、拷貝 license.dat 到安裝目錄下面去。
    5、應用補丁注入工具Patch.exe給下邊列出的文件注入校驗和。(Patch.exe 在RVDS軟件包中的Crack文件夾中)
    the files need to be patched:
       
      %Install Path%\IDEs\CodeWarrior\CodeWarrior\5.6.1\1592\win_32-pentium\bin\Plugins\License\oemlicense.dll
      %Install Path%\IDEs\CodeWarrior\RVPlugins\1.0\86\win_32-pentium\oemlicense\oemlicense.dll
      %Install Path%\RDI\armsd\1.3.1\66\win_32-pentium\armsd.exe
      %Install Path%\RDI\AXD\1.3.1\98\win_32-pentium\axd.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\armasm.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\armcc.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\armcpp.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\armlink.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\fromelf.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\tcc.exe
      %Install Path%\RVCT\Programs\2.2\349\win_32-pentium\tcpp.exe
      %Install Path%\RVD\Core\1.8\734\win_32-pentium\bin\tvs.exe
      %Install Path%\RVD\Core\1.8\734\win_32-pentium\bin\xry100.dll
      %Install Path%\RVARMulator\ARMulator\1.4.1\206\win_32-pentium\armiss.sdi
      %Install Path%\RVARMulator\ARMulator\1.4.1\206\win_32-pentium\armulate.sdi
      %Install Path%\RVARMulator\ARMulator\1.4.1\206\win_32-pentium\v6armiss.sdi
      %Install Path%\RVARMulator\v6ARMulator\1.4.1\238\win_32-pentium\v6thumb2.sdi
      %Install Path%\RVARMulator\v6ARMulator\1.4.1\238\win_32-pentium\v6trustzone.sdi
    到此 RVDS環境完成。
    二、接下來就是搭建調試環境了。
    這里采用的調試工具是J-LINK。記得要用V8的哦。╒6的能下載程序到SRAM 中,但是不能調試)
    1、安裝JLink4.22驅動程序  (記得要是JLink4.22的,其它的不保證可以哦。
    2、安裝Setup_JLinkARM_V410i
    3、插好J-LINK,然后打開 AXD debugger  即AXD debugger v1.31。
    Option->Configure Target->Add
    Add 選擇 JLink4.22 安裝目錄下的 JLinkRDI.dll
    單擊 OK 進入 AXD
    此時,調試環境已搭建好了,可以開始寫第一個裸奔程序了。
    三、 在RVDS環境上實現第一個裸奔程序
    1、創建工程。 打開 CodeWarrior for RVDS,
      file->new 創建一個程序
           在對話款中選擇ARM Executable Image  ,指定工程路徑及工程名,設置好后點擊確認后創建工程。

    2、編輯代碼文件。
    點擊 file選項下面的那個圖標(new next file),創建代碼編輯文件,在這里編寫代碼,寫完后保存文件。
    把剛創建的那個文件添加工程目錄上面去。
    3、配置編譯選項。
    點擊工程目錄上面的 Debug setting 選項。
    需要設置的選項有
    1、 Language Setting 下面的 RealView Asse..。
    在對話框下的 Target選項  點擊Architecture or 選項的下拉框 選擇ARM1176JZF-S(這是 S3c6410 的處理器內核)
            2、 Language Setting 下面的 RealView comp...
    在對話框下的 Target選項  點擊Architecture or 選項的下拉框 選擇ARM1176JZF-S
            3、 Linker   下面的 RealView Linker
      在 Output 選項中 linktype 中的 simple, 設置 simple image 中的R0 Base 為 0x00  RW Bage 為 0x800。
    4、Debugger 下面的RealView Debu...  選擇調試環境AXD
    5、Debugger 下面的RealView Runner  選擇調試環境AXD
    其它的設置可以暫且不管。
    4、點擊 Make 編譯編輯的程序。
    5、點擊 debug 調試程序。
    代碼例子:
    AREA  start,CODE,READONLY
    ENTRY
    _start
      LDR     R0,  =0x7F008834              ; 設置按鍵接口為輸入模式
      MOV    R1, #0x00
      STR     R1, [R0]
      LDR     R0, =0x7F008820          ;  設置led 燈接口為輸出模式
      LDR     R1, =0x00001111
      STR     R1, [R0]
      LDR     R0, =0x7F008824             ;設置led 的初始狀態為滅
       MOV    R1, #0x00000000
      STR     R1, [R0]
      
      LDR     R0, =0x7F0080A0            ;設置蜂鳴器接口為輸出模式
      LDR     R1, =0x40000000
      STR     R1, [R0]
      LDR     R0, =0x7F0080A4           ;設置蜂鳴器的初始狀態為不鳴叫狀態
      LDR     R1, =0x00
      STR     R1, [R0]
      
    main_loop
      LDR       R0, =0x7F008834               ; 讀取按鍵的狀態
      LDR       R2, [R0]
      MVN       R1, R2
      AND       R1,R1,#0x0F
      LDR       R0, =0x7F008824              ; 控制led 輸出
      STR       R1, [R0]
      MOV      R3,#0x00
      
      CMP      R1, #0x01                          ;判斷是否有按鍵按下 鳴有的話蜂鳴器
    MOVEQ   R3, #0x08000
    CMP      R1, #0x02
    MOVEQ   R3, #0x08000
    CMP      R1, #0x04
    MOVEQ   R3, #0x08000
    CMP      R1, #0x08
    MOVEQ   R3, #0x08000

    LDR       R0, =0x7F0080A4
        STR       R3, [R0]
      B          main_loop
    END
    沙發
    發表于 2013-11-10 13:14:02 | 只看該作者
    xiexie
    您需要登錄后才可以回帖 登錄 | 立即注冊

    本版積分規則

    關于我們  -  服務條款  -  使用指南  -  站點地圖  -  友情鏈接  -  聯系我們
    電子工程網 © 版權所有   京ICP備16069177號 | 京公網安備11010502021702
    快速回復 返回頂部 返回列表
    精品一区二区三区自拍图片区_国产成人亚洲精品_亚洲Va欧美va国产综合888_久久亚洲国产精品五月天婷