I'm having hard time with CrossStudio. First let me introduce you to the problem:
I'm trying to use CrossWorks on OS X, which - the system I have on my MacBook - to be a little more mobile with my developments. I have J-Link EDU and used it for development on Windows with not a single problem under CrossStudio. To use J-Link under OS X you have to install Segger official Mac software package, install libusb and point CrossWorks to the libjlinkarm library that comes from Segger. Once you have that setup correctly your J-Link is prefectly usable under OS X... until you plug it out.
Then CrossStudio crashes.
Then I plug J-Link in again, open CrossStudio, pull the plug - bang, another crash.
So I might tell that is what developers love about bugs: reproducibility. I'm a developer myself, so to be sure that it is not my environment problem I went on to investigate - I'm still on evaluation period so I'm not sure whether I qualify for support or not.
First of all I checked Segger's own JLinkExe, which by the accident also uses libusb, the same that CrossStudio is dynamically loading (by the means of dlopen et al) - at least that is what otool -L libjlinkarm.4.dylib is telling me. Because CrossStudio loads libusb dynamically otool on crossstudio tells you nothing - but the tests tell that it is indeed loading libusb: once I removed libusb from my /usr/local/lib directory and launched CrossStudio, unplugging J-Link didn't crash studio.
So I thought that maybe libusb is to blame, I reinstalled head of repository version from libusb.org, then I installed released version of libusbx fork of libusb, then the head of libusbx - each one gave me the same crash on unplugging J-Link.
Then I thought that Segger might be doing something bad with libusb, it's their library that is early linking to libusb. So I moved libjlinkarm.4.62.1.dylib somewhere CrossStudio couldn't find.
Then I launched CrossStudio.
Then I unplugged my mouse - bang, crash!
So now there are only three possible reasons left:
- My environment is messed up.
- CrossStudio is misusing libusb and Rowley guys should take a look at it.
- libusb has a bug that libusb guys should take a look at.
Please sign in to leave a comment.