From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11627 invoked by alias); 1 Jul 2005 05:10:29 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 11614 invoked by uid 22791); 1 Jul 2005 05:10:21 -0000 Received: from ozhmx1.ozhosting.com (HELO ozhmx1.ozhosting.com) (203.30.164.229) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 01 Jul 2005 05:10:21 +0000 Received: from ozhmail1.ozhosting.com (ozhmail1.ozhosting.com [203.30.164.236]) by ozhmx1.ozhosting.com (Postfix) with ESMTP id A5E4C34AD3 for ; Fri, 1 Jul 2005 15:10:17 +1000 (EST) Received: from clarinox.com (unverified [127.0.0.1]) by ozhmail1.ozhosting.com (Vircom SMTPRS 4.1.361.9) with ESMTP id ; Fri, 1 Jul 2005 15:09:38 +1000 Message-ID: <959e269faa6545069d922c92830300ba.clifford.joseph@clarinox.com> X-EM-APIVersion: 2, 0, 1, 0 From: "" To: "Bart Veer" Cc: ecos-discuss@ecos.sourceware.org Date: Fri, 01 Jul 2005 05:10:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: Re: [ECOS] i2c bit-banging implementation X-SW-Source: 2005-07/txt/msg00004.txt.bz2 Thank you for the reply I am sending you the exact information printed after compiling L2CapDataClientMain.cpp is where main() is i have compiled the code with g++ -E -g=20 this is the message i get=20 arm-elf-g++ -L/opt/ecos/gnutools/arm-elf/arm-elf/lib -L../../../Lib -L/opt/= ecos/ work/ram_debug/ram_debug_install/lib -Ttarget.ld -nostdlib -mcpu=3Darm7tdmi= -mno-s hort-load-words -nostartfiles -Wl,-static -Wl,-Map,map_file -Wl,--gc-sectio= ns -O 1 -E -g -o L2capDataClient L2capDataClient.o L2capDataClientMain.o BoardSp= ecifi c.o -lprofiles -lapi -lsofttools -lstack -ltransport -lportability -lcommon arm-elf-g++: -static: linker input file unused because linking not done arm-elf-g++: -Map: linker input file unused because linking not done arm-elf-g++: map_file: linker input file unused because linking not done arm-elf-g++: --gc-sections: linker input file unused because linking not do= ne arm-elf-g++: L2capDataClient.o: linker input file unused because linking no= t don e .........(for all files) Does this mean that there are no errors after compilation of preprocessors? i have compiled the code with g++ -g (as our usual compilation) arm-elf-g++ -c -o L2capDataClientMain.o -I/opt/ecos/work/ram_debug/ram_debu= g_ins tall/include -I. -I/opt/ecos/gnutools/arm-elf/arm-elf/include -I. -I/opt/ec= os/gn utools/arm-elf/arm-elf/include/arm-elf -fno-exceptions -Wall -Wno-deprecate= d -Wi mplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wparentheses -Wpointer-a= rith -Wmissing-prototypes -mstructure-size-boundary=3D8 -mcpu=3Darm7tdmi -mno-sh= ort-load- words -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -ffunction-= secti ons -fdata-sections -fno-rtti -finit-priority -O1 -g -I. -I../../../System= /Audi o -I../../../System/Api -I../../../System/Common -I../../../System/Profiles= -I.. /../../System/SoftTools -I../../../System/Stack -I../../../System/Transport= -I.. /../../System/Portability L2capDataClientMain.cpp L2capDataClientMain.cpp: In function `int main(int, char**)': L2capDataClientMain.cpp:56: parse error before `.' token L2capDataClientMain.cpp:56: warning: unused variable `cyg_i2c_device cyg_i2c_eeprom' L2capDataClientMain.cpp: At global scope: L2capDataClientMain.cpp:113: conflicting types for ` cyg_i2c_bus&hal_alaia_i2c_bus' L2capDataClientMain.cpp:45: previous declaration as `cyg_i2c_bus hal_alaia_i2c_bus' L2capDataClientMain.cpp:113: parse error before `.' token L2capDataClientMain.cpp:113: ISO C++ forbids use of initializer list to initialize reference `hal_alaia_i2c_bus' L2capDataClientMain.cpp:74: warning: `cyg_bool hal_alaia_i2c_bitbang(cyg_i2c_bus*, cyg_i2c_bitbang_op)' defined but not used make: *** [L2capDataClientMain.o] Error 1 I am not sure of what this error is referring to=20 L2capDataClientMain.cpp:113: ISO C++ forbids use of initializer list to initialize reference `hal_alaia_i2c_bus' the code at this line is CYG_I2C_BITBANG_BUS( &hal_alaia_i2c_bus, &hal_alaia_i2c_bitbang); Thank you Clifford ----- Original Message ----- From: Bart Veer [mailto:bartv@ecoscentric.com] Sent: 6/25/2005 11:10:35 PM To: clifford.joseph@clarinox.com Cc: ecos-discuss@ecos.sourceware.org Subject: Re: [ECOS] i2c bit-banging implementation > >>>>> " " =3D=3D writes: >=20 > > I am trying to implement an i2c transfer by bit-banging > >=20 > > It still returns the same error when I compile > > The error is > > parse error before ?.? token >=20 > >=20 > > Looking at the varios instances where the CYG_HAL_TABLE_ENTRY > > has been used in the other files it has been implemented in > > this way. Example: >=20 > > cyg_httpd_table_entry __name CYG_HAL_TABLE_ENTRY( httpd_table ) = =3D > > { __pattern, __handler, __arg } >=20 > > where __pattern, __handler, __arg are the arguments passed on to t= he httpd_table >=20 > > Can somebody help me regarding this >=20 > > Has anybody been successful in implementing a bit-banging using th= e i2c package >=20 > > Any idea why there is an error ? >=20 > > parse error before ?.? Token >=20 > Yes, there have been successful implementations of the bit-bang code. > In fact the first ever I2C driver used bit-banging. >=20 > There is no significant difference between the cyg_httpd_table_entry > macro and the I2C bus one. The latter uses a gcc extension called > Designated Initializers, > http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Designated-Inits.html#Designa= ted%20Inits > The aim is to allow the cyg_i2c_bus structure to be changed in future, > including adding new fields at the start or in the middle of the > structure, without invalidating existing instances of the > CYG_I2C_BUS() macro. >=20 > Unfortunately it is not possible to tell from the error message > exactly what the problem is. To confuse things further I suspect the > original email has been garbled somewhere along the way. >=20 > I suggest you try compiling the source code in two steps. First use > gcc -E to just run the preprocessor on the file. Then compile the > resulting file normally. This should give you a line number for the > parse error, and a matching source file without the potentially > confusing macros. >=20 > Bart >=20 > --=20 > Bart Veer eCos Configuration Architect > http://www.ecoscentric.com/ The eCos and RedBoot experts >=20 >=20 > --=20 > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss >=20 >=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss