target: move in target_type.h the target_type's declaration
The static analyser 'sparse' complains, while compiling a target's file, that the struct target_type is declared in the file as non static, but it is not exposed through an include file. The message is: warning: symbol 'XXX' was not declared. Should it be static? Move the list of target_type's declaration in target_type.h While there, fix a name clash in stm8.c Change-Id: Ia9c681e0825cfd04d509616dbc04a0cf4944f379 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7659 Tested-by: jenkins
This commit is contained in:
parent
3a4f445bd9
commit
ed46188a72
|
@ -542,12 +542,12 @@ static int stm8_get_core_reg(struct reg *reg)
|
||||||
int retval;
|
int retval;
|
||||||
struct stm8_core_reg *stm8_reg = reg->arch_info;
|
struct stm8_core_reg *stm8_reg = reg->arch_info;
|
||||||
struct target *target = stm8_reg->target;
|
struct target *target = stm8_reg->target;
|
||||||
struct stm8_common *stm8_target = target_to_stm8(target);
|
struct stm8_common *stm8 = target_to_stm8(target);
|
||||||
|
|
||||||
if (target->state != TARGET_HALTED)
|
if (target->state != TARGET_HALTED)
|
||||||
return ERROR_TARGET_NOT_HALTED;
|
return ERROR_TARGET_NOT_HALTED;
|
||||||
|
|
||||||
retval = stm8_target->read_core_reg(target, stm8_reg->num);
|
retval = stm8->read_core_reg(target, stm8_reg->num);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,46 +66,6 @@ static int target_get_gdb_fileio_info_default(struct target *target,
|
||||||
static int target_gdb_fileio_end_default(struct target *target, int retcode,
|
static int target_gdb_fileio_end_default(struct target *target, int retcode,
|
||||||
int fileio_errno, bool ctrl_c);
|
int fileio_errno, bool ctrl_c);
|
||||||
|
|
||||||
/* targets */
|
|
||||||
extern struct target_type arm7tdmi_target;
|
|
||||||
extern struct target_type arm720t_target;
|
|
||||||
extern struct target_type arm9tdmi_target;
|
|
||||||
extern struct target_type arm920t_target;
|
|
||||||
extern struct target_type arm966e_target;
|
|
||||||
extern struct target_type arm946e_target;
|
|
||||||
extern struct target_type arm926ejs_target;
|
|
||||||
extern struct target_type fa526_target;
|
|
||||||
extern struct target_type feroceon_target;
|
|
||||||
extern struct target_type dragonite_target;
|
|
||||||
extern struct target_type xscale_target;
|
|
||||||
extern struct target_type xtensa_chip_target;
|
|
||||||
extern struct target_type cortexm_target;
|
|
||||||
extern struct target_type cortexa_target;
|
|
||||||
extern struct target_type aarch64_target;
|
|
||||||
extern struct target_type cortexr4_target;
|
|
||||||
extern struct target_type armv8r_target;
|
|
||||||
extern struct target_type arm11_target;
|
|
||||||
extern struct target_type ls1_sap_target;
|
|
||||||
extern struct target_type mips_m4k_target;
|
|
||||||
extern struct target_type mips_mips64_target;
|
|
||||||
extern struct target_type avr_target;
|
|
||||||
extern struct target_type dsp563xx_target;
|
|
||||||
extern struct target_type dsp5680xx_target;
|
|
||||||
extern struct target_type testee_target;
|
|
||||||
extern struct target_type avr32_ap7k_target;
|
|
||||||
extern struct target_type hla_target;
|
|
||||||
extern struct target_type esp32_target;
|
|
||||||
extern struct target_type esp32s2_target;
|
|
||||||
extern struct target_type esp32s3_target;
|
|
||||||
extern struct target_type or1k_target;
|
|
||||||
extern struct target_type quark_x10xx_target;
|
|
||||||
extern struct target_type quark_d20xx_target;
|
|
||||||
extern struct target_type stm8_target;
|
|
||||||
extern struct target_type riscv_target;
|
|
||||||
extern struct target_type mem_ap_target;
|
|
||||||
extern struct target_type esirisc_target;
|
|
||||||
extern struct target_type arcv2_target;
|
|
||||||
|
|
||||||
static struct target_type *target_types[] = {
|
static struct target_type *target_types[] = {
|
||||||
&arm7tdmi_target,
|
&arm7tdmi_target,
|
||||||
&arm9tdmi_target,
|
&arm9tdmi_target,
|
||||||
|
|
|
@ -311,4 +311,43 @@ struct target_type {
|
||||||
unsigned int (*data_bits)(struct target *target);
|
unsigned int (*data_bits)(struct target *target);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct target_type aarch64_target;
|
||||||
|
extern struct target_type arcv2_target;
|
||||||
|
extern struct target_type arm11_target;
|
||||||
|
extern struct target_type arm720t_target;
|
||||||
|
extern struct target_type arm7tdmi_target;
|
||||||
|
extern struct target_type arm920t_target;
|
||||||
|
extern struct target_type arm926ejs_target;
|
||||||
|
extern struct target_type arm946e_target;
|
||||||
|
extern struct target_type arm966e_target;
|
||||||
|
extern struct target_type arm9tdmi_target;
|
||||||
|
extern struct target_type armv8r_target;
|
||||||
|
extern struct target_type avr32_ap7k_target;
|
||||||
|
extern struct target_type avr_target;
|
||||||
|
extern struct target_type cortexa_target;
|
||||||
|
extern struct target_type cortexm_target;
|
||||||
|
extern struct target_type cortexr4_target;
|
||||||
|
extern struct target_type dragonite_target;
|
||||||
|
extern struct target_type dsp563xx_target;
|
||||||
|
extern struct target_type dsp5680xx_target;
|
||||||
|
extern struct target_type esirisc_target;
|
||||||
|
extern struct target_type esp32s2_target;
|
||||||
|
extern struct target_type esp32s3_target;
|
||||||
|
extern struct target_type esp32_target;
|
||||||
|
extern struct target_type fa526_target;
|
||||||
|
extern struct target_type feroceon_target;
|
||||||
|
extern struct target_type hla_target;
|
||||||
|
extern struct target_type ls1_sap_target;
|
||||||
|
extern struct target_type mem_ap_target;
|
||||||
|
extern struct target_type mips_m4k_target;
|
||||||
|
extern struct target_type mips_mips64_target;
|
||||||
|
extern struct target_type or1k_target;
|
||||||
|
extern struct target_type quark_d20xx_target;
|
||||||
|
extern struct target_type quark_x10xx_target;
|
||||||
|
extern struct target_type riscv_target;
|
||||||
|
extern struct target_type stm8_target;
|
||||||
|
extern struct target_type testee_target;
|
||||||
|
extern struct target_type xscale_target;
|
||||||
|
extern struct target_type xtensa_chip_target;
|
||||||
|
|
||||||
#endif /* OPENOCD_TARGET_TARGET_TYPE_H */
|
#endif /* OPENOCD_TARGET_TARGET_TYPE_H */
|
||||||
|
|
Loading…
Reference in New Issue