Ivan Grujic

Registered on 08/15/2013 • Last connection on 11/05/2013

Building ZBOSS for a BeagleBone Black

Hi,

 

I am trying to build the ZBOSS stack for a beaglebone black, running an ARM XAM3359 Cortex 9 processor.

 

So far I have tried making a C project in eclipse, and building the source code. It didn't work. I get a bunch of errors, first one being #error port me!

 

Since the beaglebone is meant to run linux I defined #define UNIX, but this didn't change anything. I see alot of IAR references in here and in the code.

 

Is there an IAR compiler that will build a stack which can run on the beaglebone?

 

Thanks a lot

 

Ivan

 

RE: Building ZBOSS for a BeagleBone Black

Hello again,

 

I tried following your steps, and made somewhat progress.

 

I managed to get the stack to build, after using the make rebuild command.

 

The build stopped with this in the terminal.

 

"

 

s_bits’

 

zb_mac_transport_linux_spidev.c:347:3: error: ‘fd_set’ has no member named ‘__fds_bits’

 

zb_mac_transport_linux_spidev.c:390:3: error: passing argument 2 of ‘select’ from incompatible pointer type [-Werror]

 

In file included from /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/include/sys/types.h:219:0,

 

from /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/include/stdlib.h:314,

 

from ../../osif/include/zb_osif_unix.h:17,

 

from ../../osif/include/zb_osif.h:22,

 

from ../../include/zb_g_context.h:12,

 

from ../../include/zb_common.h:17,

 

from zb_mac_transport_linux_spidev.c:12:

 

/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/include/sys/select.h:106:12: note: expected ‘struct fd_set restrict’ but argument is of type ‘struct fd_set

 

zb_mac_transport_linux_spidev.c:422:11: error: ‘fd_set’ has no member named ‘__fds_bits’

 

cc1: all warnings being treated as errors

 

make[1]: *** [zb_mac_transport_linux_spidev.o] Error 1

 

make[1]: Leaving directory `/home/ivan/ZBOSS/TestProjectCpp/osif/unix'

 

make: *** [bldall] Error 2

 

ivan@ubuntu:~/ZBOSS/TestProjectCpp$

 

"

 

You write something about modifying spidev after compilation, could the line "zb_mac_transport_linux_spidev.c:422:11: error: ‘fd_set’ has no member named ‘__fds_bits’" be related to this or is it caused by something else?

 

In general I could use a hint for modifying spidev :)

 

Thanks a lot

 

Br

 

Ivan

 

RE: Building ZBOSS for a BeagleBone Black

Hi,

 

After alot of testing I have gotten a better understanding of the situation. I managed to compile a suitable kernel for the beaglebone and link the headers from KERNEL/include.

 

I compile the stack with the same toolchain that is used for the kernel, the linaro arm-linux-gnueabi cross compiler:

 

http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-ARMCrossCompiler:GCC

 

I use the PATH variable and set it to the toolchains bin directory.

 

But I still cannot avoid errors when compiling the stack. Some types are apparently defined in the linux headers, and also in a set of headers which came with the toolchain. These types cause errors since they are

 

defined differently in the two libraries.

 

Could there be some define that you need to declare before compiling, or maybe some kind of compiler setting? Or maybe even some headers that I should remove(gasping here)?

 

At the momemt I am really quite baffled. Btw I am using the latest version of the stack, and not the stable one.

 

Any help would be greatly appreciated.

 

Thanks

 

Br

 

Ivan

 

RE: Building ZBOSS for a BeagleBone Black

SOLVED

 

The linux header include path was incorrect, which caused the type conflicts.

 

The correct include path is /KERNEL/kernel

 

Ivan