Beaglebone Black - porting cpp code