From 173e5c75542e8459d4bebfd3e0bc0dc2701dceb1 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 20 Apr 2021 13:18:41 -0700 Subject: [PATCH] NuttX:Track Stack naming changes --- platforms/nuttx/src/px4/common/board_crashdump.c | 6 +++--- src/systemcmds/hardfault_log/hardfault_log.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platforms/nuttx/src/px4/common/board_crashdump.c b/platforms/nuttx/src/px4/common/board_crashdump.c index 65ba32923d..035bc60443 100644 --- a/platforms/nuttx/src/px4/common/board_crashdump.c +++ b/platforms/nuttx/src/px4/common/board_crashdump.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2017-2019 PX4 Development Team. All rights reserved. + * Copyright (C) 2017-2019, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -326,7 +326,7 @@ __EXPORT void board_crashdump(uintptr_t currentsp, FAR void *tcb, FAR const char pdump->info.stacks.user.size = CONFIG_IDLETHREAD_STACKSIZE; } else { - pdump->info.stacks.user.top = (uint32_t) rtcb->adj_stack_ptr; + pdump->info.stacks.user.top = (uint32_t) rtcb->stack_base_ptr + rtcb->adj_stack_size; pdump->info.stacks.user.size = (uint32_t) rtcb->adj_stack_size; } @@ -334,7 +334,7 @@ __EXPORT void board_crashdump(uintptr_t currentsp, FAR void *tcb, FAR const char /* Get the limits on the interrupt stack memory */ - pdump->info.stacks.interrupt.top = (uint32_t)&g_intstackbase; + pdump->info.stacks.interrupt.top = (uint32_t)&g_intstacktop; pdump->info.stacks.interrupt.size = (CONFIG_ARCH_INTERRUPTSTACK & ~3); /* If In interrupt Context save the interrupt stack data centered diff --git a/src/systemcmds/hardfault_log/hardfault_log.c b/src/systemcmds/hardfault_log/hardfault_log.c index c869eae5a9..7fd7a84a17 100644 --- a/src/systemcmds/hardfault_log/hardfault_log.c +++ b/src/systemcmds/hardfault_log/hardfault_log.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2015 PX4 Development Team. All rights reserved. + * Copyright (C) 2015, 2021 PX4 Development Team. All rights reserved. * Author: @author David Sidrane * * Redistribution and use in source and binary forms, with or without @@ -272,7 +272,7 @@ static int write_stack_detail(bool inValid, _stack_s *si, char *sp_name, #ifdef CONFIG_STACK_COLORATION FAR struct tcb_s tcb; - tcb.adj_stack_ptr = (void *) sbot; + tcb.stack_base_ptr = (void *) sbot; tcb.adj_stack_size = si->size; if (verify_ram_address(sbot, si->size)) {