~ubuntu-branches/ubuntu/wily/openocd/wily

« back to all changes in this revision

Viewing changes to src/jtag/jlink.c

  • Committer: Bazaar Package Importer
  • Author(s): Uwe Hermann
  • Date: 2009-11-25 12:20:04 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091125122004-4cnrzqw7v9qu064n
Tags: 0.3.1-1
* New upstream release (Closes: #554598, #537740).
* Add sh4 (instead of sh) to the list of architectures (Closes: #555553).
* Standards-Version: 3.8.3 (no changes required).
* debian/watch: Add file.
* debian/docs: Updates, some files were removed, some added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
                LOG_ERROR("Cannot find jlink Interface! Please check connection and permissions.");
315
315
                return ERROR_JTAG_INIT_FAILED;
316
316
        }
317
 
        
 
317
 
318
318
        /*
319
319
         *  The next three instructions were added after discovering a problem while using an oscilloscope.  For the V8
320
320
         *      SAM-ICE dongle (and likely other j-link device variants), the reset line to the target microprocessor was found to
324
324
         *      following a new USB session.  Keeping the processor in reset during the first read collecting version information
325
325
         *      seems to prevent errant "J-Link command EMU_CMD_VERSION failed" issues.
326
326
         */
327
 
        
 
327
 
328
328
        LOG_INFO("J-Link initialization started / target CPU reset initiated");
329
329
        jlink_simple_command(EMU_CMD_HW_TRST0);
330
330
        jlink_simple_command(EMU_CMD_HW_RESET0);
499
499
        {
500
500
                jlink_simple_command(EMU_CMD_HW_TRST0);
501
501
        }
 
502
 
502
503
        if (trst == 0)
503
504
        {
504
505
                jlink_simple_command(EMU_CMD_HW_TRST1);
505
 
                jtag_sleep(5000);
506
 
                jlink_end_state(TAP_RESET);
507
 
                jlink_state_move();
508
506
        }
509
507
}
510
508
 
883
881
 
884
882
        if (result->usb_handle)
885
883
        {
886
 
        
 
884
 
887
885
                /* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS AREA!!!!!!!!!!!
888
886
                 * The behavior of libusb is not completely consistent across Windows, Linux, and Mac OS X platforms.  The actions taken
889
887
                 * in the following compiler conditionals may not agree with published documentation for libusb, but were found