diff options
| author | Fan YANG <[email protected]> | 2026-10-15 22:56:12 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-10-17 16:28:33 +0800 |
| commit | fc64f78669b42b35981f97c23c7e952832f3b48b (patch) | |
| tree | 8356bfed957b8ad84529e34ede28e6d65c975911 /.github | |
| parent | 8d8dc96b67eee53af2841a8819364d52fbec39cb (diff) | |
[bsp][hpmicro] upgrade hpm_sdk to v1.13.0 and add hpm5100evk support
Sync the HPMicro BSPs with hpm_sdk v1.13.0 and add the HPM5100EVK
(HPM5151) board.
- add the hpm5100evk BSP (board/startup/applications/Kconfig/docs) and
register it in .github/ALL_BSP_COMPILE.json, bsp/README.md and the
HPMicro READMEs
- re-sync the 11 existing boards (board/startup/debug scripts/linker
scripts/applications) with hpm_sdk v1.13.0, keeping the RT-Thread
specific parts: clock_time based drv_timer, CXX wired into the scons
environment, SConscript outputs under build/, named Kconfig choices,
rt_hw_us_delay in board_delay_*, board local codec files
- sync the shared driver layer with hpm_sdk v1.13.0 (GPTMRv2/PTMR,
PUART, soft I2C/SPI and the remaining peripheral driver updates)
- select the hpm_sdk v1.13.0 online package (PKG_USING_HPM_SDK_V113)
- use -Og instead of -O0 for the debug builds and print floats with the
RT-Thread klibc implementation instead of newlib nano
- initialize the RT-Thread heap before the SDK console init: the SDK
console_init() calls setvbuf(), which allocates through the C library
malloc() and tripped RT_ASSERT() in rt_smem_alloc() on the boards
built with RT_USING_DEBUG
- keep only ram_rtt.ld/flash_rtt.ld per board, align the DLM origin to
4KB on hpm5300evk/hpm5301evklite (the unaligned origin made the
linker emit a file backed PT_LOAD for the RAM area, which broke
"program rtthread.elf"), and anchor the generated .bin at the flash
base address 0x80000000
- sync the hpm6750evk openocd debug scripts with the new style used by
the other boards (hpm_common.cfg/hpm_reset.cfg with arp_halt)
- keep the upstream synced board/startup/libraries trees of bsp/hpmicro out of the
changed-file cppcheck run (same policy as bsp/hpmicro/.clang-format-ignore): the
check runs without the hpm_sdk include paths, so it reports ATTR_PLACE_AT and the
linker script symbol arithmetic in c_startup() as errors
- give the hpmicro boards in the changed-file scons trigger list the RV32 toolchain
they need (RISC-V-GCC-RV32) and add the matching installation step to that
workflow: the entries used sourcery-arm, which only provides the ARM toolchain,
so those legs could not find riscv32-unknown-elf-gcc
- keep hpm5100evk's ram_rtt.ld identical to the hpm_sdk v1.13.0
reference: the .fast_ram sections belong in DLM there (the DLM has
enough headroom), and that also makes its RAM and flash layouts agree
- skip the dependency pre-check when cleaning (scons -c): it runs from
DoBuilding() unconditionally, so a clean request with packages/ not
fetched yet was aborted with exit code 1 instead of cleaning
- make the manual scons trigger workflow runnable: it aborted while still
downloading actions because actions/upload-artifact@v3 is deprecated,
and scons was not on PATH because ~/.env/env.sh was never sourced.
Install tools/requirements.txt and source the Env PATH script in the
build step, and use @main action versions, as bsp_buildings.yml does
- start the LED demo thread only when rt_thread_create() succeeded
Tested:
- 12 boards x {ram_debug, ram_release, flash_debug, flash_release}:
48/48 clean builds
- flash boot + msh on hpm5100evk, hpm5300evk, hpm5e00evk, hpm6200evk,
hpm6300evk, hpm6750evk, hpm6750evk2, hpm6750evkmini, hpm6800evk,
hpm6e00evk, hpm6p00evk (list device/timer, ps, free, reset, rt_kprintf
float formatting)
- re-ran .github/workflows/manual_trigger_scons_except_STM32_all.yml with
the matrix reduced to the three hpmicro rows: all three legs build and
scons --dist succeeds with no local workarounds
Diffstat (limited to '.github')
| -rw-r--r-- | .github/ALL_BSP_COMPILE.json | 3 | ||||
| -rw-r--r-- | .github/membrowse-targets.json | 14 | ||||
| -rw-r--r-- | .github/workflows/manual_trigger_scons_except_STM32_all.yml | 21 |
3 files changed, 32 insertions, 6 deletions
diff --git a/.github/ALL_BSP_COMPILE.json b/.github/ALL_BSP_COMPILE.json index 090b7c0129..f0543b97ad 100644 --- a/.github/ALL_BSP_COMPILE.json +++ b/.github/ALL_BSP_COMPILE.json @@ -464,7 +464,8 @@ "hpmicro/hpm6800evk", "hpmicro/hpm6e00evk", "hpmicro/hpm6p00evk", - "hpmicro/hpm5e00evk" + "hpmicro/hpm5e00evk", + "hpmicro/hpm5100evk" ] }, { diff --git a/.github/membrowse-targets.json b/.github/membrowse-targets.json index 10c12b7aa5..a08a702836 100644 --- a/.github/membrowse-targets.json +++ b/.github/membrowse-targets.json @@ -194,6 +194,20 @@ ] }, { + "target_name": "hpmicro-hpm5100evk", + "toolchain": "riscv32-unknown-elf-multilib", + "bsp_path": "bsp/hpmicro/hpm5100evk", + "elf": "bsp/hpmicro/hpm5100evk/rtthread.elf", + "ld": "bsp/hpmicro/hpm5100evk/board/linker_scripts/gcc/flash_rtt.ld", + "map_file": "", + "linker_vars": "", + "watch_paths": [ + "bsp/hpmicro/hpm5100evk", + "bsp/hpmicro/libraries", + "bsp/hpmicro/tools" + ] + }, + { "target_name": "xuantie-e901plus", "toolchain": "xuantie-elf-newlib", "bsp_path": "bsp/xuantie/smartl/e901plus", diff --git a/.github/workflows/manual_trigger_scons_except_STM32_all.yml b/.github/workflows/manual_trigger_scons_except_STM32_all.yml index 85ab16cb49..cac5f842af 100644 --- a/.github/workflows/manual_trigger_scons_except_STM32_all.yml +++ b/.github/workflows/manual_trigger_scons_except_STM32_all.yml @@ -124,8 +124,9 @@ jobs: - {RTT_BSP_NAME: "hc32l196", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hc32l196"} - {RTT_BSP_NAME: "hifive1", RTT_TOOL_CHAIN: "sourcery-riscv-none-embed", RTT_BSP: "hifive1"} #- {RTT_BSP_NAME: "hk32_hk32f030c8-mini", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hk32/hk32f030c8-mini"} #scons dist有问题 - - {RTT_BSP_NAME: "hpmicro_hpm6750evk", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hpmicro/hpm6750evk"} - - {RTT_BSP_NAME: "hpmicro_hpm6750evkmini", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hpmicro/hpm6750evkmini"} + - {RTT_BSP_NAME: "hpmicro_hpm5100evk", RTT_TOOL_CHAIN: "RISC-V-GCC-RV32", RTT_BSP: "hpmicro/hpm5100evk"} + - {RTT_BSP_NAME: "hpmicro_hpm6750evk", RTT_TOOL_CHAIN: "RISC-V-GCC-RV32", RTT_BSP: "hpmicro/hpm6750evk"} + - {RTT_BSP_NAME: "hpmicro_hpm6750evkmini", RTT_TOOL_CHAIN: "RISC-V-GCC-RV32", RTT_BSP: "hpmicro/hpm6750evkmini"} - {RTT_BSP_NAME: "ht32f12366", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "ht32/ht32f12366"} - {RTT_BSP_NAME: "ht32f52352", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "ht32/ht32f52352"} #- {RTT_BSP_NAME: "imx_imx6ull-smart", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "imx/imx6ull-smart"} # toolchain还没支持 @@ -294,7 +295,7 @@ jobs: steps: - uses: actions/checkout@main - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@main with: python-version: 3.8 @@ -305,9 +306,11 @@ jobs: wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh chmod 777 install_ubuntu.sh ./install_ubuntu.sh + pip install -r tools/requirements.txt git config --global http.postBuffer 524288000 echo "RTT_ROOT=${{ github.workspace }}" >> $GITHUB_ENV echo "RTT_CC=gcc" >> $GITHUB_ENV + echo "export PATH=~/.env/tools/scripts:$PATH" > ~/.env/env.sh - name: Install Arm ToolChains if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && success() }} @@ -344,6 +347,14 @@ jobs: /opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV + - name: Install riscv32-unknown-elf ToolChains + if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'RISC-V-GCC-RV32' && success() }} + run: | + wget -q https://github.com/hpmicro/riscv-gnu-toolchain/releases/download/2022.05.15/riscv32-unknown-elf-newlib-multilib_2022.05.15_linux.tar.gz + sudo tar zxf riscv32-unknown-elf-newlib-multilib_2022.05.15_linux.tar.gz -C /opt + /opt/riscv32-unknown-elf-newlib-multilib/bin/riscv32-unknown-elf-gcc --version + echo "RTT_EXEC_PATH=/opt/riscv32-unknown-elf-newlib-multilib/bin/" >> $GITHUB_ENV + - name: Install Riscv-none-embed ToolChains if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv-none-embed' && success() }} run: | @@ -373,7 +384,7 @@ jobs: RTT_BSP: ${{ matrix.legs.RTT_BSP }} RTT_TOOL_CHAIN: ${{ matrix.legs.RTT_TOOL_CHAIN }} run: | - # source ~/.env/env.sh + source ~/.env/env.sh echo $RTT_BSP ls bsp/$RTT_BSP/Kconfig && scons -C bsp/$RTT_BSP --pyconfig-silent sed -i "s/# ${{ github.event.inputs.bsp_config }} is not set/${{ github.event.inputs.bsp_config }}=y/g" bsp/$RTT_BSP/.config @@ -386,7 +397,7 @@ jobs: cp bsp/$RTT_BSP/dist/project.zip ${{ github.workspace }}/$RTT_BSP/ ls bsp/$RTT_BSP/dist pwd - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@main if: ${{ github.event.inputs.dist_flag }} env: RTT_BSP: ${{ matrix.legs.RTT_BSP }} |
