MATLAB Answers

Error on compilation of example "Getting Started with Embedded Coder Support Package for BeagleBone Black Hardware"

15 views (last 30 days)
Jose Castro Valverde
Jose Castro Valverde on 21 Jan 2016
The beablebone black is properly configured and connected
bbb = beaglebone_black
bbb =
beaglebone_black with properties:
DeviceAddress: '192.168.7.2'
Port: 22
When I try do deploy the example I got this error:
IC:/PROGRA~1/MATLAB/R2015b/toolbox/target/codertarget/rtos/inc -o "linuxinitialize.c.o" "C:/PROGRA~1/MATLAB/R2015b/toolbox/target/codertarget/rtos/src/linuxinitialize.c"
In file included from c:\matlab\supportpackages\r2015b\beaglebone\toolbox\target\supportpackages\beaglebone\libc\usr\include\endian.h:60:0,
from c:\matlab\supportpackages\r2015b\beaglebone\toolbox\target\supportpackages\beaglebone\libc\usr\include\bits\waitstatus.h:64,
from c:\matlab\supportpackages\r2015b\beaglebone\toolbox\target\supportpackages\beaglebone\libc\usr\include\stdlib.h:42,
from C:/PROGRA~1/MATLAB/R2015b/toolbox/target/codertarget/rtos/inc/linuxinitialize.h:6,
from C:/PROGRA~1/MATLAB/R2015b/toolbox/target/codertarget/rtos/src/linuxinitialize.c:8:
c:\matlab\supportpackages\r2015b\beaglebone\toolbox\target\supportpackages\beaglebone\libc\usr\include\bits\byteswap.h:75:1: error: unknown type name '__uint64_t'
__bswap_64 (__uint64_t __bsx)
^
c:\matlab\supportpackages\r2015b\beaglebone\toolbox\target\supportpackages\beaglebone\libc\usr\include\bits\byteswap.h:75:13: error: unknown type name '__uint64_t'
__bswap_64 (__uint64_t __bsx)
^
In file included from C:/PROGRA~1/MATLAB/R2015b/toolbox/target/codertarget/rtos/inc/linuxinitialize.h:6:0,
from C:/PROGRA~1/MATLAB/R2015b/toolbox/target/codertarget/rtos/src/linuxinitialize.c:8:
c:\matlab\supportpackages\r2015b\beaglebone\toolbox\target\supportpackages\beaglebone\libc\usr\include\stdlib.h:510:35: error: expected ',' or ';' before '__attribute_alloc_size__'
__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
^
gmake: *** [linuxinitialize.c.o] Error 1
### Build procedure for model: 'beaglebone_gettingstarted' aborted due to an error.
Error(s) encountered while building "beaglebone_gettingstarted":
### Failed to generate all binary outputs.
Any idea how to fix it?
Thanks and best regards,
Jose,

Answers (1)

Venkatachala Sarma
Venkatachala Sarma on 8 Mar 2016
This issue is caused by an incompatibility between the Linaro Toolchain 4.8 (which uses GCC 4.8) and the Debian 8.3 image which was built using GCC 4.9. To resolve this issue, you can download the previous version of the firmware (Debian 7.9) to your BeagleBone Black. The image can be downloaded from the link below:
You can then follow the instructions listed on the BeagleBone Black "Getting Started" page (linked below) to create a microSD card that contains the Debian 7.9 image.
You can then boot the BeagleBone Black with this image. Following the boot, you will need to run the "targetupdater" function in MATLAB. To do this, you can execute the following in the MATLAB Command Window:
>> targetupdater
This will open the "Support Package Installer" target updater. Inside this window, please select the "BeagleBone Black" hardware. You can then follow the instructions to set up the support package. After the target updater completes, you can test your demo model again (link below):
This should compile and run successfully now. Hope this helps.
  2 Comments
Mayuresh Maradkar
Mayuresh Maradkar on 17 Oct 2016
It could be because of the partition of the card. Download SD formatter, and format the card. After that card will work fine.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by