STM32L4: add NUCLEO_L4A6ZG (STM32L4A6ZGTx) target - #593
Merged
Conversation
multiplemonomials
left a comment
Collaborator
There was a problem hiding this comment.
Nice work on this! Thanks for the contribution and for your careful testing, I appreciate it.
And yeah, the USB tests have had known failures on STM32 for some time, I do not know how to fix it because I don't know much about USB.
61ca52
force-pushed
the
feature/stm32l4a6-clean
branch
from
July 31, 2026 15:40
4f45f1a to
8a32307
Compare
Collaborator
|
Really minor but next time, if possible, can you push additional commits to the branch when you make changes rather than amending your existing commit? Amending makes it a lot harder to see what changed between your previous version and now. We have PR squashing enabled, so all commits in the PR will get squashed together when merged. |
61ca52
force-pushed
the
feature/stm32l4a6-clean
branch
from
August 7, 2026 14:26
8a32307 to
2c52901
Compare
multiplemonomials
approved these changes
Aug 7, 2026
multiplemonomials
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for your work on this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Adds support for the STM32L4A6xG MCU family and the NUCLEO-L4A6ZG development board.
The STM32L4A6 is the cryptographic derivative of the STM32L496, extended only by an AES/HASH hardware accelerator; both parts share the device ID
0x461. The target definition therefore mirrorsMCU_STM32L496xGas closely as possible and diverges only where the crypto peripherals require it.Dependencies
The test results below were obtained with two additional fixes that are submitted as a separate pull request and are not part of this changeset.
Heap must not overrun the boot/ISR stack. Without it,
tests-mbed-rtos-heap-and-stackfails, becausestm32l4_dual_flash_bank.ldgrows the heap to the end of SRAM1, leaving no room for the boot stack STM32L4: fix MemManage fault in rtos-heap-and-stack on dual-bank targets #592HSI auto-start-from-Stop consistency across deep sleep, so that the clock tree is restored coherently on wake-up from STOP2 STM32: fix LPUART console hang after first deep sleep (HSI16 off) #591
This PR can be reviewed and merged independently, but the 96/98 figure below is only reproducible on top of that PR. The same holds for the NUCLEO_L496ZG reference run, which was built from the same tree; the comparison between the two therefore remains valid.
Impact of changes
__FPU_PRESENTredefinition guard instm32l4a6xx.h, which is a no-op where the macro was not already defined0799to the platform database, making the board auto-detectable bymbed-tools/ greentea*_ALTbindings, CCM and GCM remain software implementationsMigration actions required
None.
Documentation
None required in this repository.
Pull request type
Test results
Setup
Hardware NUCLEO-L4A6ZG, ST-LINK/V2-1 SN
066FFF535155878281065443, FWV2J47M34, device ID0x461rev2.0. Toolchain GCC_ARM. Host Windows 11, STM32CubeCLT 1.19.0 / CubeProgrammer 2.20.0, SWD 4 MHz under reset. Full Greentea suite.greentea-log-l4a6.txt
The reference column is a run of the pre-existing NUCLEO_L496ZG target on the same host, toolchain and ST-LINK firmware, to establish a baseline. The two runs agree in every respect, including the identical sets of skipped tests and of failures.
greentea-log-l496.txt
Passes exercising target-specific code paths:
tests-mbed-connectivity-mbedtls-multi(4.25 s),-selftest(8.73 s),tests-mbed-device_key-functionality(6.45 s),tests-mbed-storage-kvstore-direct-access-devicekey,tests-mbed-hal-trngvalidate the*_ALThardware crypto bindings and the RNG, the one functional area in which this target genuinely differs from the L496tests-mbed-rtos-heap-and-stack(14.34 s),tests-mbed-platform-stats-heap,tests-mbed-rtos-malloc,tests-mbed-hal-stack-size-unificationsplit-SRAM heap layout (see Dependencies)tests-mbed-drivers-watchdog(6.37 s),-watchdog-reset(13.61 s),tests-mbed-hal-watchdog-reset(11.63 s),-watchdog-timing(28.70 s), including the watchdog-reset-from-deepsleep casestests-mbed-hal-sleep,-sleep-manager,-sleep-manager-racecondition,tests-mbed-drivers-sleep-lock,tests-mbed-hal-lp-ticker,tests-mbed-drivers-lp-{ticker,timer,timeout},tests-mbed-hal-rtc-resetSTOP2 entry/exit and the low-power clock treetests-mbed-usb-device-msd(72.85 s),-serial(30.09 s) USB FS device enumerates and transfers bulk datatests-mbed-hal-verify-arduino-pinmap,tests-mbed-hal-pinmap,PeripheralPins.cand theARDUINO_UNOform-factor declarationKnown failures (2), both pre-existing and host-side:
tests-mbed-usb-device-basicusb control basic test); aborts after 180.90 s,missing __exit event from DUTtests-mbed-usb-device-hidRuntimeError: USB device (SN=3e35156…) not found.after 50 attempts, 5.19 sUSB device (SN=31778c8…) not found.after 50 attempts, 5.18 sThese are attributed to the Greentea/USB host setup rather than to the target or to Mbed OS:
usb-device-msdandusb-device-serialpass in the same session immediately afterwardspyusbcontrol transfer and 22 cannot find the device by serial number at all, consistent with a Windows WinUSB/libusb driver-binding orpyusbbackend issue. Not root-caused further.Not verified: OSPI/QSPI, Ethernet, NFC and filesystem-on-external-flash, not populated on the NUCLEO-L4A6ZG, reported as skipped by ctest identically on both boards.