aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/chibios.c
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2024-04-09 01:29:34 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2024-05-26 09:57:51 +0000
commitfbea7d5d38d0dcbdd71cb574da9bd12c78b568cf (patch)
tree5abcd2a0804e27e19d754853f82abf5c1b835f02 /src/rtos/chibios.c
parentccc5c1642b32ab79d5ab315e4b308e53392a77c4 (diff)
downloadriscv-openocd-fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf.zip
riscv-openocd-fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf.tar.gz
riscv-openocd-fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf.tar.bz2
openocd: drop include of target_type.h
Few files include target_type.h even if it is not needed. Drop the include. Other files access directly to target type's name instead of using the proper API target_type_name(). Use the API and drop the include. Change-Id: I86c0e0bbad51db93500c0efa27b7d6f1a67a02c2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8260 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/rtos/chibios.c')
-rw-r--r--src/rtos/chibios.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rtos/chibios.c b/src/rtos/chibios.c
index 2037827..c1e4e84 100644
--- a/src/rtos/chibios.c
+++ b/src/rtos/chibios.c
@@ -15,7 +15,6 @@
#include <helper/time_support.h>
#include <jtag/jtag.h>
#include "target/target.h"
-#include "target/target_type.h"
#include "target/armv7m.h"
#include "target/cortex_m.h"
#include "rtos.h"
@@ -470,7 +469,7 @@ static int chibios_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
/* Update stacking if it can only be determined from runtime information */
if (!param->stacking_info &&
(chibios_update_stacking(rtos) != ERROR_OK)) {
- LOG_ERROR("Failed to determine exact stacking for the target type %s", rtos->target->type->name);
+ LOG_ERROR("Failed to determine exact stacking for the target type %s", target_type_name(rtos->target));
return -1;
}
@@ -518,12 +517,12 @@ static bool chibios_detect_rtos(struct target *target)
static int chibios_create(struct target *target)
{
for (unsigned int i = 0; i < ARRAY_SIZE(chibios_params_list); i++)
- if (strcmp(chibios_params_list[i].target_name, target->type->name) == 0) {
+ if (strcmp(chibios_params_list[i].target_name, target_type_name(target)) == 0) {
target->rtos->rtos_specific_params = (void *)&chibios_params_list[i];
return 0;
}
LOG_WARNING("Could not find target \"%s\" in ChibiOS compatibility "
- "list", target->type->name);
+ "list", target_type_name(target));
return -1;
}