Before going a bit futher in the 2nd patch. I describe a bit more the expected changes.
As the modifications should ideally apply to all dap user, I had a look -1- cortex_m3.c I noticed already differences between cortex_m3 and cortex_a : In cortex_m3 : ap_bank_value is initialized at 0, no dap_ap_select is done. => introduction of mem_ap_sel in cortex_m3 -2- Initialization of a dedicated tap (with dap support) As the dap instance is carried inside tap instance, the initialization of dap instance can be done at tap creation : I propose to detect that tap is dap according to extension in name (pTap->tapname is string "dap") And struct jtag_tap is modified : adiv5_dap *dap; /* is added */ this pointer remains null in case of tap, in case of dap it contains a dap instance. => allocation of dap structure (initialization with default value : memaccess_tck = 8 tar_autoincr_block = (1 << 12))) => allocation of jtag_info (initialization with default value : scann_size = 4 in case default value do not match parameter can be added in dap creation. struct armv7m_common is modified: => pointer to dap instead of instance struct cortex_m3_common and struct cortex_a8_common : jtag_info is removed And that 's mainly all Should I do all this changes ? Best regards -----Original Message----- From: Øyvind Harboe [mailto:[email protected]] Sent: Friday, April 08, 2011 6:22 PM To: Michel JAOUEN Cc: luca ellero; [email protected] Subject: Re: cortex_a : dap_ap_select issue when multiple target on the same dap Sounds like a reasonable approach to me. Why don't we hold off committing this fix until you're done with both in case you decide to rewrite this patch a bit along the way? -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
