From: dodge-this Date: Sat, 28 Aug 2010 11:49:34 +0000 (+0000) Subject: ARM mode set r15 fixed. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=5fb51d7210531187ca33cf44f1126de793f94520 ARM mode set r15 fixed. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@711 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/apps/jtag/jtagarm7.c b/firmware/apps/jtag/jtagarm7.c index f195679..89e8c40 100644 --- a/firmware/apps/jtag/jtagarm7.c +++ b/firmware/apps/jtag/jtagarm7.c @@ -46,9 +46,7 @@ http://hri.sourceforge.net/tools/jtag_faq_org.html * *get_register * *set_register */ -// TODO: -// * fix set_register to handle pc again. apparently it got broken when i fixed the dclk timing issue. -// + // ! Start JTAG, setup pins, reset TAP and return IDCODE void jtagarm7tdmi_start() { jtagsetup(); @@ -152,15 +150,13 @@ unsigned long jtagarm7_get_reg_prim(unsigned long instr){ void jtagarm7_set_reg_prim(unsigned long instr, unsigned long reg, unsigned long val){ // PROVEN - 100827 (non-PC) jtagarm7tdmi_nop( 0); // push nop into pipeline - executed jtagarm7tdmi_instr_primitive(instr, 0); // push instr into pipeline - fetch - if (reg == ARM_REG_PC){ - debugstr("setting pc..."); - jtagarm7tdmi_instr_primitive(val, 0); // push 32-bit word on data bus jtagarm7tdmi_nop( 0); // push nop into pipeline - decode jtagarm7tdmi_nop( 0); // push nop into pipeline - execute - } else { - jtagarm7tdmi_nop( 0); // push nop into pipeline - decode - jtagarm7tdmi_nop( 0); // push nop into pipeline - execute jtagarm7tdmi_instr_primitive(val, 0); // push 32-bit word on data bus + if (reg == ARM_REG_PC){ + debugstr("setting pc..."); + jtagarm7tdmi_nop( 0); // push nop into pipeline - refill + jtagarm7tdmi_nop( 0); // push nop into pipeline - refill } }