<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      HPM5301EVKlite windows下上手使用

      HPM5301介紹

      HPM5301是先輯半導體出的一款300Mhz的riscV芯片,售價7.99,開發板售價39.99,性價比超高

      資源獲取

      evklite基本不需要原理圖,下載SDK和ENV即可
      SDK連接:https://github.com/hpmicro/hpm_sdk
      hpm5301還需要打下patch: https://github.com/hpmicro/hpm_sdk/releases/download/v1.3.0/hpm_sdk_v1.3.0_patch-hpm5301evklite.zip
      ENV連接:https://github.com/hpmicro/sdk_env
      注:國內gitee上也有相同倉庫

      環境搭建

      windows下,官方的SDK_ENV提供了所有的依賴文件,通過GUI配置即可。

      1. 解壓HPM_SDK,然后將sdk下的所有文件復制或移動到SDK_ENV下的HPM_SDK中

      2. 運行START_GNU.EXE

      3. 選擇board,選擇example
        image

      4. generateProject,成功后 open build console,輸入ninja編譯
        image

      5. 通過openocd下載

      下載

      CHIP有兩種方式,一種是使用標準的jtag下載調試,另外一種是使用ISP下載。

      JTAG

      jtag目前可以用jlink,ft232,ft2332,標準的DAP-Link(某閹割jtag協議的WCH-link就別嘗試了)。如果使用jlink的話,需要用jlinkV10以上版本,不然無法通過jlink-gdb-sever進行調試。使用openocd的話,還要注意替換驅動,不然openocd無法識別jlink。
      這里使用openocd+gdb的方式進行調試下載。
      hpm_sdk/board/openocd里有所需的cfg,切換到該目錄下,執行openocd -f probes\jlink.cfg -f soc\hpm5300.cfg -f boards\hpm5301evklite.cfg
      結果如下:

      D:\workspace\git\hpm5301\sdk_env-1.3.0\hpm_sdk\boards\openocd>openocd -f probes\jlink.cfg -f soc\hpm5300.cfg -f boards\hpm5301evklite.cfg
      Open On-Chip Debugger 0.11.0+dev-02365-g488108c93 (2023-09-18-18:58)
      Licensed under GNU GPL v2
      For bug reports, read
              http://openocd.org/doc/doxygen/bugs.html
      srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
      
      Info : Listening on port 6666 for tcl connections
      Info : Listening on port 4444 for telnet connections
      Info : J-Link V9 compiled May  7 2021 16:26:12
      Info : Hardware version: 9.50
      Info : VTarget = 3.282 V
      Info : clock speed 10000 kHz
      Info : JTAG tap: hpm5361.cpu tap/device found: 0x1000563d (mfg: 0x31e (Andes Technology Corporation), part: 0x0005, ver: 0x1)
      Info : [hpm5361.cpu0] datacount=4 progbufsize=8
      Info : Examined RISC-V core; found 1 harts
      Info :  hart 0: XLEN=32, misa=0x4090112f
      [hpm5361.cpu0] Target successfully examined.
      Info : starting gdb server for hpm5361.cpu0 on 3333
      Info : Listening on port 3333 for gdb connections
      

      然后再open build console,開啟GDB:riscv32-unknown-elf-gdb

      D:\workspace\git\hpm5301\sdk_env-1.3.0\toolchains\rv32imac-ilp32-multilib-win\bin\riscv32-unknown-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
      GNU gdb (GDB) 10.1
      Copyright (C) 2020 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
      Type "show copying" and "show warranty" for details.
      This GDB was configured as "--host=x86_64-w64-mingw32 --target=riscv32-unknown-elf".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <https://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
          <http://www.gnu.org/software/gdb/documentation/>.
      
      For help, type "help".
      Type "apropos word" to search for commands related to "word".
      (gdb)
      

      輸入以下指令下載程序并運行

        gdb> file output\demo.elf
        gdb> target remote localhost:3333
        gdb> load
        gdb> b main
        gdb> c
      

      輸出如下:

      (gdb) file output/demo.elf
      Reading symbols from output/demo.elf...
      (gdb) target remote localhost:3333
      Remote debugging using localhost:3333
      0x20017a10 in ?? ()
      (gdb) load
      Loading section .nor_cfg_option, size 0x10 lma 0x80000400
      Loading section .boot_header, size 0x90 lma 0x80001000
      Loading section .start, size 0x3e lma 0x80003000
      Loading section .vectors, size 0x2a0 lma 0x8000303e
      Loading section .text, size 0xa4aa lma 0x800032de
      Loading section .data, size 0x1d8 lma 0x8000d788
      Start address 0x80003000, load size 43520
      Transfer rate: 14 KB/sec, 5440 bytes/write.
      (gdb) c
      Continuing.
      

      運行效果如圖:
      image

      ISP下載

      按住boot鍵后按下復位,chip會進入bootloader模式,此時可以通過用戶手冊提供的指令進行下載,或是使用官方提供的HPMpragrammer
      image
      進入bootloader模式后,需要通過串口轉USB鏈接TX0/RX0,選擇對應的COM口后,點擊Attach,此時左下角會提示設備連接成功。
      20231130_1453 貌似此軟件暫時未適配53xx系列,始終下載失敗。

      占坑待續

      posted @ 2023-11-30 11:25  USTHzhanglu  閱讀(2727)  評論(6)    收藏  舉報
      主站蜘蛛池模板: 这里只有精品在线播放| 久久国产乱子精品免费女| 国产女人喷潮视频免费| 国产999精品2卡3卡4卡| 亚洲高潮喷水无码AV电影| 爱情岛亚洲论坛成人网站| 亚洲精品漫画一二三区| 国产一区二区三区精美视频| 高清破外女出血AV毛片| 国产成人精品午夜福利| 视频一区视频二区卡通动漫| 亚洲国产中文字幕精品| 亚洲中文字幕无码久久精品1| 久在线精品视频线观看| 国产不卡一区二区精品| 东京热高清无码精品| 亚洲天堂av 在线| 2020精品自拍视频曝光| 成年女人免费视频播放体验区| 国产AV永久无码青青草原| 久久国内精品一国内精品| 亚洲国产成人午夜在线一区| 国产成人精品18| 久国产精品韩国三级视频| 我国产码在线观看av哈哈哈网站| 普格县| 亚洲粉嫩av一区二区黑人| 天堂√最新版中文在线地址| 不卡一区二区三区在线视频| 久久久久免费看成人影片| 青青草无码免费一二三区| 99精品国产精品一区二区| 日本中文字幕乱码免费| 久热这里只有精品视频六| 武陟县| 亚洲一区成人在线视频| 久久99精品久久久久久| 91中文字幕一区在线| 亚洲免费观看一区二区三区| 肥西县| 日韩中文字幕高清有码|