Skip to content

stm32: allow excluding mbedTLS to fit flash-constrained stm32g474ret6#2367

Merged
bettio merged 1 commit into
atomvm:release-0.7from
pguyot:w29/stm32-optional-mbedtls
Jul 19, 2026
Merged

stm32: allow excluding mbedTLS to fit flash-constrained stm32g474ret6#2367
bettio merged 1 commit into
atomvm:release-0.7from
pguyot:w29/stm32-optional-mbedtls

Conversation

@pguyot

@pguyot pguyot commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

The stm32g474ret6 has only 384 KB of flash. Cumulative firmware growth pushed the build past that limit, and mbedTLS/crypto accounts for ~38 KB. The G474 has an RNG, so crypto was pulled in unconditionally via STM32_HAS_RNG.

Add an AVM_DISABLE_MBEDTLS option that forces the existing no-crypto build path (already used by RNG-less devices such as the G0B1) even on devices that have an RNG, and enable it for stm32g474ret6 in CI.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

The stm32g474ret6 has only 384 KB of flash. Cumulative firmware growth
pushed the build past that limit, and mbedTLS/crypto accounts for ~38 KB.
The G474 has an RNG, so crypto was pulled in unconditionally via
STM32_HAS_RNG.

Add an AVM_DISABLE_MBEDTLS option that forces the existing no-crypto build
path (already used by RNG-less devices such as the G0B1) even on devices
that have an RNG, and enable it for stm32g474ret6 in CI.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@bettio
bettio merged commit d189e7e into atomvm:release-0.7 Jul 19, 2026
164 of 172 checks passed
@pguyot
pguyot deleted the w29/stm32-optional-mbedtls branch July 20, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants