]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
target: sort the targets by alphabetic order
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 14 Jun 2025 12:51:43 +0000 (14:51 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 29 Jun 2025 07:32:13 +0000 (07:32 +0000)
Add comments to require the list of targets to be kept sorted.

Change-Id: Ie3d7e3f5d55a9f9214dc179c5c986b6682f59412
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8951
Tested-by: jenkins
src/target/target.c
src/target/target_type.h

index fd0e0116b58a7d59951ec66799c9180904cb113a..8bf654a272a9b68f626b711a0d447f3406799173 100644 (file)
@@ -71,44 +71,45 @@ static int target_gdb_fileio_end_default(struct target *target, int retcode,
                int fileio_errno, bool ctrl_c);
 
 static struct target_type *target_types[] = {
+       // Keep in alphabetic order this list of targets
+       &aarch64_target,
+       &arcv2_target,
+       &arm11_target,
+       &arm720t_target,
        &arm7tdmi_target,
-       &arm9tdmi_target,
        &arm920t_target,
-       &arm720t_target,
-       &arm966e_target,
-       &arm946e_target,
        &arm926ejs_target,
-       &fa526_target,
-       &feroceon_target,
-       &dragonite_target,
-       &xscale_target,
-       &xtensa_chip_target,
-       &cortexm_target,
+       &arm946e_target,
+       &arm966e_target,
+       &arm9tdmi_target,
+       &armv8r_target,
+       &avr32_ap7k_target,
+       &avr_target,
        &cortexa_target,
+       &cortexm_target,
        &cortexr4_target,
-       &arm11_target,
-       &ls1_sap_target,
-       &mips_m4k_target,
-       &avr_target,
+       &dragonite_target,
        &dsp563xx_target,
        &dsp5680xx_target,
-       &testee_target,
-       &avr32_ap7k_target,
-       &hla_target,
-       &esp32_target,
+       &esirisc_target,
        &esp32s2_target,
        &esp32s3_target,
+       &esp32_target,
+       &fa526_target,
+       &feroceon_target,
+       &hla_target,
+       &ls1_sap_target,
+       &mem_ap_target,
+       &mips_m4k_target,
+       &mips_mips64_target,
        &or1k_target,
-       &quark_x10xx_target,
        &quark_d20xx_target,
-       &stm8_target,
+       &quark_x10xx_target,
        &riscv_target,
-       &mem_ap_target,
-       &esirisc_target,
-       &arcv2_target,
-       &aarch64_target,
-       &armv8r_target,
-       &mips_mips64_target,
+       &stm8_target,
+       &testee_target,
+       &xscale_target,
+       &xtensa_chip_target,
        NULL,
 };
 
index 5b0dc5a6c0c8ad679dd46d8f3f38b7e7030c7fc6..a146fab76366767501bf4e49859d2136354c1eb6 100644 (file)
@@ -307,6 +307,7 @@ struct target_type {
        unsigned int (*data_bits)(struct target *target);
 };
 
+// Keep in alphabetic order this list of targets
 extern struct target_type aarch64_target;
 extern struct target_type arcv2_target;
 extern struct target_type arm11_target;