Use correct VTOR_NS location when TrustZone enabled#580
Use correct VTOR_NS location when TrustZone enabled#580danielinux merged 4 commits intowolfSSL:masterfrom
Conversation
Fixes regression introduced in 6681e54
This is needed to accommodate for the ARM Cortex-M33 interrupt vector alignment requirements. The number of interrupts on the STM32H5 is 149; the next power of 2 is 256; in bytes, that is 1024.
|
This last commit restores the functionality of the UART console on my side. The issue was a misalignment of the interrupt vector table of the boot image. According to the ARM Cortex-M33 documentation:
The STM32H5 has 149 (133 + 16) interrupts; the next power of two is 256 words, i.e. 1024 bytes. The default image header size was previously 256 bytes, causing the interrupt vector to be 256-aligned and the ISR used for UART to be offset in respect to the correct one. |
Fixes a regression introduced in 6681e54 which sets
VTORto0xE000ED08(VTOR) rather than0xE002ED08(VTOR_NS) when TrustZone is enabled. Issue found by Daniele while I was debugging wolfBoot on the STM32H5 for ZD#20037. Will ask them to verify whether this fixes their first problem.