arch: arm: aarch32: cortex-m: introduce offset for stack info start

We add the mechanism to generate offset #defines for
thread stack info start, to be used directly in ASM.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2020-02-12 10:42:20 +01:00 committed by Andrew Boie
commit 36e80673f9
2 changed files with 11 additions and 0 deletions

View file

@ -74,6 +74,13 @@ GEN_OFFSET_SYM(_callee_saved_t, lr);
GEN_ABSOLUTE_SYM(___callee_saved_t_SIZEOF, sizeof(struct _callee_saved)); GEN_ABSOLUTE_SYM(___callee_saved_t_SIZEOF, sizeof(struct _callee_saved));
#if defined(CONFIG_THREAD_STACK_INFO)
GEN_OFFSET_SYM(_thread_stack_info_t, start);
GEN_ABSOLUTE_SYM(___thread_stack_info_t_SIZEOF,
sizeof(struct _thread_stack_info));
#endif
/* /*
* size of the struct k_thread structure sans save area for floating * size of the struct k_thread structure sans save area for floating
* point registers. * point registers.

View file

@ -36,6 +36,10 @@
#endif #endif
#endif #endif
#if defined(CONFIG_THREAD_STACK_INFO)
#define _thread_offset_to_stack_info_start \
(___thread_stack_info_t_start_OFFSET + ___thread_t_stack_info_OFFSET)
#endif
/* end - threads */ /* end - threads */
#endif /* ZEPHYR_ARCH_ARM_INCLUDE_AARCH32_OFFSETS_SHORT_ARCH_H_ */ #endif /* ZEPHYR_ARCH_ARM_INCLUDE_AARCH32_OFFSETS_SHORT_ARCH_H_ */