forked from auracaster/openocd
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user