diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 05d0de897e..710c2ef6cf 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -766,7 +766,7 @@ struct pthread_tcb_s */ #ifdef CONFIG_DEBUG_TCBINFO -struct tcbinfo_s +begin_packed_struct struct tcbinfo_s { uint16_t pid_off; /* Offset of tcb.pid */ uint16_t state_off; /* Offset of tcb.task_state */ @@ -787,7 +787,7 @@ struct tcbinfo_s uint8_t u[8]; FAR uint16_t *p; } reg_off; -}; +} end_packed_struct; #endif /* This is the callback type used by nxsched_foreach() */ diff --git a/tools/jlink-nuttx.c b/tools/jlink-nuttx.c index 245f759d0a..b7597dfad7 100644 --- a/tools/jlink-nuttx.c +++ b/tools/jlink-nuttx.c @@ -72,7 +72,7 @@ enum symbol_e NSYMBOLS }; -struct tcbinfo_s +__attribute__ ((packed)) struct tcbinfo_s { uint16_t pid_off; uint16_t state_off;