[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re: [bluetooth-dev] newbie question, compile problems



> -----Original Message-----
> From: Mathias Handorf [mailto:m.handorf@xxxxxxx.au] 
> Sent: Sunday, July 13, 2003 06:53
> To: Peter Kjellerstedt; 'm.handorf@xxxxxxx.au'; Bluetooth-dev
> Subject: Re: Re: [bluetooth-dev] newbie question, compile problems
> 
> thanks peter
> 
> I changed __u16 and __u32 to u16 and u32 in local.h but 
> unfortunately the result is still the same. I get the same
> errors while compiling for uClinux
> (m68k-elf-gcc -m68000 -Wl, -elf2flt -o test test.c -lc).
> 
> In file included from
>  /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
>  /btcommon.h:57
>  ,
>                   from test.c:1:
>  /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
>  /local.h:74:
>  parse error before `cpu_to_le16'
>  /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
>  /local.h:74:
>  parse error before `x'
>  /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
>  /local.h: In
>  function `cpu_to_le16':
>  /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
>  /local.h:74:
> ....
> 
> I attached my changed local.h file but there wasn't much to 
> do wrong. :-)

Hmm, maybe the compiler you are using does not like the inline
keyword? But then you would not be able to build the kernel
with it as it uses inline extensively... You could try and
outline the cpu_to_le16() and cpu_to_le32() functions.

> I'm not sure what you mean with building the stack for user 
> mode. The stack itself runs later in kernel mode on the BlueMod. 
> But the problem is already if I try to compile the application
> on its own.

Well, the part of the local.h file that is causing the error
messages is only used if the file is included from a user
mode program, that is why I assumed you were trying to build
the stack for user mode. 

The include files for the stack are not supposed to be
included from applications. If you look at the files in the
apps/bluetooth/experimental directory you should find that
no include files from the stack are used (except from within
#ifdef BT_USERSTACK, but that is for building the user mode
stack).

> if somebody has more ideas I would be the first who wants to 
> hear them.
> thanks in advance
> mathias

//Peter


> > The types used in the macros on line 74 and 75 in local.h
> > are wrong. Replace __u16 with u16, and __u32 with u32 and
> > you should (probably) be better off.
> > 
> > However, are you building the stack for user mode?
> > In that case, please be aware that the use mode support
> > was terminated a long time ago, and I have no idea how much
> > of it that actually still works.
> > 
> > //Peter
> > 
> > > -----Original Message-----
> > > From: Mathias Handorf [mailto:m.handorf@xxxxxxx.au] 
> > > Sent: 11 July 2003 12:03
> > > To: bluetooth-dev@xxxxxxx.com
> > > Subject: [bluetooth-dev] newbie question, compile problems
> > > 
> > > hey everybody
> > > 
> > > I started recently on a project with BlueMod and 
> > > uClinux-2.4.x. It was no
> > > problem to start and run the Bluetooth stack on the BlueMod.
> > > But now I try to write my own Application and I get stuck.
> > > 
> > > I just include btcommon.h and compile it so that I can run 
> > > the program on
> > > BlueMod (e.g. m68k-elf-gcc -m68000 -Wl, -elf2flt -o test 
> > > test.c -lc). But
> > > then I got plenty of parse errors in local.h :
> > > 
> > > In file included from
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /btcommon.h:57
> > > ,
> > >                  from test.c:1:
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:74:
> > > parse error before `cpu_to_le16'
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:74:
> > > parse error before `x'
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h: In
> > > function `cpu_to_le16':
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:74:
> > > `x' undeclared (first use in this function)
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:74:
> > > (Each undeclared identifier is reported only once
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:74:
> > > for each function it appears in.)
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h: At
> > > top level:
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:75:
> > > parse error before `cpu_to_le32'
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:75:
> > > parse error before `x'
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h: In
> > > function `cpu_to_le32':
> > > /home/BlueMod/uClinux-hcv/OpenBT/linux/include/linux/bluetooth
> > > /local.h:75:
> > > `x' undeclared (first use in this function)
> > > 
> > > can somebody kindly tell me what I'm doing wrong.
> > > probably it is just a simple mistake and I'm to blind to see
> > it. > 
> > > thanks in advance
> > > mathias
> 
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com