Make file failure in Pololu SDK for Maestro

Hi everyone,

I have an issue when I was running the make file for the Pololu USB SDK. After running the make file I get the following error:

make: warning:  Clock skew detected.  Your build may be incomplete.

:open_mouth:

Also when trying to run the MaestroAdvancedExample executable I get the following from the command line:

linaro@linaro-ubuntu-desktop:~/Downloads/pololu-usb-sdk/Maestro/MaestroAdvancedExample$ ./MaestroAdvancedExample 
Stacktrace:

  at System.Drawing.Font.CreateFont (string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool) <0x0013f>
  at System.Drawing.Font..ctor (string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool) <0x0007f>
  at System.Drawing.Font..ctor (string,single,string) <0x00057>
  at (wrapper remoting-invoke-with-check) System.Drawing.Font..ctor (string,single,string) <0xffffffff>
  at System.Drawing.SystemFonts.get_DefaultFont () <0x0005b>
  at System.Windows.Forms.Theme..ctor () <0x0002b>
  at System.Windows.Forms.ThemeWin32Classic..ctor () <0x00013>
  at System.Windows.Forms.ThemeVisualStyles..ctor () <0x00013>
  at System.Windows.Forms.ThemeEngine..cctor () <0x00063>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.X11DesktopColors..cctor () <0x000a7>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.XplatUIX11..ctor () <0x0014b>
  at System.Windows.Forms.XplatUIX11.GetInstance () <0x0004b>
  at System.Windows.Forms.XplatUI..cctor () <0x0010b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.Application.EnableVisualStyles () <0x0001b>
  at Pololu.Usc.MaestroAdvancedExample.Program.Main () <0x0000b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:


Debug info from gdb:

Cannot access memory at address 0x616a653c
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x42fff460 (LWP 5121)]
[New Thread 0x42660460 (LWP 5120)]
[New Thread 0x40e8b460 (LWP 5119)]
0x400803a0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0
  Id   Target Id         Frame 
  4    Thread 0x40e8b460 (LWP 5119) "cli" 0x40082384 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  3    Thread 0x42660460 (LWP 5120) "dconf worker" 0x40161276 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
  2    Thread 0x42fff460 (LWP 5121) "gdbus" 0x40161276 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
* 1    Thread 0x4022e000 (LWP 5117) "cli" 0x400803a0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0

Thread 4 (Thread 0x40e8b460 (LWP 5119)):
#0  0x40082384 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x4007f6da in do_futex_wait () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x4007f756 in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0x001155dc in mono_sem_wait ()
#4  0x000a5b10 in ?? ()
#5  0x000a5b10 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x42660460 (LWP 5120)):
#0  0x40161276 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x401d21e8 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0x4041522e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#3  0x4041522e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x42fff460 (LWP 5121)):
#0  0x40161276 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x401d21e8 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0x4041522e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#3  0x4041522e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x4022e000 (LWP 5117)):
#0  0x400803a0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x40080394 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0xbede9b30 in ?? ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted

I also get a similar error when running the Maestro Control Center.
The computer I am running is an ODROID-U2 (Quad core ARM Cortex-A9 MPCore) with Ubuntu 12.11 Linaro. I was wondering if anyone else experienced this or what the fix is. Thanks in advance for all the help.

Hello. The error you are getting from Make seems to be a common error. I suspect the clock on your system is set to something in the distant past.

It looks like there might be some error happening in the graphics libraries of Mono. Could you try running the command-line utility UscCmd instead and see if that works?

–David

I did, it gives me this screen, but I don’t know how to actually send commands from it.

UscCmd, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null
Select one of the following actions:
  --list                   list available devices
  --configure FILE         load configuration file into device
  --getconf FILE           read device settings and write configuration file
  --restoredefaults        restore factory settings
  --program FILE           compile and load bytecode program
  --status                 display complete device status
  --bootloader             put device into bootloader (firmware upgrade) mode
  --stop                   stops the script running on the device
  --start                  starts the script running on the device
  --restart                restarts the script at the beginning
  --step                   runs a single instruction of the script
  --sub NUM                calls subroutine n (can be hex or decimal)
  --sub NUM,PARAMETER      calls subroutine n with a parameter (hex or decimal)
                           placed on the stack
  --servo NUM,TARGET       sets the target of servo NUM in units of
                           1/4 microsecond
  --speed NUM,SPEED        sets the speed limit of servo NUM
  --accel NUM,ACCEL        sets the acceleration of servo NUM to a value 0-255
Select which device to perform the action on (optional):
  --device 00001430        (optional) select device #00001430

linaro@linaro-ubuntu-desktop:~/Downloads/maestro_linux$

The output you posted describes how to use UscCmd. For example, to set servo 0 to a target of 6000 (1500 microseconds), you would type:

UscCmd --servo 0,6000

–David