3 Replies Latest reply on Jan 27, 2015 7:53 AM by alexander.drozdov

    Using OpenOCD 0.8.0

    kumr

      If you have issues using OpenOCD 0.8.0, try these:

         

      1. rebind the adapter to the WinUSB driver. See this link for instructions.

         

      2. copy the following config into a file called fx3.cfg and put it into the [openocd_install_dir]/scripts/target folder

         

       

         

      ############################################
      # Target:    Cypress EZ-USB FX3 ARM926EJ-S #
      ############################################

         

      if { [info exists CHIPNAME] } {
       set _CHIPNAME $CHIPNAME
      } else {
       set  _CHIPNAME fx3
      }

         

      if { [info exists ENDIAN] } {
       set _ENDIAN $ENDIAN
      } else {
       set _ENDIAN little
      }

         

      if { [info exists CPUTAPID] } {
       set _CPUTAPID $CPUTAPID
      } else {
       set _CPUTAPID 0x07926069
      }

         


      # Reset configuration
      reset_config trst_and_srst srst_pulls_trst
      adapter_nsrst_delay 200
      jtag_ntrst_delay 200

         

      jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

         

      ########################
      # Target configuration #
      ########################

         

      set _TARGETNAME $_CHIPNAME.cpu
      target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm926ejs

         

      adapter_khz 1000

         

       

         

      3. run openocd.exe as follows:

         

      openocd-x64-0.8.0.exe -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/fx3.cfg

        • 1. Re: Using OpenOCD 0.8.0
          alexander.drozdov

          Hi,

             

          How do you debug threads?

          • 2. Re: Using OpenOCD 0.8.0
            kumr

             Can you elaborate on what you meant by "debug threads"? What do you want to be debugged in the threads?

            • 3. Re: Using OpenOCD 0.8.0
              alexander.drozdov

              I mean:

                 

              1. view list of running threads (gdb: info threads)

                 

              2. switch between threads and look: what is instruction/function run now, what registers (gdb: thread #/frame #/bt)

                 

              3. view thread structures and so on.

                 

              Currently if I stop core SP and PC registers may points to random location and I can see backtrace only for current stack (that pointed by SP).

                 

              Threads is a ThreadX entity. OpenOCD supports ThreadX but only for Cortex-M3 and Cortex-R4 cores. Tomorrow I will try my patched OpenOCD version with arm926ejs support. May be it will be work :-)