Compile usbdm for an arm-based SBC (beaglebone black or Rpi)?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Compile usbdm for an arm-based SBC (beaglebone black or Rpi)?

2,154件の閲覧回数
bobdobbs
Contributor II

Curious if anyone has done this before. Wanting to have a small command-line based usbdm programming solution.

Cheers!

0 件の賞賛
返信
5 返答(返信)

1,556件の閲覧回数
pgo
Senior Contributor V

Hi Bob,

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 · G...

bye

0 件の賞賛
返信

1,556件の閲覧回数
bobdobbs
Contributor II

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.

(gdb) run

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&) ()

   from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6

(gdb) backtrace

#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&) ()

   from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6

#1  0xb665cf84 in wxAppConsoleBase::GetAppName() const ()

   from /usr/lib/arm-linux-gnueabihf/libwx_baseu-3.0.so.0

#2  0xb65ca700 in ?? ()

   from /usr/lib/i386-linux-gnu/usbdm/libusbdm-wx-plugin.so.4

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

(gdb)

Looks like something in wcAppConsoleBase::GetAppName().

I can run wxWidgets example code fine. Mysterious....

BD

0 件の賞賛
返信

1,556件の閲覧回数
bobdobbs
Contributor II

So it seems that wxTheApp is null, which is why wxAppConsoleBase::GetAppName() is causing a segfault at line 106 of:

/root/usbdm-eclipse-makefiles-build/Shared_V4/src/WxStub.cpp

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.

Cheers,

BD

0 件の賞賛
返信

1,556件の閲覧回数
pgo
Senior Contributor V

Hi Bob,

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()

DECLARE_APP(FlashProgrammerApp)

IMPLEMENT_APP(FlashProgrammerApp)

You can try setting the app name.

bye

0 件の賞賛
返信

1,556件の閲覧回数
bobdobbs
Contributor II

Thanks PGO!

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 - 4.12.1.40-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)