[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bluetooth-dev] Re: Porting to ARM
Barton Meeks wrote:
> Gordon McNutt <email@example.com> wrote:
> > I've been trying to get the Bluetooth stack running on an ARM
> > processor. I've discovered that unfortunately the Axis
> > stack is using struct overlays onto byte arrays as a way
> > to fill out the protocol headers.
> Our biggest pain right now is in this area as well. Our compiler (MRI
> C or C++) doesn't allow the zero-length arrays in structures. These
> are used in many structures that are used to overlay the byte array.
> Changing the size of the structure by changing data to *data or data
> would seem to be dangerous.
> We are looking at removing these zero length arrays completely, but that
> is going to involve changing a fair bit of code to use pointer arithmetic.
Even though the compiler directives solve the alignment problem on the ARM,
I'm still going to have to deal with the endianness issue for a port to MIPS.
Converting to pointer arithmetic and using shift operations on multi-byte
values should solve the alignment issues, your compiler issues, and the
I have to admit that I'm a bit new to the open source development process,
but it seems like we could all benefit if we had
a) a central repository to merge in changes (CVS)
b) some way to test these changes so we don't break people using different
hardware, etc (stable/unstable revs like Linux?)
c) some one to administer a & b (is Axis planning to do this? If not, do they
mind if someone else volunteers to take over?)
Just my 2 cents.