EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Header file for M32C/M16C

Started by Habib Bouaziz-Viallet November 16, 2007
In message <47419e83$0$20130$426a34cc@news.free.fr>, Habib 
Bouaziz-Viallet <habib@mizar.systems> writes
>Le Mon, 19 Nov 2007 14:13:36 +0000, Chris Hills a &#4294967295;crit: > >> In message <xnejem5spe.fsf@delorie.com>, DJ Delorie <dj@delorie.com> >> writes >>> >>>Habib Bouaziz-Viallet <habib@mizar.systems> writes: >>>> Is the choice of the compiler is important ? >>> >>>Somewhat. N30 has a special syntax for saying "this variable lives at >>>this specific location in memory" that gcc doesn't support. GCC uses >>>linker tricks to do the equivalent, >> >> Apart from that other compilers may also use syntax that is different to >> either of those. >> >> That is why the choice of compiler needs to be known for the header >> files. If you did not know that should you be doing the project you are >> on? >Are you really understand what i'm talking about ?
Yes I understand.
> 'Cause i'm far from to >understand yours. > >Habib
I know. That is a problem for you -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Chris Hills wrote:
> Habib Bouaziz-Viallet <habib@mizar.systems> writes: >> Chris Hills a &#4294967295;crit: >>> Habib Bouaziz-Viallet <habib@mizar.systems> writes >>>> >>>> I'm seeking about header C file for M32C/M16C internal >>>> ressources (UART's, SSC, SPI, ... etc registers definition). >>>> I guess there are some common reg and bits definition over >>>> M32C/M16C family. >>> >>> For which compiler? >> >> IIs the choice of the compiler is important ? > > Yes.
Not if the header is written in standard C and leaves the weird translation and manipulation to the system sensitive .c file. -- Chuck F (cbfalconer at maineline dot net) <http://cbfalconer.home.att.net> Try the download section. -- Posted via a free Usenet account from http://www.teranews.com
CBFalconer a &#4294967295;crit :
> Chris Hills wrote: >> Habib Bouaziz-Viallet <habib@mizar.systems> writes: >>> Chris Hills a &#4294967295;crit: >>>> Habib Bouaziz-Viallet <habib@mizar.systems> writes >>>>> I'm seeking about header C file for M32C/M16C internal >>>>> ressources (UART's, SSC, SPI, ... etc registers definition). >>>>> I guess there are some common reg and bits definition over >>>>> M32C/M16C family. >>>> For which compiler? >>> IIs the choice of the compiler is important ? >> Yes. > > Not if the header is written in standard C and leaves the weird > translation and manipulation to the system sensitive .c file. >
The Perl Script (Many thanks to M. DJ Delorie) works fine ! Just make ./mkport.pl < reg_m16 and magically this script build a rm16c_port.h (and also an ASM file) !! Great Job indeed !! Habib
Le Mon, 19 Nov 2007 16:13:52 +0000, Chris Hills a &eacute;crit:

> In message <47419e83$0$20130$426a34cc@news.free.fr>, Habib > Bouaziz-Viallet <habib@mizar.systems> writes >>Le Mon, 19 Nov 2007 14:13:36 +0000, Chris Hills a &eacute;crit: >> >>> In message <xnejem5spe.fsf@delorie.com>, DJ Delorie <dj@delorie.com> >>> writes >>>> >>>>Habib Bouaziz-Viallet <habib@mizar.systems> writes: >>>>> Is the choice of the compiler is important ? >>>> >>>>Somewhat. N30 has a special syntax for saying "this variable lives at >>>>this specific location in memory" that gcc doesn't support. GCC uses >>>>linker tricks to do the equivalent, >>> >>> Apart from that other compilers may also use syntax that is different to >>> either of those. >>> >>> That is why the choice of compiler needs to be known for the header >>> files. If you did not know that should you be doing the project you are >>> on? >>Are you really understand what i'm talking about ? > > Yes I understand.
Do you ? To say at least, your posts prove me otherwise.
> >> 'Cause i'm far from to >>understand yours. >> >>Habib > > I know. That is a problem for you >
My apologies M. Hills, i do not need to understand you because there's nothing to understand. Habib.
In message <47421A32.F91B9D02@yahoo.com>, CBFalconer 
<cbfalconer@yahoo.com> writes
>Chris Hills wrote: >> Habib Bouaziz-Viallet <habib@mizar.systems> writes: >>> Chris Hills a &#4294967295;crit: >>>> Habib Bouaziz-Viallet <habib@mizar.systems> writes >>>>> >>>>> I'm seeking about header C file for M32C/M16C internal >>>>> ressources (UART's, SSC, SPI, ... etc registers definition). >>>>> I guess there are some common reg and bits definition over >>>>> M32C/M16C family. >>>> >>>> For which compiler? >>> >>> IIs the choice of the compiler is important ? >> >> Yes. > >Not if the header is written in standard C and leaves the weird >translation and manipulation to the system sensitive .c file.
No such thing as "standard C" when referring to header files for hardware registers. Most compiler vendors have different ways of doing them -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
In message <4742cde8$0$30493$426a74cc@news.free.fr>, Habib 
Bouaziz-Viallet <habib@aldebaran.systems> writes
>Le Mon, 19 Nov 2007 16:13:52 +0000, Chris Hills a &#4294967295;crit: > >> In message <47419e83$0$20130$426a34cc@news.free.fr>, Habib >> Bouaziz-Viallet <habib@mizar.systems> writes >>>Le Mon, 19 Nov 2007 14:13:36 +0000, Chris Hills a &#4294967295;crit: >>> >>>> In message <xnejem5spe.fsf@delorie.com>, DJ Delorie <dj@delorie.com> >>>> writes >>>>> >>>>>Habib Bouaziz-Viallet <habib@mizar.systems> writes: >>>>>> Is the choice of the compiler is important ? >>>>> >>>>>Somewhat. N30 has a special syntax for saying "this variable lives at >>>>>this specific location in memory" that gcc doesn't support. GCC uses >>>>>linker tricks to do the equivalent, >>>> >>>> Apart from that other compilers may also use syntax that is different to >>>> either of those. >>>> >>>> That is why the choice of compiler needs to be known for the header >>>> files. If you did not know that should you be doing the project you are >>>> on? >>>Are you really understand what i'm talking about ? >> >> Yes I understand. >Do you ? To say at least, your posts prove me otherwise. >> >>> 'Cause i'm far from to >>>understand yours. >>> >>>Habib >> >> I know. That is a problem for you >> >My apologies M. Hills, i do not need to understand you because there's >nothing to understand. > >Habib.
There is not standard C for accessing hardware registers. You have already been told that two compilers do it differently . I know that most of the compiler vendors do their header files to access hardware differently. I know I have to support 6 different compiler makes. -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Memfault Beyond the Launch