rtos: remove config.h includes from stackings headers

And add its own header to the rtos_xxx_stackings.c

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I084130fde7ee8645129a7cf60bb7bf59448e2f39
Reviewed-on: https://review.openocd.org/c/openocd/+/7441
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Erhan Kurubas 2023-01-21 12:46:33 +01:00 committed by Antonio Borneo
parent bec6c0eb09
commit 227577ba76
14 changed files with 13 additions and 37 deletions

View File

@ -14,6 +14,7 @@
#include "rtos.h" #include "rtos.h"
#include "target/armv7m.h" #include "target/armv7m.h"
#include "rtos_chibios_stackings.h"
static const struct stack_register_offset rtos_chibios_arm_v7m_stack_offsets[ARMV7M_NUM_CORE_REGS] = { static const struct stack_register_offset rtos_chibios_arm_v7m_stack_offsets[ARMV7M_NUM_CORE_REGS] = {
{ ARMV7M_R0, -1, 32 }, /* r0 */ { ARMV7M_R0, -1, 32 }, /* r0 */

View File

@ -8,10 +8,6 @@
#ifndef OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H
#define OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H #define OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rtos.h" #include "rtos.h"
extern const struct rtos_register_stacking rtos_chibios_arm_v7m_stacking; extern const struct rtos_register_stacking rtos_chibios_arm_v7m_stacking;

View File

@ -5,8 +5,9 @@
#endif #endif
#include "rtos.h" #include "rtos.h"
#include "rtos_standard_stackings.h"
#include "target/armv7m.h" #include "target/armv7m.h"
#include "rtos_standard_stackings.h"
#include "rtos_ecos_stackings.h"
/* For Cortex-M eCos applications the actual thread context register layout can /* For Cortex-M eCos applications the actual thread context register layout can
* be different between active threads of an application depending on whether * be different between active threads of an application depending on whether

View File

@ -3,10 +3,6 @@
#ifndef OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H
#define OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H #define OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rtos.h" #include "rtos.h"
extern const struct rtos_register_stacking rtos_ecos_cortex_m3_stacking; extern const struct rtos_register_stacking rtos_ecos_cortex_m3_stacking;

View File

@ -12,6 +12,7 @@
#include "rtos.h" #include "rtos.h"
#include "target/armv7m.h" #include "target/armv7m.h"
#include "rtos_standard_stackings.h" #include "rtos_standard_stackings.h"
#include "rtos_embkernel_stackings.h"
static const struct stack_register_offset rtos_embkernel_cortex_m_stack_offsets[ARMV7M_NUM_CORE_REGS] = { static const struct stack_register_offset rtos_embkernel_cortex_m_stack_offsets[ARMV7M_NUM_CORE_REGS] = {
{ ARMV7M_R0, 0x24, 32 }, /* r0 */ { ARMV7M_R0, 0x24, 32 }, /* r0 */

View File

@ -8,10 +8,6 @@
#ifndef OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H
#define OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H #define OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rtos.h" #include "rtos.h"
extern const struct rtos_register_stacking rtos_embkernel_cortex_m_stacking; extern const struct rtos_register_stacking rtos_embkernel_cortex_m_stacking;

View File

@ -11,7 +11,7 @@
#include "rtos.h" #include "rtos.h"
#include "target/armv7m.h" #include "target/armv7m.h"
#include "rtos_mqx_stackings.h"
/* /*
* standard exception stack * standard exception stack

View File

@ -8,10 +8,6 @@
#ifndef OPENOCD_RTOS_RTOS_MQX_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_MQX_STACKINGS_H
#define OPENOCD_RTOS_RTOS_MQX_STACKINGS_H #define OPENOCD_RTOS_RTOS_MQX_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rtos.h" #include "rtos.h"
extern const struct rtos_register_stacking rtos_mqx_arm_v7m_stacking; extern const struct rtos_register_stacking rtos_mqx_arm_v7m_stacking;

View File

@ -12,6 +12,7 @@
#include "rtos.h" #include "rtos.h"
#include "target/armv7m.h" #include "target/armv7m.h"
#include "rtos_standard_stackings.h" #include "rtos_standard_stackings.h"
#include "rtos_riot_stackings.h"
/* This works for the M0 and M34 stackings as xPSR is in a fixed /* This works for the M0 and M34 stackings as xPSR is in a fixed
* location * location

View File

@ -8,14 +8,9 @@
#ifndef OPENOCD_RTOS_RTOS_RIOT_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_RIOT_STACKINGS_H
#define OPENOCD_RTOS_RTOS_RIOT_STACKINGS_H #define OPENOCD_RTOS_RTOS_RIOT_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rtos.h" #include "rtos.h"
extern const struct rtos_register_stacking rtos_riot_cortex_m0_stacking; extern const struct rtos_register_stacking rtos_riot_cortex_m0_stacking;
extern const struct rtos_register_stacking rtos_riot_cortex_m34_stacking; extern const struct rtos_register_stacking rtos_riot_cortex_m34_stacking;
#endif /* OPENOCD_RTOS_RTOS_RIOT_STACKINGS_H */ #endif /* OPENOCD_RTOS_RTOS_RIOT_STACKINGS_H */

View File

@ -11,6 +11,7 @@
#include "rtos.h" #include "rtos.h"
#include "target/armv7m.h" #include "target/armv7m.h"
#include "rtos_standard_stackings.h"
static const struct stack_register_offset rtos_standard_cortex_m3_stack_offsets[ARMV7M_NUM_CORE_REGS] = { static const struct stack_register_offset rtos_standard_cortex_m3_stack_offsets[ARMV7M_NUM_CORE_REGS] = {
{ ARMV7M_R0, 0x20, 32 }, /* r0 */ { ARMV7M_R0, 0x20, 32 }, /* r0 */

View File

@ -8,10 +8,6 @@
#ifndef OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H
#define OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H #define OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rtos.h" #include "rtos.h"
extern const struct rtos_register_stacking rtos_standard_cortex_m3_stacking; extern const struct rtos_register_stacking rtos_standard_cortex_m3_stacking;

View File

@ -9,11 +9,11 @@
#include "config.h" #include "config.h"
#endif #endif
#include <helper/types.h> #include "rtos.h"
#include <rtos/rtos.h> #include "target/armv7m.h"
#include <rtos/rtos_standard_stackings.h> #include "target/esirisc.h"
#include <target/armv7m.h> #include "rtos_standard_stackings.h"
#include <target/esirisc.h> #include "rtos_ucos_iii_stackings.h"
static const struct stack_register_offset rtos_ucos_iii_cortex_m_stack_offsets[] = { static const struct stack_register_offset rtos_ucos_iii_cortex_m_stack_offsets[] = {
{ ARMV7M_R0, 0x20, 32 }, /* r0 */ { ARMV7M_R0, 0x20, 32 }, /* r0 */

View File

@ -8,11 +8,7 @@
#ifndef OPENOCD_RTOS_RTOS_UCOS_III_STACKINGS_H #ifndef OPENOCD_RTOS_RTOS_UCOS_III_STACKINGS_H
#define OPENOCD_RTOS_RTOS_UCOS_III_STACKINGS_H #define OPENOCD_RTOS_RTOS_UCOS_III_STACKINGS_H
#ifdef HAVE_CONFIG_H #include "rtos.h"
#include "config.h"
#endif
#include <rtos/rtos.h>
extern const struct rtos_register_stacking rtos_ucos_iii_cortex_m_stacking; extern const struct rtos_register_stacking rtos_ucos_iii_cortex_m_stacking;
extern const struct rtos_register_stacking rtos_ucos_iii_esi_risc_stacking; extern const struct rtos_register_stacking rtos_ucos_iii_esi_risc_stacking;