Skip to content

Commit

Permalink
create with sdk v1.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan QIAN <jianghao.qian@hpmicro.com>
  • Loading branch information
jhqian committed Jul 3, 2023
1 parent 675f4b4 commit 26acba9
Show file tree
Hide file tree
Showing 8,800 changed files with 1,575,524 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hpm_sdk"]
path = hpm_sdk
url = git@github.com:hpmicro/hpm_sdk.git
114 changes: 114 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Change Log

## [1.2.0] - 2023-06-30:
- update SDK to v1.2.0
- project_generator: support cmake building with custom board path parameter.

## [1.1.0] - 2023-03-31:
- update SDK to v1.1.0
- tools: ft2232 driver update to libusbk
- doc: add hpm6200evk quick start guide

## [1.0.0] 2022-12-31:

- Update SDK to v1.0.0
- Add HPM6750EVK2 quick guide
- Add runtime for start_gui

## [0.14.0] 2022-10-31:

### Changed
- Update SDK to v0.14.0
- update cmake to 3.24

### Added
- project_generator


## [0.13.1] 2022-08-22:

### Changed
- Update SDK to v0.13.1

### Fixed
- start_cmd.cmd: fix open terminal here issue

## [0.13.0] 2022-07-31:

### Changed
- Update SDK to v0.13.0

### Added
- Add script to generate all ses projects
- doc: add hpm_sw_qsg

## [0.12.1] 2022-07-01:

### Changed
- Update SDK to v0.12.1

## [0.12.0] 2022-06-30:

### Changed
- Update SDK to v0.12.0
- Update doc

### Added
- start_cmd: add long path support

## [0.11.0] 2022-05-31:

### Changed
- Update SDK to v0.11.0
### Added
- Add hpm6360evk quick guide

## [0.10.0_hpm6360] 2022-05-16:

### Changed
- Update SDK supporting HPM6360

## [0.10.0] 2022-04-30:

### Changed
- Update gcc toolchain supporting multilib and newlib-nano

### Added
- Add program_flash.cmd support programming flash using openocd
- generate_project.cmd: add tinyuf2 loadeable build type: flash_uf2, flash_sdram_uf2

## [0.9.0] 2022-03-31:

### Changed
- Update SDK to 0.9.0

### Added
- Add registry file to enable long path on Windows

## [0.8.1] 2022-03-09:

### Changed
- update openocd to fix issue cmsis-dap can't connected.

## [0.4.0] 2022-03-04:

### Changed
- Update SDK to 0.8.0
- Update openocd to take parameter from config file to config onboard flash

## [0.3.1] 2022-02-13:

### Changed:
- Update SDK to 0.7.1

### Added:
- Add option to generate project for secondary core

## [0.3.0] 2022-01-30:

### Changed:
- Update SDK to 0.7.0
- Update usb driver for FTDI to winusb from libusbk
- Update openocd with improved flash erasing
- Update included gnu gcc toolchain

33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# HPM SDK Development Environment for Windows

## Quick Start Guide
1. Install FT2232 driver.
![Install driver](doc/img/ftdi_install.png)
1. Open `start_cmd.cmd` to start a windows command prompt for HPM SDK development, it will configure all needed environment variables (only effective in this windows command prompt, not changing any in current system globally). So all the following operations need to be executed in this window command prompt opened by `start_cmd.cmd`. This windows command prompt will be refered as **sdk prompt**
1. The script will generate all examples' segger project of all vailable boards under folder samples_ses_project by clicking `generate_all_ses_projects.cmd`.
1.
## Folder structure:
- hpm_sdk: sdk root directory in which sdk zip package should be unzip to, please make sure the folder of "cmake" can be found via path hpm_sdk\cmake
- toolchains: toolchain should be put in this folder. For example, copy toolchain files to toolchains folder, then riscv32-elf-\*-gcc.exe must be found at toolchains\TOOLCHAIN_NAME\bin
- Note:
- TOOLCHAIN_NAME needs to be configured correctly in start_cmd.cmd
- tools:
- ninja
- cmake
- python3
- openocd
- scripts
- FTDI_InstallDriver.exe: FT2232 windows driver installer
- doc: documentation

