Skip to content

Commit 94c1079

Browse files
mrkhldnmmahadevan108
authored andcommitted
arch: arm: Don't use STKALIGN mask on ARMv8-M Baseline
The STKALIGN mask is not present for CONFIG_ARMV8_M_BASELINE as well as CONFIG_ARMV8_M_MAINLINE. So filter out that check when setting the sp for ARM core dumps. Signed-off-by: Mark Holden <[email protected]>
1 parent 7e1b00d commit 94c1079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/include/cortex_m/exception.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static ALWAYS_INLINE void z_arm_set_fault_sp(const struct arch_esf *esf, uint32_
258258
}
259259
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
260260

261-
#ifndef CONFIG_ARMV8_M_MAINLINE
261+
#if !(defined(CONFIG_ARMV8_M_MAINLINE) || defined(CONFIG_ARMV8_M_BASELINE))
262262
if ((esf->basic.xpsr & SCB_CCR_STKALIGN_Msk) == SCB_CCR_STKALIGN_Msk) {
263263
/* Adjust stack alignment after PSR bit[9] detected */
264264
z_arm_coredump_fault_sp |= 0x4;

0 commit comments

Comments
 (0)