Curious if anyone has done this before. Wanting to have a small command-line based usbdm programming solution.
I expect this would be quite difficult.
Most of the programs are GUI based and required wxWidgets, xerces, etc.
You would need to check availability on the SBC. A list of packages is in a file on GITHUB:
usbdm-eclipse-makefiles-build/LinuxPackages at master · podonoghue/usbdm-eclipse-makefiles-build · GitHub
I've been trying this on a beaglebone black with debian 8 and lxqt.
The dependencies are all available, and after a few minor changes to the build I can run MakeAll successfully.
However, I'm having segfault issues when I try to run e.g. UsbdmFlashProgrammer. Seems to be something in wxWidgets.
Reading symbols from /usr/bin/UsbdmFlashProgrammer...(no debugging symbols found)...done.
Starting program: /usr/bin/UsbdmFlashProgrammer
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0xb658ba58 in std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) ()
#0 0xb658ba58 in std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) ()
#1 0xb665cf84 in wxAppConsoleBase::GetAppName() const ()
#2 0xb65ca700 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Looks like something in wcAppConsoleBase::GetAppName().
I can run wxWidgets example code fine. Mysterious....
So it seems that wxTheApp is null, which is why wxAppConsoleBase::GetAppName() is causing a segfault at line 106 of:
Seems that the app is not getting initialized by UsbdmFlashProgrammer.
I'm very slowly digging around (I'm a linux amateur) trying to find where wxTheApp would be initialized, but any debug tips would be greatly appreciated.
One other strange thing - I'd expect there to be errors noted in a log (usbdm.log). But this file isn't even created. I've been running UsbdmFlashProgrammer-debug to try to generate this file, but to no avail.
There should be a test TestWx-debug.i386 application to test the use of WxWidgets as a plugin. This plugin is use by TCL so may be indirectly used by the programmer.
Check if this works OK standalone as it can lead to similar problems.
The log file should be created in the .usbdm folder of the user and another file is created in one of the user temp directories but I can't check at the moment.
The App should be created in FlashProgrammerApp.cpp
// Implements FlashProgrammerApp& GetApp()
You can try setting the app name.
TestWx-debug works fine now that I'm not running as root (I guess running as root causes issues with GUI stuff)
But UsbdmFlashProgrammer-debug does not work, and produces the following error:
(usbdm:21912): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
01:03:51: Debug: Adding duplicate image handler for 'Windows bitmap file'
The log from running the TestWx-debug produces the below log entry, no log is produced for UsbdmFlashProgrammer.
debian@beaglebone:~/usbdm-eclipse-makefiles-build$ cat /home/debian/.usbdm/ExampleApp.log
Example Application - 126.96.36.199-Debug, Compiled on Oct 16 2015, 20:17:35.
Log file created on: Tue Oct 27 17:11:52 2015
0.76: int main(): Entry ===============
0.10: int main(): wxTheApp = (nil)
0.05: int main(): Loading plug-in
0.07: static std::tr1::shared_ptr<_Tp> PluginFactory<T>::createPlugin(std::string, std::string) [with T = WxPlugin; std::string = std::basic_string<char>]: Entry ===============
7.74: bool wx_dll_open(): Entry ===============
0.55: wxPluginApp::wxPluginApp(): Entry ===============
0.09: wxPluginApp::wxPluginApp(): MINIMAL_APP()
16.39: virtual wxPluginApp::~wxPluginApp(): Entry ===============
1.15: bool wx_dll_open(): Created wxTheApp = (nil)
Retrieving data ...