## FAQ
### Can't find FTDI debug probe
- Make sure install driver (FTDI_InstallDriver.exe) correctly. Please be aware it might need to be installed again if the debug usb cable is pluged to another USB port on PC.
### Segger Embedded Studio fails to debug
Please try to following options
- Reopen Segger Embedded Studio, and try to debug again
- Close Segger Embedded Sutdio, then kill the process of "openocd" in Window task manager, reopen Segger Embedded Studio and try to debug again.
- Set boot mode to "ISP" or "Serial Download Mode" on evaluation board, then press reset button the board, try to debug again.
### Issue caused by Windows 10 path limit
To enable long path support, please import registry file located at tools/scripts/win10_enable_long_path.reg. For more details about this limitation, please refer to https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd

32 changes: 32 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# HPM SDK Windows 开发环境配置工具

## 快速开始指南
1. 安装FT2232驱动。
![驱动安装](doc/img/ftdi_install.png)
1. 双击`start_cmd.cmd`,该脚本将开启一个Windows命令行窗口,之后文中将以***sdk prompt***指代该命令行窗口。(***sdk prompt***中将把所有HPM SDK开发依赖的环境变量以及对应工具的路径设置正确,作用范围仅在***sdk prompt***内,不影响当前系统中的变量。)
1. 双击`generate_all_ses_projects.cmd`,该脚本会在同级目录下生成文件夹samples_ses_project,该文件夹包含各种类型板子所有用例的segger工程
1.
## 目录结构:
- hpm_sdk: hpm_sdk存放目录,当更新SDK时,需要将SDK解压至该文件夹,并确保可以存在hpm_sdk\cmake路径
- toolchains: 工具链存放目录。当更新工具链时,将对应工具链解压至该文件夹(以TOOLCHAIN_NAME为例),并确保可以在toolchains\TOOLCHAIN_NAME\bin路径下可以找到riscv32-elf-unknown-gcc.exe可执行文件
- 注意:
- 使用不同toolchain的时候,对应TOOLCHAIN_NAME需要在start_cmd.cmd中进行正确配置
- tools:
- ninja
- cmake
- python3
- openocd
- scripts
- FTDI_InstallDriver.exe: FT2232 windows 驱动
- doc: 文档目录

## 常见问题:
### 无法找到ftdi调试器
- 确保正确安装FTDI_InstallDriver.exe驱动。注意:如果更换了PC USB端口, 有可能需要重新安装驱动
### Segger Embedded Studio无法进行调试
可以做下尝试
- 重新打开Segger Embedded Studio
- 在Windows任务管理器中将残留的openocd进程终止
- 将开发板上启动模式拨成“在系统编程“或者“串行启动”,再按RESET按钮,再尝试调试
### Windows 10路径长度限制
若要解除路径长度限制可以通过导入tools/scripts/win10_enable_long_path.reg。 有关该限制的详细信息, 请参考https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd
32 changes: 32 additions & 0 deletions cmd_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
script: tools/project_generator/preset.bat
path:
HPM_SDK_BASE: hpm_sdk
GNURISCV_TOOLCHAIN_PATH: toolchains/rv32imac-ilp32-multilib-win
CMAKE: tools/cmake
NINJA: tools/ninja
OPENOCD: tools/openocd
PYTHON3: tools/python3
SCRIPTS: tools/scripts
env:
HPM_SDK_BASE: ~
GNURISCV_TOOLCHAIN_PATH: ~
HPM_SDK_TOOLCHAIN_VARIANT:
- gcc
- nds-gcc
- nds-llvm
build-type:
release: ~
debug: ~
flash_xip: ~
flash_xip_release: ~
flash_sdram_xip: [femc]
flash_sdram_xip_release: [femc]
flash_uf2: [usb-otg]
flash_uf2_release: [usb-otg]
flash_sdram_uf2: [femc, usb-otg]
flash_sdram_uf2_release: [femc, usb-otg]
sec_core_img: [multicore]
sec_core_img_release: [multicore]
default-type: [flash_sdram_xip, flash_xip]
default-sample: hello_world
default-board: hpm6750evkmini
Binary file added doc/HPM6200EVK_QSG.pdf
Binary file not shown.
Binary file added doc/HPM6300EVK_QuickGuide.pdf
Binary file not shown.
Binary file added doc/HPM6750EVK2_QuickGuide.pdf
Binary file not shown.
Binary file added doc/HPM6750EVKMINI_UG.pdf
Binary file not shown.
Binary file added doc/HPM6750EVK_UG.pdf
Binary file not shown.
Binary file added doc/HPM_SW_QSG.pdf
Binary file not shown.
Binary file added doc/img/ftdi_install.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions generate_all_ses_projects.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@echo off
rem Copyright 2022 hpmicro
rem SPDX-License-Identifier: BSD-3-Clause
rem This script can produce segger project under samples_ses_project dir
setlocal enabledelayedexpansion

