cortex_a: use the ap number specified at target create
[fw/openocd] / src / openocd.c
index 2c94666243d724e8961d30b4e5f6b711a1c23e13..b4571b46499e9c6781c027be68c60c0221c7c81d 100644 (file)
@@ -364,8 +364,8 @@ int openocd_main(int argc, char *argv[])
        help_del_all_commands(cmd_ctx);
 
        /* free all DAP and CTI objects */
-       dap_cleanup_all();
        arm_cti_cleanup_all();
+       dap_cleanup_all();
 
        adapter_quit();