Fan Yang 59feb97ced [bsp][hpmicro] fix 'scons -dist' issue in the hpmicro bsps. (#10013) 2 maanden geleden
..
applications 0bd93292b3 [bsp][hpmicro] Update libraries, add new BSPs 1 jaar geleden
board 13e0671f65 [fal] using rt-thread raw API instead of std API 5 maanden geleden
figures 0bd93292b3 [bsp][hpmicro] Update libraries, add new BSPs 1 jaar geleden
startup 96ba787e25 Bugfix/fix weak handle trap in riscv common crash rv64 trap handling (#9189) 10 maanden geleden
.config f7de9de7dd update(cherryusb): add config for hpm6750 usbdev and usbhost 8 maanden geleden
Kconfig fe3c4d456e bsp中option env语句替换为新语句,并同步更新了source "$xxx"语句 11 maanden geleden
README.md e03342ff6b [bsp][hpmicro] add HPM5300EVK,HPM5301EVKLITE and HPM6800EVK support & update hpm_sdk 11 maanden geleden
README_zh.md e03342ff6b [bsp][hpmicro] add HPM5300EVK,HPM5301EVKLITE and HPM6800EVK support & update hpm_sdk 11 maanden geleden
SConscript 0bd93292b3 [bsp][hpmicro] Update libraries, add new BSPs 1 jaar geleden
SConstruct 0df9a9f0cc [bsp][hpmicro]添加utest相关段信息,修复scons编译问题 8 maanden geleden
rtconfig.h f7de9de7dd update(cherryusb): add config for hpm6750 usbdev and usbhost 8 maanden geleden
rtconfig.py 59feb97ced [bsp][hpmicro] fix 'scons -dist' issue in the hpmicro bsps. (#10013) 2 maanden geleden
rtconfig_preinc.h 0bd93292b3 [bsp][hpmicro] Update libraries, add new BSPs 1 jaar geleden

README.md

HPMicro HPM6750EVK2 BSP(Board Support Package) Introduction

中文页 |

Introduction

This document provide brief introduction of the BSP (board support package) for the HPM6750EVK2 development board.

The document consists of the following parts:

  • HPM6750EVK2 Board Resources Introduction
  • Quickly Getting Started
  • Refreences

By reading the Quickly Get Started section developers can quickly get their hands on this BSP and run RT-Thread on the board. More advanced features will be introduced in the Advanced Features section to help developers take advantage of RT-Thread to drive more on-board resources.

Board Resources Introduction

HPM6750EVK2 is a development board based on the RISC-V core launched by HPMicro, with rich on-board resources and on-chip resources for Display, Audio, motor control, etc. board

Peripheral Condition

Each peripheral supporting condition for this BSP is as follows:

On-board Peripherals Support Note
USB
QSPI Flash
Ethernet Dual Ethernet Ports
GPIO
SPI
I2C
SDIO
RTC
PWM
On-Board Debugger x 10-Pin JTAG port

Execution Instruction

Quickly Getting Started

The BSP support being build via the 'scons' command, below is the steps of compiling the example via the 'scons' command

Parpare Environment

  • Step 1: Prepare RT-Thread ENV
  • Step 2: Prepare toolcahin
    • Download the package and extract it into a specified directory, for example: C:\DevTools\riscv32-gnu-toolchain
  • Step 3: Set environment variable RTT_RISCV_TOOLCHAIN to <TOOLCHAIN_DIR>\bin
    • For example: C:\DevTools\riscv32-gnu-toolchain\bin
  • Step 4: Prepare OpenOCD
    • Download and extract it to specified directory, for example: C:\DevTools\openocd-hpmicro
    • Add OpenOCD environment variable OPENOCD_HPMICRO to <OPENOCD_HPMICRO_DIR>\bin
    • For example: C:\DevTools\openocd-hpmicro\bin

Configure and Build project

Open RT-Thread ENV command-line, and change directory to this BSP directory, then users can:

  • Configure the project via menuconfig in RT-Thread ENV
  • Build the project using scons -jN, N equals to the number of CPU cores
  • Clean the project using scons -c

Hardware Connection

  • Switch BOOT pin to 2'b00
  • Connect the Off-board debugger to 10-PIN JTAG port

Dowload / Debug

  • Users can download the project via the below command:

    %OPENOCD_HPMICRO%\openocd.exe -f boards\debug_scripts\probes\cmsis_dap.cfg -f boards\debug_scripts\soc\hpm6750-single-core.cfg -f boards\debug_scripts\boards\hpm6750evk2.cfg -c "init; halt; flash write_image erase rtthread.elf; reset; shutdown"
    
  • Users can debug the project via the below command:

    • Connect debugger via OpenOCD:

      %OPENOCD_HPMICRO%\openocd.exe -f boards\debug_scripts\probes\cmsis_dap.cfg -f boards\debug_scripts\soc\hpm6750-single-core.cfg -f boards\debug_scripts\boards\hpm6750evk2.cfg
      
    • Start Debugger via GDB:

      %RTT_EXEC_PATH%\riscv32-unknown-elf-gdb.exe rtthread.elf
      
    • In the gdb shell, type the following commands:

      load
      c
      

Running Results

Once the project is successfully downloaded, the system runs automatically. The LED on the board will flash periodically.

Connect the serial port of the board to the PC, communicate with it via a serial terminal tool(115200-8-1-N). Reset the board and the startup information of RT-Thread will be observed:

 \ | /
- RT -     Thread Operating System
 / | \     5.0.1 build Aug 16 2023 18:18:18
 2006 - 2023 Copyright by RT-Thread team

References