@rem Please modify the following variable
set VBSCRIPT=Msgbox("Do you want to generate segger project?"+vbcrlf+"This process will cost several minutes." +vbcrlf +"If you choose ok"+vbcrlf +"(1) If LongPathsEnabled registry is not enabled, one cmd window will run"+vbcrlf + ^
" You can close it after LongPathsEnabled is set"+vbcrlf +"(2) More cmd windows will run to generate segger projects"+vbcrlf +" Please don't close them",1,"Warning")
for /f "Delims=" %%a in ('MsHta VBScript:Execute("CreateObject(""Scripting.Filesystemobject"").GetStandardStream(1).Write(%VBSCRIPT:"=""%)"^)(Close^)') do Set "MSHTA_RETURN_VALUE=%%a"
if not %MSHTA_RETURN_VALUE% == 1 (
goto EXIT
)
cd %~dp0
if exist "start_cmd.cmd" (
call start_cmd.cmd true
) else (
echo "start_cmd.cmd can not be found"
pause
goto EXIT
)
if "%HPM_SDK_BASE%"=="" (
echo HPM_SDK_BASE needs to be defined first, pointing to the root directory of HPM_SDK
pause
goto EXIT
)
set LONG_PATH_VALUE=0
:CHECK_LONG_PATH
FOR /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled 2^>nul`) DO (
set LONG_PATH_VALUE=%%C
)
if not '%LONG_PATH_VALUE%' EQU '0x1' (
goto CHECK_LONG_PATH
)
set HPM_PROJECT_BASE=%~dp0
set SES_PROJ=%HPM_PROJECT_BASE%samples_ses_project
if exist "%SES_PROJ%" (
rd /q /s %SES_PROJ%
)
md %SES_PROJ%
cd %SES_PROJ%
for /D %%B in ("%HPM_SDK_BASE%\boards\*") DO (
set BOARD=%%~nB
if exist "%%B\CMakeLists.txt" (
echo %SES_PROJ%\!BOARD!
if exist "%SES_PROJ%\!BOARD!" (
rd /q /s %SES_PROJ%\!BOARD!
)
md %SES_PROJ%\!BOARD!
cd %SES_PROJ%\!BOARD!
start /i "Compile !BOARD! seggger project" /MIN /realtime %HPM_PROJECT_BASE%tools\scripts\generate_board_ses_projects.cmd !BOARD! %SES_PROJ%\!BOARD! %HPM_PROJECT_BASE%
)
)
goto EXIT
:EXIT
endlocal
1 change: 1 addition & 0 deletions hpm_sdk
Submodule hpm_sdk added at 2d5e67
Loading

0 comments on commit 26acba9

Please sign in to comment.