diff --git a/arch/arm/src/arm/arm_tcbinfo.c b/arch/arm/src/arm/arm_tcbinfo.c index 8c0f410683..5501369a21 100644 --- a/arch/arm/src/arm/arm_tcbinfo.c +++ b/arch/arm/src/arm/arm_tcbinfo.c @@ -60,13 +60,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 17, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 17, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv6-m/arm_tcbinfo.c b/arch/arm/src/armv6-m/arm_tcbinfo.c index e1fe86c8be..666ccd608e 100644 --- a/arch/arm/src/armv6-m/arm_tcbinfo.c +++ b/arch/arm/src/armv6-m/arm_tcbinfo.c @@ -67,13 +67,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 17, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 17, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv7-a/arm_tcbinfo.c b/arch/arm/src/armv7-a/arm_tcbinfo.c index 16f44950c3..84d0b072b2 100644 --- a/arch/arm/src/armv7-a/arm_tcbinfo.c +++ b/arch/arm/src/armv7-a/arm_tcbinfo.c @@ -102,13 +102,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 17, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 17, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv7-m/arm_tcbinfo.c b/arch/arm/src/armv7-m/arm_tcbinfo.c index a21548097f..aee99c4e4e 100644 --- a/arch/arm/src/armv7-m/arm_tcbinfo.c +++ b/arch/arm/src/armv7-m/arm_tcbinfo.c @@ -108,13 +108,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 17, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 17, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv7-r/arm_tcbinfo.c b/arch/arm/src/armv7-r/arm_tcbinfo.c index 51c8c4922f..02e34aa33f 100644 --- a/arch/arm/src/armv7-r/arm_tcbinfo.c +++ b/arch/arm/src/armv7-r/arm_tcbinfo.c @@ -102,13 +102,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 17, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 17, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv8-m/arm_tcbinfo.c b/arch/arm/src/armv8-m/arm_tcbinfo.c index 5e8167c8e5..4dbbd84e44 100644 --- a/arch/arm/src/armv8-m/arm_tcbinfo.c +++ b/arch/arm/src/armv8-m/arm_tcbinfo.c @@ -108,13 +108,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 17, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 17, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/risc-v/src/common/riscv_tcbinfo.c b/arch/risc-v/src/common/riscv_tcbinfo.c index 934c1963e1..8a9ea80279 100644 --- a/arch/risc-v/src/common/riscv_tcbinfo.c +++ b/arch/risc-v/src/common/riscv_tcbinfo.c @@ -114,13 +114,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = 33, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = 33, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/xtensa/src/common/xtensa_tcbinfo.c b/arch/xtensa/src/common/xtensa_tcbinfo.c index 028be39e24..8b133ecc57 100644 --- a/arch/xtensa/src/common/xtensa_tcbinfo.c +++ b/arch/xtensa/src/common/xtensa_tcbinfo.c @@ -59,13 +59,15 @@ static const uint16_t g_reg_offs[] = const struct tcbinfo_s g_tcbinfo = { - .pid_off = TCB_PID_OFF, - .state_off = TCB_STATE_OFF, - .pri_off = TCB_PRI_OFF, - .name_off = TCB_NAME_OFF, - .regs_off = TCB_REGS_OFF, - .basic_num = COMMON_CTX_REGS, - .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), + .pid_off = TCB_PID_OFF, + .state_off = TCB_STATE_OFF, + .pri_off = TCB_PRI_OFF, + .name_off = TCB_NAME_OFF, + .stack_off = TCB_STACK_OFF, + .stack_size_off = TCB_STACK_SIZE_OFF, + .regs_off = TCB_REGS_OFF, + .basic_num = COMMON_CTX_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index e56ca2bcc2..253fdc2475 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -717,6 +717,8 @@ begin_packed_struct struct tcbinfo_s uint16_t state_off; /* Offset of tcb.task_state */ uint16_t pri_off; /* Offset of tcb.sched_priority */ uint16_t name_off; /* Offset of tcb.name */ + uint16_t stack_off; /* Offset of tcb.stack_alloc_ptr */ + uint16_t stack_size_off; /* Offset of tcb.adj_stack_size */ uint16_t regs_off; /* Offset of tcb.regs */ uint16_t basic_num; /* Num of genernal regs */ uint16_t total_num; /* Num of regs in tcbinfo.reg_offs */ diff --git a/tools/jlink-nuttx.c b/tools/jlink-nuttx.c index f06e057d7b..e5e9bf7ff9 100644 --- a/tools/jlink-nuttx.c +++ b/tools/jlink-nuttx.c @@ -97,6 +97,8 @@ begin_packed_struct struct tcbinfo_s uint16_t state_off; uint16_t pri_off; uint16_t name_off; + uint16_t stack_off; + uint16_t stack_size_off; uint16_t regs_off; uint16_t basic_num; uint16_t total_num;