boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board#18573
boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board#18573FelipeMdeO wants to merge 3 commits intoapache:masterfrom
Conversation
8050202 to
1e40242
Compare
|
Hello @acassis , @linguini1 , @xiaoxiang781216 , can you give me some tips before open PR officially, please? |
|
@FelipeMdeO Can you Rebase with Master Branch to trigger the CI Build? We just fixed the CI Build. Thanks :-) |
|
@FelipeMdeO nice work, please divide this PR in three commits: arch support, board support, documentation |
1e40242 to
a63d9ad
Compare
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>
98c405a to
48beede
Compare
|
@lupyuen , can you review this PR also, please? |
|
please fix: |
|
Hi @FelipeMdeO I think we need to change the title boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board This is a new board |
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>
48beede to
9bf613f
Compare
done |
Some logs/artifacts from your testing would be great to include! |
Hello @linguini1 , I am adding log showing ostest and other tests. |
9bf613f to
447f2b5
Compare
447f2b5 to
c9b7689
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds/extends NuttX support for the Holtek HT32F491x3 family and the ESK32 (HT32F49163 Starter Kit) board, enabling a usable esk32:nsh configuration with board bring-up, user LEDs, and documentation.
Changes:
- Adds an HT32F491x3 ARM chip port (startup, IRQ, SysTick timer, GPIO, USART, vector table, and hardware register headers).
- Adds the ESK32 board port (clock config, bring-up mounting
/bin+/proc, user LED support via/dev/userleds, build scripts, and anshdefconfig). - Adds flashing helper scripts (Windows PowerShell + WSL bash) and Sphinx documentation for the platform/board.
Reviewed changes
Copilot reviewed 44 out of 45 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| boards/arm/ht32f491x3/esk32/tools/flash.sh | WSL flashing backend using Holtek OpenOCD package. |
| boards/arm/ht32f491x3/esk32/tools/flash.py | Host wrapper to dispatch to Windows/WSL flashing backends. |
| boards/arm/ht32f491x3/esk32/tools/flash.ps1 | Native Windows flashing backend using Holtek OpenOCD package. |
| boards/arm/ht32f491x3/esk32/src/ht32_userleds.c | Implements board_userled* APIs for ESK32 LEDs and /dev/userleds support. |
| boards/arm/ht32f491x3/esk32/src/ht32_boot.c | Board clock setup for 150 MHz via HEXT->PLL sequence. |
| boards/arm/ht32f491x3/esk32/src/ht32_appinit.c | Board bring-up: registers user LEDs and mounts /bin + /proc. |
| boards/arm/ht32f491x3/esk32/src/Makefile | Adds board source compilation rules. |
| boards/arm/ht32f491x3/esk32/src/CMakeLists.txt | Adds board sources for CMake builds and sets LD script. |
| boards/arm/ht32f491x3/esk32/scripts/ld.script | Linker script for HT32F49163 (256K flash / 48K SRAM). |
| boards/arm/ht32f491x3/esk32/scripts/Make.defs | Board toolchain/link settings. |
| boards/arm/ht32f491x3/esk32/include/board.h | Board pin mapping for USART1 and LEDs; board prototypes. |
| boards/arm/ht32f491x3/esk32/configs/nsh/defconfig | Enables NSH, binfs/procfs mounts, userleds, and test apps for ESK32. |
| boards/arm/ht32f491x3/esk32/Kconfig | Board-specific Kconfig notes. |
| boards/arm/ht32f491x3/esk32/CMakeLists.txt | Adds ESK32 board subdirectory for CMake. |
| boards/Kconfig | Registers ARCH_BOARD_ESK32 and default board name mapping. |
| arch/arm/src/ht32f491x3/ht32f491x3_timerisr.c | SysTick setup and timer ISR for HT32F491x3. |
| arch/arm/src/ht32f491x3/ht32f491x3_start.h | Startup hooks prototypes for HT32F491x3. |
| arch/arm/src/ht32f491x3/ht32f491x3_start.c | Reset entry/startup, .bss clear, .data init, then nx_start(). |
| arch/arm/src/ht32f491x3/ht32f491x3_serial.h | USART init and pinmux hook prototypes. |
| arch/arm/src/ht32f491x3/ht32f491x3_serial.c | USART driver implementation (console + ttyS devices). |
| arch/arm/src/ht32f491x3/ht32f491x3_lowputc.h | Early console and UART config prototypes. |
| arch/arm/src/ht32f491x3/ht32f491x3_lowputc.c | Early low-level console setup and board pinmux dispatch for USART. |
| arch/arm/src/ht32f491x3/ht32f491x3_irq.c | NVIC/exception/IRQ enable/disable/prioritize implementation. |
| arch/arm/src/ht32f491x3/ht32f491x3_gpio.h | Public internal GPIO helper API for the HT32F491x3 port. |
| arch/arm/src/ht32f491x3/ht32f491x3_gpio.c | GPIO helper implementation (mode/AF/pull/drive + read/write). |
| arch/arm/src/ht32f491x3/ht32f491x3_config.h | Consolidates HAVE_UART/HAVE_CONSOLE feature flags. |
| arch/arm/src/ht32f491x3/hardware/ht32f491x3_uart.h | UART register offsets/bitfields for HT32F491x3. |
| arch/arm/src/ht32f491x3/hardware/ht32f491x3_pwc.h | PWC register/bit definitions (LDO output select). |
| arch/arm/src/ht32f491x3/hardware/ht32f491x3_memorymap.h | Memory map base addresses for HT32F491x3. |
| arch/arm/src/ht32f491x3/hardware/ht32f491x3_gpio.h | GPIO register offsets and bitfield helper macros. |
| arch/arm/src/ht32f491x3/hardware/ht32f491x3_flash.h | Flash interface register definitions (wait states). |
| arch/arm/src/ht32f491x3/hardware/ht32f491x3_crm.h | CRM register offsets/bitfields (clock tree setup). |
| arch/arm/src/ht32f491x3/chip.h | Chip glue (memory map include, IRQ include, interrupt count). |
| arch/arm/src/ht32f491x3/arm_vectors.c | Custom vector table layout matching Holtek reserved slots and FWID entry. |
| arch/arm/src/ht32f491x3/Make.defs | Adds HT32F491x3 chip sources to the ARM build. |
| arch/arm/src/ht32f491x3/Kconfig | Chip selection + clock frequency config + USART1 serial driver option. |
| arch/arm/src/ht32f491x3/CMakeLists.txt | Adds HT32F491x3 chip sources to the ARM CMake build. |
| arch/arm/src/Makefile | Makes clean/distclean resilient if the chip dirlink/Make.defs is missing. |
| arch/arm/include/ht32f491x3/irq.h | Top-level IRQ definitions for HT32F491x3 include tree. |
| arch/arm/include/ht32f491x3/ht32f491x3_irq.h | External interrupt numbering table for HT32F491x3. |
| arch/arm/include/ht32f491x3/chip.h | Chip-wide constants (flash size variants, SRAM size, clock macros, NVIC priorities). |
| arch/arm/Kconfig | Registers ARCH_CHIP_HT32F491X3 and sources the chip Kconfig. |
| Documentation/platforms/arm/ht32f491x3/index.rst | Adds platform documentation index and board toctree. |
| Documentation/platforms/arm/ht32f491x3/boards/esk32/index.rst | Adds ESK32 board documentation (features, pinout, build/flash/testing). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Document the HT32F491x3 ESK32 board, build steps, flashing flow, and validation commands. Add WSL and PowerShell flash backends plus a Python wrapper. Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
c9b7689 to
981ca61
Compare
Summary
This PR improves the existing HT32F491x3 ESK32 board support.
Changes included:
esk32:nsh/binand/prochello,ostest,dumpstack, andledsinesk32:nsh/dev/userledsImpact
esk32:nshnow provides/bin,/proc,/dev/userleds, and useful built-in appsTesting
./tools/configure.sh -l esk32:nshmake -jmake -C Documentation htmlHardware tested on HT32F49163 Starter Kit:
/binand/procmounted/dev/userledsregisteredhello,ostest,dumpstack, andledsexecuted successfully