Workflow file for this run
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
name: HPM Build | |
on: | |
push: | |
paths: | |
- '.github/workflows/HPM-build.yml' | |
- 'projects/hpm5301evklite/**' | |
pull_request: | |
paths: | |
- '.github/workflows/HPM-build.yml' | |
- 'projects/hpm5301evklite/**' | |
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: mxschmitt/action-tmate@v3 | |
- name: Build bootloader | |
run: | | |
cd projects/hpm5301evklite/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: Upload bootloader | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bootloader | |
path: projects/hpm5301evklite/bootloader/build/output/demo.bin |