Skip to content

boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board#18573

Open
FelipeMdeO wants to merge 3 commits intoapache:masterfrom
FelipeMdeO:feature/ht32f49xx_port
Open

boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board#18573
FelipeMdeO wants to merge 3 commits intoapache:masterfrom
FelipeMdeO:feature/ht32f49xx_port

Conversation

@FelipeMdeO
Copy link
Contributor

@FelipeMdeO FelipeMdeO commented Mar 21, 2026

Summary

This PR improves the existing HT32F491x3 ESK32 board support.

Changes included:

  • enable board bring-up for esk32:nsh
  • mount /bin and /proc
  • enable hello, ostest, dumpstack, and leds in esk32:nsh
  • add HT32F491x3 internal GPIO helpers
  • add ESK32 user LED support and register /dev/userleds
  • add ESK32 board documentation

Impact

  • Is new feature added? Yes
  • Impact on user: esk32:nsh now provides /bin, /proc, /dev/userleds, and useful built-in apps
  • Impact on build: No global build changes
  • Impact on hardware: Yes, ARM/HT32F491x3 ESK32 board support
  • Impact on documentation: Yes
  • Impact on security: No

Testing

  • ./tools/configure.sh -l esk32:nsh
  • make -j
  • make -C Documentation html

Hardware tested on HT32F49163 Starter Kit:

  • NSH boot on USART1
  • /bin and /proc mounted
  • /dev/userleds registered
  • hello, ostest, dumpstack, and leds executed successfully
  • LED2, LED3, and LED4 toggled correctly

@github-actions github-actions bot added Area: Build system Arch: arm Issues related to ARM (32-bit) architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: arm labels Mar 21, 2026
@FelipeMdeO FelipeMdeO force-pushed the feature/ht32f49xx_port branch 2 times, most recently from 8050202 to 1e40242 Compare March 21, 2026 22:16
@FelipeMdeO
Copy link
Contributor Author

Hello @acassis , @linguini1 , @xiaoxiang781216 , can you give me some tips before open PR officially, please?

@lupyuen
Copy link
Member

lupyuen commented Mar 22, 2026

@FelipeMdeO Can you Rebase with Master Branch to trigger the CI Build? We just fixed the CI Build. Thanks :-)

@acassis
Copy link
Contributor

acassis commented Mar 23, 2026

@FelipeMdeO nice work, please divide this PR in three commits: arch support, board support, documentation

@FelipeMdeO FelipeMdeO force-pushed the feature/ht32f49xx_port branch from 1e40242 to a63d9ad Compare March 25, 2026 00:20
Add initial HT32F491x3 support with startup, IRQ handling,
serial console, GPIO helpers, custom vectors, and CMake build files.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
@FelipeMdeO FelipeMdeO force-pushed the feature/ht32f49xx_port branch from 98c405a to 48beede Compare March 25, 2026 00:54
@FelipeMdeO FelipeMdeO marked this pull request as ready for review March 25, 2026 01:13
@FelipeMdeO FelipeMdeO requested a review from simbit18 March 25, 2026 01:13
@FelipeMdeO
Copy link
Contributor Author

@lupyuen , can you review this PR also, please?

@xiaoxiang781216
Copy link
Contributor

please fix:

====================================================================================
Configuration/Tool: esk32/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2026-03-25 02:01:58
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
  [1/1] Normalize esk32/nsh
4,7c4,6
< # You can use "make menuconfig" to make any modifications to the installed
< # .config file.
< # You can then do "make savedefconfig" to generate a new defconfig file that
< # includes your modifications.
---
> # You can use "make menuconfig" to make any modifications to the installed .config file.
> # You can then do "make savedefconfig" to generate a new defconfig file that includes your
> # modifications.
13,14d11
< # CONFIG_NSH_DISABLE_IFCONFIG is not set
< # CONFIG_NSH_DISABLE_PS is not set
25d21
< CONFIG_EXAMPLES_LEDS=y
26a23
> CONFIG_EXAMPLES_LEDS=y
30d26
< CONFIG_HT32F491X3_PCLK2_FREQUENCY=150000000
32d27
< CONFIG_HT32F491X3_USART1_SERIALDRIVER=y
50a46
> CONFIG_TASK_NAME_SIZE=0
54,59d49
< CONFIG_TASK_NAME_SIZE=0
< CONFIG_USERLED=y
< CONFIG_USERLED_LOWER=y
< CONFIG_USART1_BAUD=115200
< CONFIG_USART1_BITS=8
< CONFIG_USART1_PARITY=0
62a53,54
> CONFIG_USERLED=y
> CONFIG_USERLED_LOWER=y
Saving the new configuration file
HEAD detached at pull/18573/merge
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/arm/ht32f491x3/esk32/configs/nsh/defconfig
```
by ./tools/refresh.sh --silent esk32/nsh @FelipeMdeO 

@simbit18
Copy link
Contributor

Hi @FelipeMdeO I think we need to change the title

boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board

https://www.bestmodulescorp.com/en/esk32-31402.html?srsltid=AfmBOoqVKM-qHVVYK9N7h2s0Mgthe3-KJbZConuKTtdMiuU-q2g0dxVN

This is a new board

@FelipeMdeO FelipeMdeO changed the title boards/arm/ht32f491x3: improve ESK32 nsh bring-up and userled support boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board Mar 25, 2026
Add the ESK32 board with nsh configuration, linker script,
board bring-up, flashing helper, and user LED support.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Document the HT32F491x3 ESK32 board, build steps,
flashing flow, and basic validation commands.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
@FelipeMdeO FelipeMdeO force-pushed the feature/ht32f49xx_port branch from 48beede to 9bf613f Compare March 25, 2026 11:25
@FelipeMdeO
Copy link
Contributor Author

please fix:

====================================================================================
Configuration/Tool: esk32/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2026-03-25 02:01:58
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
  [1/1] Normalize esk32/nsh
4,7c4,6
< # You can use "make menuconfig" to make any modifications to the installed
< # .config file.
< # You can then do "make savedefconfig" to generate a new defconfig file that
< # includes your modifications.
---
> # You can use "make menuconfig" to make any modifications to the installed .config file.
> # You can then do "make savedefconfig" to generate a new defconfig file that includes your
> # modifications.
13,14d11
< # CONFIG_NSH_DISABLE_IFCONFIG is not set
< # CONFIG_NSH_DISABLE_PS is not set
25d21
< CONFIG_EXAMPLES_LEDS=y
26a23
> CONFIG_EXAMPLES_LEDS=y
30d26
< CONFIG_HT32F491X3_PCLK2_FREQUENCY=150000000
32d27
< CONFIG_HT32F491X3_USART1_SERIALDRIVER=y
50a46
> CONFIG_TASK_NAME_SIZE=0
54,59d49
< CONFIG_TASK_NAME_SIZE=0
< CONFIG_USERLED=y
< CONFIG_USERLED_LOWER=y
< CONFIG_USART1_BAUD=115200
< CONFIG_USART1_BITS=8
< CONFIG_USART1_PARITY=0
62a53,54
> CONFIG_USERLED=y
> CONFIG_USERLED_LOWER=y
Saving the new configuration file
HEAD detached at pull/18573/merge
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/arm/ht32f491x3/esk32/configs/nsh/defconfig

by ./tools/refresh.sh --silent esk32/nsh @FelipeMdeO

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Area: Build system Board: arm Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants