Re: [Openocd-development] Unable to step through code in GDB
Nived schrieb: > Hi, > > i am using openocd 0.4.0 to debug an intelmote2 device. I am able to set > a break point and then transfer control to that point. When i do a > continue (c) or a next (n) the execution returns to the same point. > > Is there any particular reason why this may be happening ? This happens to me (on Cortex M3 / LPC1768) when I have Interrupts on, e.g. Timer. The Timer keeps running when the core is halted; When you hit "continue" it will first execute the interrupt vector and then returns to the instruction that has the breakpoint set, thus hitting it again. I can see this when I use the "step" command instead of "next". You might try switching off interrupts for code stepping. There is a "cortex_m3 maskisr on|off" command for Cortex M3 MCUs, I suspect there is something similar for other ARM CPUs. Hint: GDB can exectue scripts on stepping on/off. -- J.Fischer ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] cortex-r4 core
Gene Smith wrote: > This seems to be the only commercial eval board for this core (TMS570 > is actually dual core): > > http://processors.wiki.ti.com/index.php/TMS570_MDK_Kit > > The board is made by Keil (or has their name on it) for TI and > another article shows using the jlink. http://www.keil.com/MCBTMS570/ http://www.keil.com/support/man/docs/mcbtms570/mcbtms570_to_jtag.htm They recommend JLink. I'm sure any JTAG is fine as long as you don't require their µVision IDE/debugger to support it. > They provide a direct usb debug interface that they mainly > emphasize. To what? Where? > Any ideas on what kind of problems might be run into if using this > with openocd via jtag? If OpenOCD knows that ARM core then I think it should work, but better test to know for sure. :\ //Peter ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Software breakpoints with GDB do not work
Hi all, can anybody please explain me in the more details arm966e_read_cp15() function (or arm920t_read_cp15()). While fileds manipulation is intuitive, I do not get : 1) Why do we have to call jtag_add_dr_scan() two times, first time with fields[1].in_value = NULL, other time set to correct var to which we want to capture CP15 register value. What are we doing first time, and what the second ? For write CP15 functions we do jtag_add_dr_scan() only once, 2) Why do we put pointer to value variable in 6 bits address fields ? Should not we put it to 32 bit value fields, i.e. fields[0].in_value ? 3) What is jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)value) doing ? Why does it force little endian, and how to change this since ARM946E-S is big endian. 4) What is jtag_execute_queue() ectually doing and why is is used only for debug ? BR, Drasko N.B. function code pasted below : static int arm966e_read_cp15(struct target *target, int reg_addr, uint32_t *value) { int retval = ERROR_OK; struct arm7_9_common *arm7_9 = target_to_arm7_9(target); struct arm_jtag *jtag_info = &arm7_9->jtag_info; struct scan_field fields[3]; uint8_t reg_addr_buf = reg_addr & 0x3f; uint8_t nr_w_buf = 0; if ((retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE)) != ERROR_OK) { return retval; } retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; fields[0].num_bits = 32; /* REVISIT: table 7-2 shows that bits 31-31 need to be * specified for accessing BIST registers ... */ fields[0].out_value = NULL; fields[0].in_value = NULL; fields[1].num_bits = 6; fields[1].out_value = ®_addr_buf; fields[1].in_value = NULL; fields[2].num_bits = 1; fields[2].out_value = &nr_w_buf; fields[2].in_value = NULL; jtag_add_dr_scan(jtag_info->tap, 3, fields, TAP_IDLE); fields[1].in_value = (uint8_t *)value; jtag_add_dr_scan(jtag_info->tap, 3, fields, TAP_IDLE); jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)value); #ifdef _DEBUG_INSTRUCTION_EXECUTION_ if ((retval = jtag_execute_queue()) != ERROR_OK) { return retval; } LOG_DEBUG("addr: 0x%x value: %8.8x", reg_addr, *value); #endif return ERROR_OK; } ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Message script openocd 0.4.0 windows for In Board flash programming.
> flash write_binary 0 BootLoader_108.bin 0x0 0: command requires more > arguments There is no command with the name 'flash write_binary'. Perhaps you mean 'flash write_bank'? In that case, the extra zero on the end shouldn't be there. The error message is nonsense. "> help flash write_bank flash write_bank bank_id filename offset Write binary data from file to flash bank, starting at specified byte offset from the beginning of the bank." /Andreas ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development