forked from cherry-embedded/CherryDAP
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HSLink Pro board (cherry-embedded#11)
* The details are as follows: - Distinguish between onboard 20P and custom pin - Support IO over JTAG - Support changing LED RST and other pins in cmakelists file - support Adjust frequency for swj clock * projects: hpm5301evklite: add jtag over single jtag * add: Bootloader工程 * add: 添加App工程 * add: 添加Github Action * fix: -Wattributes * feat: 在bootloader里面加入对于外设的初始化 * update: 更新路径 * refactor: 不需要EXPANSION配置宏了 * chore: 可通过外部宏指定FW_VER * feat: 添加用于配置的HID接口 * fix: SWD切换电平问题 * fix: 关闭HID接口的时候有些代码会编译出错 * chore: CI添加上传APP区域的bin文件 * fix: action语法错误 * release: 2.2.1 * chore: 更新CherryUSB库到1.4.0 * chore: 统一脚本路径 * chore: 添加合并的bin文件 * fix: 文件一起上传 * fix: 脚本路径错误 * chore: 使用dd来合并bin * fix: some warning * fix: HID部分接口更新到CherryUSB 1.4.0 * update: 更新WS2812库 * fix: 让退出bl的时候灯珠始终保持关闭 * chore: 将XPI0的长度修改为128k,方便检查 * feat: 添加唯一的serial number * add: app中添加WS2812驱动 * format: 格式化代码 * feat: 增加运行时LED * fix: SWDIO空闲的时候默认为输入状态,由target拉高 * release: 2.2.2 * add: 添加单SPI模拟JTAG * fix: 增加对TMS的电平转换方向控制 * fix: JTAG下DIR有误 * update: 将初始化SWDIO部分放在APP区 * fix: 先使用GPIO模拟JTAG * add: 添加README * fix: 修改P_EN的IO端口 * fix: Vref计算有误 * fix: 加入了IO模拟SWD的DIR切换 * fix: UART引脚切换 * release: 2.2.3.IO * fix: IO模拟SWD时序 * release: 2.2.4.IO * fix: 减少兼容性问题 * Merge remote-tracking branch 'RCSN/feature/refine_the_options_for_swd_jtag' into HSLink-Pro --------- Co-authored-by: Runcheng Lu <[email protected]>
- Loading branch information
Showing
44 changed files
with
6,916 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: HPM Build | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/HPM-build.yml' | ||
- 'projects/HSLink-Pro/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/HPM-build.yml' | ||
- 'projects/HSLink-Pro/**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: gregdavill/[email protected] | ||
|
||
# 创建riscv-none-elf-到riscv32-unknown-elf-的软链接 | ||
- name: Create riscv-none-elf- to riscv32-unknown-elf- symlink | ||
run: | | ||
sudo bash ./.github/workflows/create_riscv32_symlink.sh | ||
- name: Install HPM SDK | ||
run: | | ||
cd ~ | ||
git clone https://github.com/hpmicro/sdk_env.git --recursive | ||
- name: Create Python Venv | ||
run: | | ||
python3 -m venv ~/HPM_PYTHON | ||
source ~/HPM_PYTHON/bin/activate | ||
pip install pyyaml jinja2 | ||
- uses: seanmiddleditch/gha-setup-ninja@master | ||
|
||
- name: Build bootloader | ||
run: | | ||
cd projects/HSLink-Pro/bootloader | ||
export HPM_SDK_BASE=~/sdk_env/hpm_sdk | ||
export GNURISCV_TOOLCHAIN_PATH=~/risv32-unknown-elf | ||
export HPM_SDK_TOOLCHAIN_VARIANT=gcc | ||
export PYTHON_EXECUTABLE=~/HPM_PYTHON/bin/python3 | ||
cmake -GNinja -DBOARD=hpm5301evklite -DHPM_BUILD_TYPE=flash_xip -DCMAKE_BUILD_TYPE=release -Dpython_exec="~/HPM_PYTHON/bin/python3" -DRV_ARCH="rv32imac_zicsr_zifencei" . -B=./build | ||
cmake --build ./build | ||
- name: Build APP | ||
run: | | ||
cd projects/HSLink-Pro/src | ||
export HPM_SDK_BASE=~/sdk_env/hpm_sdk | ||
export GNURISCV_TOOLCHAIN_PATH=~/risv32-unknown-elf | ||
export HPM_SDK_TOOLCHAIN_VARIANT=gcc | ||
export PYTHON_EXECUTABLE=~/HPM_PYTHON/bin/python3 | ||
cmake -GNinja -DBOARD=hpm5301evklite -DHPM_BUILD_TYPE=flash_uf2 -DCMAKE_BUILD_TYPE=release -Dpython_exec="~/HPM_PYTHON/bin/python3" -DRV_ARCH="rv32imac_zicsr_zifencei" -DCONFIG_HSLINK_PRO_EXPANSION=ON -DCONFIG_SWDIO_DIR=IOC_PAD_PA30 . -B=./build | ||
cmake --build ./build | ||
- name: Merge Bin | ||
run: | | ||
cd projects/HSLink-Pro | ||
cp bootloader/build/output/HSLink-Pro-Bootloader.bin Merger.bin | ||
dd if=src/build/output/HSLink-Pro.bin of=Merger.bin bs=1024 seek=127 conv=notrunc | ||
- run: | | ||
mkdir -p releases | ||
cd releases | ||
cp ../projects/HSLink-Pro/bootloader/build/output/HSLink-Pro-Bootloader.bin HSLink-Pro-Bootloader.bin | ||
cp ../projects/HSLink-Pro/src/build/output/HSLink-Pro.uf2 HSLink-Pro.uf2 | ||
cp ../projects/HSLink-Pro/src/build/output/HSLink-Pro.bin HSLink-Pro.bin | ||
cp ../projects/HSLink-Pro/Merger.bin Merger.bin | ||
- name: Upload file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release | ||
path: | | ||
releases/HSLink-Pro-Bootloader.bin | ||
releases/HSLink-Pro.uf2 | ||
releases/HSLink-Pro.bin | ||
releases/Merger.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
old_path="/home/runner/work/_temp/.setup-riscv-gnu-toolchain/bin" | ||
|
||
new_path="/home/runner/risv32-unknown-elf/bin" | ||
mkdir -p $new_path | ||
|
||
cd $old_path | ||
|
||
# 查找所有以 "riscv-none-elf-" 开头的文件 | ||
for file in riscv-none-elf-*; do | ||
# 如果文件存在 | ||
if [[ -e "$file" ]]; then | ||
# 构造新的链接名称 | ||
new_link="$new_path/riscv32-unknown-elf-${file#riscv-none-elf-}" | ||
|
||
# 创建软链接 | ||
ln -s "$old_path/$file" "$new_link" | ||
|
||
printf "Create symlink: %s -> %s\n" "$new_link" "$file" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule CherryUSB
updated
from 3c1168 to 02ac1d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.