element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum libusb and OpenOCD?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 9 replies
  • Answers 1 answer
  • Subscribers 674 subscribers
  • Views 2022 views
  • Users 0 members are here
  • raspberry_pi
Related

libusb and OpenOCD?

johnbeetem
johnbeetem over 12 years ago

I have a some questions about libusb and OpenOCD.  There might be a better group to ask about these, but a number of people who comment in this group know about these sorts of things.  Besides, I will want to run this stuff on RasPi so it applies.

 

Basically, I'm interested in learning to do low-level USB programming for talking to external USB devices.  I don't want to write a device driver -- I want to do everything from Userland.  From what I've read, libusb appears to be the right software for this, but it's confusing.  Before I get started, I'd like to learn from others' experience.  Here are some specific questions:

 

1.  There are several versions of libusb out there, and it appears to have an interesting FLOSS history.  There's libusb-0.1 which is old, but stable.  There's libusb-1.0 which has a different API, but it's actively being developed.  Then there's libusbx which is a fork of libusb-1.0, but it may have rejoined since libusb.org today lists libusbx-1.0.16 (2013-07-11) as the latest version.  Has anyone here developed with any of version of libusb and has some tips to share?  Also, does anyone here know about libusb history?

 

2.  Is there any better libusb documentation that what's available at libusb.org?  Google found me this this tutorial from Jan 2010, which seems to be a good start.  I'd appreciate any pointers.  There's no point doing "program by experiment" if someone has already done it and written it up.

 

I'm also interested in OpenOCD.  Has anyone here used it at the API level?  I took a quick look at the user guide and the developer documentation, and from a first impression it seems overly complex.  I need to decide if it's worth delving into OpenOCD or whether I'm better off building on my own JTAG code already written.

 

Thank you for any comments you may have.

  • Sign in to reply
  • Cancel
Parents
  • johnbeetem
    0 johnbeetem over 12 years ago

    OK, I'm making progress.  I got the "simple.c" and "find_all.c" examples working, so libftdi is able to see my FT2232H Mini-Module.  I'm still on Ubuntu 11.10 [*] so it apt-got libftdi 0.19 and still has libusb-0.1, but that should be OK for now.

     

    I didn't have to uninstall ftdi_sio explicitly: libftdi did that for me automatically.  I did have to sudo, which is an annoyance.

     

    Onward to MPSSE, JTAG, and eternal youth!

     

    [*] Why Ubuntu 11.10?  Two reasons: (1) I hate upgrading software and (2) I used a Univac 1110 in my undergrad days, so nostalgia I guess.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • johnbeetem
    0 johnbeetem over 12 years ago in reply to johnbeetem

    johnbeetem wrote:

     

    Onward to MPSSE, JTAG, and eternal youth!

    Yes!  MPSSE and JTAG work very nicely.  It's so nice to be talking to my Mini-Module from GNU/Linux instead of Windows, and without the obscurity of proprietary drivers.  I really prefer the libftdi calls to FTDI's.

     

    But now for something completely different... PSoC5!  (to be continued...)

     

    Thank you again for your help.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • johnbeetem
    0 johnbeetem over 12 years ago in reply to johnbeetem

    johnbeetem wrote:

     

    Onward to MPSSE, JTAG, and eternal youth!

    Yes!  MPSSE and JTAG work very nicely.  It's so nice to be talking to my Mini-Module from GNU/Linux instead of Windows, and without the obscurity of proprietary drivers.  I really prefer the libftdi calls to FTDI's.

     

    But now for something completely different... PSoC5!  (to be continued...)

     

    Thank you again for your help.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • shabaz
    0 shabaz over 12 years ago in reply to johnbeetem

    Oh, awesome!!

     

    That's good news. I didn't get a chance to try this out at the time but I was wondering how easy/hard it was to use, or if I should stick with the few off-the-shelf USB-JTAG devices that I have. Glad it works!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube