[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bluetooth-dev] Re: Porting to ARM
Hi all ARM porters !!!!
I'm just wondering if anyone has a nice solution on the struct overlay
We have developed a bluetooth stack for windows and used a struct overlay
technique similar to axis.
Now we deeply regrets this technique because of the porting difficulties
As we understands it the ARM processor cant fetch a word(2 byte) on an odd
address and therefore the C-compiler inserts a space in our structs if it
encounters a int_2 on a odd address and thereby destroying our nice
So does anyone know a C-compiler that can handle this on ARM or a nice way
around the problem without a complete rewrite of the package processing?
// Jonas Wigstein
On Mon, 18 Sep 2000, Barton Meeks wrote:
> References: <39C0F992.361F6810@xxxxxxx.com>
> Gordon McNutt <firstname.lastname@example.org> 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.
> To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax,
> all in one place - sign up today at http://www.zdnetonebox.com