This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e15672f7a42 boards/arm/stm32/nucleo: Fix BBSRAM compilation
e15672f7a42 is described below
commit e15672f7a4218e04c386df6650fdfa7f5f09ffa1
Author: Jukka Laitinen <[email protected]>
AuthorDate: Tue Jun 2 14:55:16 2026 +0300
boards/arm/stm32/nucleo: Fix BBSRAM compilation
Fix the compilation of stm32f4/7 nucleo boards with:
CONFIG_STM32F7_BKPSRAM=y
CONFIG_STM32F7_BBSRAM=y
CONFIG_STM32F7_PWR=y
CONFIG_STM32F7_SAVE_CRASHDUMP=y
Signed-off-by: Jukka Laitinen <[email protected]>
---
boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c | 6 +++++-
boards/arm/stm32f7/nucleo-f722ze/src/stm32_bbsram.c | 6 +++++-
boards/arm/stm32f7/nucleo-f746zg/src/stm32_bbsram.c | 6 +++++-
boards/arm/stm32f7/nucleo-f767zi/src/stm32_bbsram.c | 6 +++++-
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c
b/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c
index bef09162759..a9c35cc5cc4 100644
--- a/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c
+++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c
@@ -239,7 +239,7 @@ typedef struct
int lineno; /* __LINE__ to up_assert */
pid_t pid; /* Process ID */
uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save
area */
- stack_t stacks; /* Stack info */
+ stacks_t stacks; /* Stack info */
char name[CONFIG_TASK_NAME_SIZE + 1]; /* Task name (with NULL
* terminator) */
char filename[MAX_FILE_PATH_LENGTH]; /* the Last of chars in
@@ -426,9 +426,13 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb,
if (up_interrupt_context())
{
+#if CONFIG_ARCH_INTERRUPTSTACK > 3
pdump->info.stacks.interrupt.sp = sp;
pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT |
INTSTACK_PRESENT);
+#else
+ pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT);
+#endif
memcpy(pdump->info.regs, running_regs(),
sizeof(pdump->info.regs));
pdump->info.stacks.user.sp = pdump->info.regs[REG_R13];
diff --git a/boards/arm/stm32f7/nucleo-f722ze/src/stm32_bbsram.c
b/boards/arm/stm32f7/nucleo-f722ze/src/stm32_bbsram.c
index b0cf74eaf2d..b9a578268f7 100644
--- a/boards/arm/stm32f7/nucleo-f722ze/src/stm32_bbsram.c
+++ b/boards/arm/stm32f7/nucleo-f722ze/src/stm32_bbsram.c
@@ -239,7 +239,7 @@ typedef struct
int lineno; /* __LINE__ to up_assert */
int pid; /* Process ID */
uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save
area */
- stack_t stacks; /* Stack info */
+ stacks_t stacks; /* Stack info */
char name[CONFIG_TASK_NAME_SIZE + 1]; /* Task name (with NULL
* terminator) */
char filename[MAX_FILE_PATH_LENGTH]; /* the Last of chars in
@@ -426,9 +426,13 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb,
if (up_interrupt_context())
{
+#if CONFIG_ARCH_INTERRUPTSTACK > 3
pdump->info.stacks.interrupt.sp = sp;
pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT |
INTSTACK_PRESENT);
+#else
+ pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT);
+#endif
memcpy(pdump->info.regs, running_regs(),
sizeof(pdump->info.regs));
pdump->info.stacks.user.sp = pdump->info.regs[REG_R13];
diff --git a/boards/arm/stm32f7/nucleo-f746zg/src/stm32_bbsram.c
b/boards/arm/stm32f7/nucleo-f746zg/src/stm32_bbsram.c
index f6d8279ebb1..e575a7f653d 100644
--- a/boards/arm/stm32f7/nucleo-f746zg/src/stm32_bbsram.c
+++ b/boards/arm/stm32f7/nucleo-f746zg/src/stm32_bbsram.c
@@ -239,7 +239,7 @@ typedef struct
int lineno; /* __LINE__ to up_assert */
int pid; /* Process ID */
uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save
area */
- stack_t stacks; /* Stack info */
+ stacks_t stacks; /* Stack info */
char name[CONFIG_TASK_NAME_SIZE + 1]; /* Task name (with NULL
* terminator) */
char filename[MAX_FILE_PATH_LENGTH]; /* the Last of chars in
@@ -426,9 +426,13 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb,
if (up_interrupt_context())
{
+#if CONFIG_ARCH_INTERRUPTSTACK > 3
pdump->info.stacks.interrupt.sp = sp;
pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT |
INTSTACK_PRESENT);
+#else
+ pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT);
+#endif
memcpy(pdump->info.regs, running_regs(),
sizeof(pdump->info.regs));
pdump->info.stacks.user.sp = pdump->info.regs[REG_R13];
diff --git a/boards/arm/stm32f7/nucleo-f767zi/src/stm32_bbsram.c
b/boards/arm/stm32f7/nucleo-f767zi/src/stm32_bbsram.c
index 73db1b71a2d..d1c7ab99d2d 100644
--- a/boards/arm/stm32f7/nucleo-f767zi/src/stm32_bbsram.c
+++ b/boards/arm/stm32f7/nucleo-f767zi/src/stm32_bbsram.c
@@ -239,7 +239,7 @@ typedef struct
int lineno; /* __LINE__ to up_assert */
int pid; /* Process ID */
uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save
area */
- stack_t stacks; /* Stack info */
+ stacks_t stacks; /* Stack info */
char name[CONFIG_TASK_NAME_SIZE + 1]; /* Task name (with NULL
* terminator) */
char filename[MAX_FILE_PATH_LENGTH]; /* the Last of chars in
@@ -426,9 +426,13 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb,
if (up_interrupt_context())
{
+#if CONFIG_ARCH_INTERRUPTSTACK > 3
pdump->info.stacks.interrupt.sp = sp;
pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT |
INTSTACK_PRESENT);
+#else
+ pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT);
+#endif
memcpy(pdump->info.regs, running_regs(),
sizeof(pdump->info.regs));
pdump->info.stacks.user.sp = pdump->info.regs[REG_R13];