Skip to content

Generic H723VETx uses wrong upload.maximum_data_size (528384), causing invalid RAM_D1/stack placement and early HardFault #2936

@harry10086

Description

@harry10086

Description

The Generic H723VETx board definition appears to use an incorrect RAM size in boards.txt.

Current entry:

GenH7.menu.pnum.GENERIC_H723VETX.upload.maximum_data_size=528384

In STM32duino core 2.12.0, this value is passed to the linker as:

-Wl,--defsym=LD_MAX_DATA_SIZE=528384

This produces an invalid RAM_D1 / stack layout for STM32H723VETx and causes the application to fault very early after reset.

Observed behavior

The sketch:

  • compiles successfully
  • uploads successfully
  • has a valid vector table at 0x08000000

But after reset:

  • the program enters BusFault / HardFault very early
  • UART startup output never appears

Root cause

With the current upload.maximum_data_size=528384, the linker places the stack top at:

_estack = 0x24081000

This is too high for this target and leads to an invalid RAM_D1 layout.

When overriding the linker symbol to:

LD_MAX_DATA_SIZE=327680

the generated memory layout becomes:

RAM_D1 = 0x24000000 / 0x50000
_estack = 0x24050000

and the same firmware runs correctly.

Fault evidence

Observed fault registers on hardware:

CFSR = 0x00008600
HFSR = 0x40000000
BFAR = 0x24080FA8
ABFSR = 0x00000308

This is consistent with an early bus fault caused by invalid RAM/stack placement.

How to reproduce

Board:

  • STMicroelectronics:stm32:GenH7
  • pnum=GENERIC_H723VETX
  • core version: 2.12.0

Compile normally with the generic board definition and flash to STM32H723VETx hardware.

The firmware may compile and upload, but it faults immediately after reset.

Workaround

Override the linker RAM size during build:

--build-property compiler.c.elf.extra_flags='-Wl,--defsym=LD_MAX_DATA_SIZE=327680'

After doing this, the firmware runs normally.

Proposed fix

Please change the boards.txt entry for GENERIC_H723VETX from:

GenH7.menu.pnum.GENERIC_H723VETX.upload.maximum_data_size=528384

to:

GenH7.menu.pnum.GENERIC_H723VETX.upload.maximum_data_size=327680

Additional note

Other H723 entries already use 327680, for example:

  • WeActMiniH723VGTX
  • GENERIC_H723ZETX
  • GENERIC_H723ZGTX

So this looks like a board-definition metadata inconsistency rather than a general H723 issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions