Skip to content

boards/arm/n32h7: Add N32H765ZIL7_STB board support - #22591

Merged
xiaoxiang781216 merged 3 commits into
apache:masterfrom
freakishness:boards/n32h765zil7-stb
Dec 5, 2026
Merged

xiaoxiang781216 merged 3 commits into
apache:masterfrom
freakishness:boards/n32h765zil7-stb

Conversation

@freakishness

Copy link
Copy Markdown
Contributor

Summary

  • Add support for the Nation Tech N32H765ZIL7_STB development kit
    (N32H765ZIL7, Cortex-M7).
  • arch/arm/src/n32h7: add the ARCH_CHIP_N32H765ZI chip choice
  • boards/arm/n32h7/n32h765zil7_stb: new board directory with the NSH
    profile (on-chip UART console, LEDs, buttons, user GPIO, PWM, SD/MMC,
    USB device, CORDIC and PROGMEM).

Impact

  • Is new feature added? YES: new board and new chip selection.
  • Impact on user (will user need to adapt to change)? NO.
  • Impact on build (will build process change)? NO: only a new board
    config is added; existing configurations are unchanged. The rcc
    change only affects builds that compile n32h76x_rcc.c.
  • Impact on hardware (will arch(s) / board(s) / driver(s) change)?
    YES: adds an N32H7 arch board and the N32H765ZI chip variant.
  • Impact on documentation (is update required / provided)? NO, not
    provided in this PR.
  • Impact on security (any sort of implications)? NO.
  • Impact on compatibility (backward/forward/interoperability)? NO.
  • Anything else to consider or add? The rcc_enableapb1() fix also
    affects the existing N32H762II build path (same source file).

Testing

I confirm that changes are verified on local setup and works as intended:

  • Build Host(s): Windows 11 (MSYS2 UCRT64), x64, arm-none-eabi-gcc
    16.2.0, CMake + Ninja.
  • Target(s): ARM Cortex-M7, n32h765zil7_stb:nsh.

Testing logs before change:
图片

PR verification Self-Check

  • This PR introduces only one functional change.
  • I have updated all required description fields above.
  • My PR adheres to Contributing Guidelines and Documentation (git
    commit title and message, coding standard, etc).
  • My PR is still work in progress (not ready for review).
  • My PR is ready for review and can be safely merged into a codebase.

@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 Nov 30, 2026
@freakishness
freakishness force-pushed the boards/n32h765zil7-stb branch from 2c3eba7 to 71a97f1 Compare November 30, 2026 11:09
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

GUIDINGLI
GUIDINGLI previously approved these changes Nov 30, 2026
@freakishness

Copy link
Copy Markdown
Contributor Author

The arm-other job seems to have failed due to an error while building mps3-an547/clang. However, it immediately re-ran the build and succeeded. I'm not entirely clear if the root cause of this job failure is related to my PR. Perhaps we should try re-running this job?

Build Attempt 1 of 4
====================================================================================
Configuration/Tool: mps3-an547/clang,CONFIG_ARM_TOOLCHAIN_CLANG
2026-11-30 22:33:04
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_CLANG
  Enabling CONFIG_ARM_TOOLCHAIN_CLANG
  Building NuttX...
tar: This does not look like a tar archive
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
make[1]: *** [compiler-rt/Make.defs:59: compiler-rt/compiler-rt] Error 2
make[1]: Target 'depend' not remade because of errors.
make: *** [tools/Unix.mk:701: pass2dep] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 397: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  [1/1] Normalize mps3-an547/clang
/github/workspace/sources/nuttx /github/workspace/sources/nuttx
HEAD detached at pull/22591/merge
nothing to commit, working tree clean
/github/workspace/sources/nuttx
/github/workspace/sources/apps /github/workspace/sources/nuttx
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
/github/workspace/sources/nuttx
Wait 27 seconds (60 backoff)
Build Attempt 2 of 4
====================================================================================
Configuration/Tool: mps3-an547/clang,CONFIG_ARM_TOOLCHAIN_CLANG
2026-11-30 22:33:49
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_CLANG
  Enabling CONFIG_ARM_TOOLCHAIN_CLANG
  Building NuttX...
  [1/1] Normalize mps3-an547/clang

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@freakishness please fix:

====================================================================================
Configuration/Tool: n32h765zil7_stb/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2026-11-30 22:35:39
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 23902  100 23902    0     0  56351      0 --:--:-- --:--:-- --:--:--  118k

100  479k  100  479k    0     0   723k      0 --:--:-- --:--:-- --:--:-- 1401k
  [1/1] Normalize n32h765zil7_stb/nsh
183d182
< CONFIG_USART1_BAUD=115200
Saving the new configuration file
HEAD detached at pull/22591/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/n32h7/n32h765zil7_stb/configs/nsh/defconfig

liuzhao and others added 2 commits December 1, 2026 13:33
Two defects in n32h76x_rcc.c:

- rcc_reset() calls n32_pwr_setcorepwrsrc() unconditionally, which fails
  to link when CONFIG_N32H7_PWR is not enabled. Guard the call with that
  configuration.

- rcc_enableapb1() reads N32_RCC_APB1EN1 but writes the result back to
  N32_RCC_APB1EN2. The enabled bits (_M7SPI3EN, _M7DAC12EN, _M7WWDG2EN)
  live in EN2, so read EN2 to preserve the other bits in that register
  instead of clobbering them with the EN1 value.

Signed-off-by: liuzhao <aroma0225@gmail.com>
Add CONFIG_ARCH_CHIP_N32H765ZI to the N32H7 chip choice.  Like the
N32H762II, this part has N32H76X peripherals and I-sized flash; it
selects the Z pinout.  Extend the chip guard in chip.h and irq.h so
the memory map and interrupt definitions are selected for this part.

Signed-off-by: liuzhao <aroma0225@gmail.com>
xiaoxiang781216
xiaoxiang781216 previously approved these changes Dec 1, 2026
xiaoxiang781216
xiaoxiang781216 previously approved these changes Dec 1, 2026

@simbit18 simbit18 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @freakishness Please add Documentation to the N32H765ZIL7 chip and the Nation Tech N32H765ZIL7_STB development kit board.

https://nuttx.apache.org/docs/latest/platforms/arm/index.html

Use the template https://github.com/apache/nuttx/blob/master/Documentation/contributing/doc_templates/board.rst all boards needs to have tags, pictures, etc.

@freakishness
freakishness force-pushed the boards/n32h765zil7-stb branch 2 times, most recently from a43adff to d9c1b11 Compare December 3, 2026 06:57
Comment thread arch/arm/include/n32h7/chip.h Resolved
Add board support for the Nation Tech N32H765ZIL7_STB development kit.

Signed-off-by: liuzhao <aroma0225@gmail.com>
@freakishness
freakishness force-pushed the boards/n32h765zil7-stb branch from d9c1b11 to 9bdaf56 Compare December 5, 2026 04:53
@xiaoxiang781216
xiaoxiang781216 merged commit 3371c4e into apache:master Dec 5, 2026
55 of 60 checks passed
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.

4 participants