Hello Chris ans Steve,

I want to do some stack pointer manipulation at the start of each interrupt
vector code. I am not sure whether inline assembly will allow me to do this.
So I want to start interrupt execution in assembly code and then the control
will jump to 'C' part of code. I think inline assembly doesn't allow to use
r0 to r3 registers in the code for manipulation. Please clarify on the same.

Amol.

----- Original Message -----
From: <mspgcc-users-requ...@lists.sourceforge.net>
To: <mspgcc-users@lists.sourceforge.net>
Sent: Saturday, September 20, 2003 8:46 AM
Subject: Mspgcc-users digest, Vol 1 #452 - 14 msgs


> Send Mspgcc-users mailing list submissions to
> mspgcc-users@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> or, via email, send a message with subject or body 'help' to
> mspgcc-users-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
> mspgcc-users-ad...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mspgcc-users digest..."
>
>
> Today's Topics:
>
>    1. NMK - microkernel for msp430 devices (Pedro Zorzenon Neto)
>    2. Re: Possible MSP430 assembler bug? (Dmitry)
>    3. NMK - microkernel for msp430 devices (Pedro Zorzenon Neto)
>    4. GCC's floating point... (Oleg Skydan)
>    5. -O3 internal compiler error (Dan Miner)
>    6. RE: Possible MSP430 assembler bug? (Dan Miner)
>    7. Urgent help required on Assembly coding ! (Amol Bhopale)
>    8. Re: -O3 internal compiler error (Steve Underwood)
>    9. Re: Possible MSP430 assembler bug? (Chris Liechti)
>   10. Re: Urgent help required on Assembly coding ! (Chris Liechti)
>   11. Re: Urgent help required on Assembly coding ! (Steve Underwood)
>   12. NMK - microkernel for msp430 devices (Pedro Zorzenon Neto)
>   13. Example files (Dan Miner)
>   14. Re: -O3 internal compiler error (Dan Miner)
>
> --__--__--
>
> Message: 1
> Date: Fri, 19 Sep 2003 13:16:46 -0600
> From: Pedro Zorzenon Neto <p...@terra.com.br>
> To: mspgcc-users@lists.sourceforge.net
> Subject: [Mspgcc-users] NMK - microkernel for msp430 devices
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> (Note: I sent this message 5 hours ago. I think my ISP is buggy today.
> I am sending again from other machine. sorry if you receive this
> message twice)
>
> Hi Folks,
>
>   Hope you like NMK for MSP430 :-)
>
>   http://savannah.nongnu.org/projects/nmk/
>   http://savannah.nongnu.org/cvs/?group=nmk
>   http://savannah.nongnu.org/cgi-bin/viewcvs/nmk/nmk/
>
>   Description:
> Microkernel for small microcontrollers, with limited ROM and, mainly,
> RAM area.
> This microkernel introduces a new paradigma of microkernel programming,
> because it does not provide context saving. Each task must ends before
> a timeout. It is a kind of co-tasks. The way of programming is
> dramaticaly different from a kernel which has context saving. Context
> saving is avoided because of limited RAM space.
>
>   Mailing List:
>     http://mail.nongnu.org/mailman/listinfo/nmk-users
>
>   License:
>     GPL
>
>   Work needed:
>     translate doc/NMK-HOWTO-pt_BR.tex to english
>
>   Contact NMK Authors at:
>     nmk (AT) autsens (DOT) com
>
>   Bye,
>     Pedro
>
>
> --__--__--
>
> Message: 2
> From: Dmitry <di...@mail.ru>
> Organization: SPbPU
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] Possible MSP430 assembler bug?
> Date: Fri, 19 Sep 2003 14:40:25 +0400
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> say:
> -D_GNU_ASSEMBLER_ in a command line.
>
> ~d
>
> On Friday 19 September 2003 00:34, Dan Miner wrote:
> > Chris,
> >
> > That works for my simplified example.  Here's another
> > example if what I'm REALLY attempting to do.  This code
> > is ported from the IAR compiler.
> >
> > ;;;;;;;;;;;;;;;;;;;;;; file test.S ;;;;;;;;;;;;;;;
> > #include  <msp430x14x.h>
> > =09bic.w=09#OUTMOD2|OUTMOD1|OUTMOD0|OUT, &TBCCTL0
> > ;;;;;;;;;;;;;;;;;; end of file test.S ;;;;;;;;;;;;
> >
> > The #include generates lots of error messages because of
> > the non-assembler C code in there (as expected.)
> >
> > Are there include files for the assembler to define all
> > the MSP430 I/O registers and bit fields?  (IAR's .h files
> > can be included in an assembly file to do this.)
> >
> > Maybe I'll just port my small assembler file to C and that
> > will solve my problem.
> >
> > Thanks for all the quick responses from everyone so far.
> >
> > =09=09=09=09- Dan
> >
> > > From: Chris Liechti
> > > Sent: Thursday, September 18, 2003 2:54 PM
> > >
> > > Dan Miner wrote:
> > > > I am having trouble assembling an assembly language source file.
> > > > Here is a small sample file to demonstrate the issue:
> > > >
> > > > ;;;;;;;;;;;;;;;;;;;;;; file test.s ;;;;;;;;;;;;;;;
> > >
> > >                                     ^ small "s"!
> > >
> > >  > Command line:
> > >  > C:\Data> msp430-gcc -mmcu=3Dmsp430x149  test.s -o test.o
> > >
> > > .s -> pure asm
> > > .S -> asm with C preprocessor
> > >
> > > that means that the defines are not processed in your case...
> > > and foo1 foo2 are unknown symbols to the asssember and are assumed
> > > external. so try again with a renamed file.
> > >
> > > chris
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Mspgcc-users mailing list
> > Mspgcc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
> --=20
> /*****************************************************************
>      ("`-''-/").___..--''"`-._     (\   Dimmy the Wild     UA1ACZ
>       `6_ 6  )   `-.  (     ).`-.__.`)  State Polytechnical Univ.
>       (_Y_.)'  ._   )  `._ `. ``-..-'   Radio-Physics Departament
>     _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,  Russia
>    (il),-''  (li),'  ((!.-'             +7 (812) 5403923, 5585314
>  *****************************************************************/
>
>
>
> --__--__--
>
> Message: 3
> Date: Fri, 19 Sep 2003 10:39:28 -0300
> From: Pedro Zorzenon Neto <p...@terra.com.br>
> To: mspgcc list <mspgcc-users@lists.sourceforge.net>
> Subject: [Mspgcc-users] NMK - microkernel for msp430 devices
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Hi Folks,
>
>   Hope you like NMK for MSP430 :-)
>
>   http://savannah.nongnu.org/projects/nmk/
>   http://savannah.nongnu.org/cvs/?group=nmk
>   http://savannah.nongnu.org/cgi-bin/viewcvs/nmk/nmk/
>
>   Description:
> Microkernel for small microcontrollers, with limited ROM and, mainly,
> RAM area.
> This microkernel introduces a new paradigma of microkernel programming,
> because it does not provide context saving. Each task must ends before
> a timeout. It is a kind of co-tasks. The way of programming is
> dramaticaly different from a kernel which has context saving. Context
> saving is avoided because of limited RAM space.
>
>   Mailing List:
>     http://mail.nongnu.org/mailman/listinfo/nmk-users
>
>   License:
>     GPL
>
>   Work needed:
>     translate doc/NMK-HOWTO-pt_BR.tex to english
>
>   Contact NMK Authors at:
>     nmk (AT) autsens (DOT) com
>
>   Bye,
>     Pedro
>
>
> --__--__--
>
> Message: 4
> From: "Oleg Skydan" <ski...@mail.ints.net>
> To: "MSP430 GCC" <mspgcc-users@lists.sourceforge.net>
> Date: Fri, 19 Sep 2003 12:43:58 +0300
> Subject: [Mspgcc-users] GCC's floating point...
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Hi, All !
>
> I need to make some calculations using floating point arish in msp430
project.
> I do not care about NaNs and +-0. So could someone tell me is GCC's
floating point
> faster then TI's one described in their app note ?
>
> Thanks, Oleg.
>
>
>
> --__--__--
>
> Message: 5
> From: Dan Miner <mi...@centtech.com>
> To: "'mspgcc-users@lists.sourceforge.net'"
> <mspgcc-users@lists.sourceforge.net>
> Date: Fri, 19 Sep 2003 00:07:34 -0500
> Subject: [Mspgcc-users] -O3 internal compiler error
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> This function compiles OK with -O2 and does not with -O3.
> (I'm typically using -O2 but tried -O3 out of curiosity.)
>
> //====== Begin test.c============================
> #include <io.h>
> #include <signal.h>
>
> typedef   signed int  SI_16;
> typedef unsigned int  UI_16;
> typedef unsigned long UI_32;
>
> extern UI_16 time_high; // High word of timer
>
> critical UI_32 get_time (void)
> {
>     register UI_16 time_L;
>     register UI_16 time_H;
>
>     time_L = TBR;
>     time_H = time_high;
>
>     if (((SI_16) time_L) >= 0  &&  (TBCTL & TBIFG) != 0)
>     { time_H++;
>     }
>
>     return (((UI_32) time_H) << 16) | time_L;
> }
> //====== End test.c =============================
>
>
> Command line and results:
>
> C:\Work> msp430-gcc -mmcu=msp430x149 -O3 -c test.c
> test.c: In function `get_time':
> test.c:23: Internal compiler error in verify_local_live_at_start, at
flow.c:586
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
> Running on Windows 98SE with the mspgcc-20030506 release.
>
> - Dan Miner
>
>
> --__--__--
>
> Message: 6
> From: Dan Miner <mi...@centtech.com>
> To: "'mspgcc-users@lists.sourceforge.net'"
> <mspgcc-users@lists.sourceforge.net>
> Subject: RE: [Mspgcc-users] Possible MSP430 assembler bug?
> Date: Thu, 18 Sep 2003 19:29:19 -0500
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> > From: Chris Liechti
> > Sent: Thursday, September 18, 2003 3:59 PM
> >
> > Dan Miner wrote:
> > > ;;;;;;;;;;;;;;;;;;;;;; file test.S ;;;;;;;;;;;;;;;
> > > #include  <msp430x14x.h>
> > > bic.w #OUTMOD2|OUTMOD1|OUTMOD0|OUT, &TBCCTL0
> > > ;;;;;;;;;;;;;;;;;; end of file test.S ;;;;;;;;;;;;
> > >
> > > The #include generates lots of error messages because of
> > > the non-assembler C code in there (as expected.)
> > >
> > > Are there include files for the assembler to define all
> > > the MSP430 I/O registers and bit fields?  (IAR's .h files
> > > can be included in an assembly file to do this.)
> >
> > yes, just #include <io.h>
> >
> > the above example works for me if i include io.h instead of yours
>
> Hmmm...  That's strange.  I get the same result with <io.h>
> and <msp430x14x.h>.  When I look in io.h, I see that it only
> includes the proper msp43*.h file.  What command line did you
> use to get it to work?  This one does not work for me:
>
>    msp430-gcc -mmcu=msp430x149 test.S
>
> > > Maybe I'll just port my small assembler file to C and that
> > > will solve my problem.
> >
> > thats a good idea with gcc anyway. you can do almost everything
> > in C and there is real inline assembly for the rest :-)
>
> I am starting on this now.  Being a newbie for gcc I still have
> some learning curve to get through...  ;-)
>
> - Dan
>
>
> --__--__--
>
> Message: 7
> From: "Amol Bhopale" <amol_bhop...@pune.tcs.co.in>
> To: <mspgcc-users@lists.sourceforge.net>
> Date: Fri, 19 Sep 2003 11:11:53 +0530
> Subject: [Mspgcc-users] Urgent help required on Assembly coding !
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0022_01C37E9E.D4EF4910
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain;
> charset="iso-8859-1"
>
> Hi folks,
>
> I am currently working on a project that needs some functions and =
> interrupt handlers to be coded in assembly. I am using mspgcc and =
> Insight debugger with TI's evaluation board revision 1.1 for msp430149.
> I need help or some documentation on how to code and add assembly files =
> along with 'c' files in the project. Also my requirement is to call =
> assembly routines from 'c' functions and 'c' functions from assembly =
> routines.
> Please help me on this problem.
>
> Thanking you.
> Amol.
> ------=_NextPart_000_0022_01C37E9E.D4EF4910
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/html;
> charset="iso-8859-1"
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>Hi folks,</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>I&nbsp;am currently working on a =
> project that needs=20
> some functions and interrupt handlers to be coded in assembly. I am =
> using mspgcc=20
> and Insight debugger with TI's evaluation board revision 1.1 for=20
> msp430149.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>I need help or some documentation on =
> how to code=20
> and add assembly files along with 'c' files in the project. Also my =
> requirement=20
> is to call assembly routines from 'c' functions and 'c' functions from =
> assembly=20
> routines.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Please help me on this =
> problem.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>Thanking you.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Amol.</FONT></DIV></BODY></HTML>
>
> ------=_NextPart_000_0022_01C37E9E.D4EF4910--
>
>
>
> --__--__--
>
> Message: 8
> Date: Sat, 20 Sep 2003 05:03:53 +0800
> From: Steve Underwood <ste...@coppice.org>
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] -O3 internal compiler error
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Hi Dan,
>
> -O3 has issues. Don't use it. The GCC documentation is a bit odd, as it
> seems to indicate that anything above -O2 is treated as -O2 in recent
> versions. This is not the case -O3 is different to -O2, and is not
> better :-\
>
> Dan Miner wrote:
>
> >This function compiles OK with -O2 and does not with -O3.
> >(I'm typically using -O2 but tried -O3 out of curiosity.)
> >
> >//====== Begin test.c============================
> >#include <io.h>
> >#include <signal.h>
> >
> >typedef   signed int  SI_16;
> >typedef unsigned int  UI_16;
> >typedef unsigned long UI_32;
> >
> What's wrong with using standard C99 things, like int16_t, uint16_t, and
> uint32_t instead of creating your own non-standard names?
>
> Regards,
> Steve
>
>
>
>
> --__--__--
>
> Message: 9
> Date: Sat, 20 Sep 2003 00:30:25 +0200
> From: Chris Liechti <cliec...@gmx.net>
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] Possible MSP430 assembler bug?
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Dan Miner wrote:
> > Hmmm...  That's strange.  I get the same result with <io.h>
> > and <msp430x14x.h>.  When I look in io.h, I see that it only
> > includes the proper msp43*.h file.  What command line did you
> > use to get it to work?  This one does not work for me:
> >
> >    msp430-gcc -mmcu=msp430x149 test.S
>
> msp430-gcc -mmcu=msp430x148 -D_GNU_ASSEMBLER_   -c -o asmtest.o asmtest.S
>
> chris
>
>
>
> --__--__--
>
> Message: 10
> Date: Sat, 20 Sep 2003 00:35:28 +0200
> From: Chris Liechti <cliec...@gmx.net>
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] Urgent help required on Assembly coding !
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Amol Bhopale wrote:
>
> > Hi folks,
> >
> > I am currently working on a project that needs some functions and
> > interrupt handlers to be coded in assembly. I am using mspgcc and
> > Insight debugger with TI's evaluation board revision 1.1 for msp430149.
> > I need help or some documentation on how to code and add assembly files
> > along with 'c' files in the project. Also my requirement is to call
> > assembly routines from 'c' functions and 'c' functions from assembly
> > routines.
> > Please help me on this problem.
>
> docs are here: (ABI section)
>
> http://mspgcc.sourceforge.net/manual/book1.html
>
> example for makefile with asm
>
>
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/mspgcc/examples/gf
x_lcd/makefile?rev=HEAD&content-type=text/plain
>
> also not that im most cases you dont realy need separate asm files with
> mspgcc. you have inline assember and function attributes to do most
> tricks from a .c file.
>
> chris
>
> PS: no need to mark your mail as high prio, you dont get answers that
> way ;-)
> and HTML mail is not needed neither, text only is fine.
>
>
>
> --__--__--
>
> Message: 11
> Date: Sat, 20 Sep 2003 05:15:35 +0800
> From: Steve Underwood <ste...@coppice.org>
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] Urgent help required on Assembly coding !
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Hi Amol,
>
> My advice is don't use assembly language for any more than you have to.
> Write a C function, and embed in it just the actual assembly language
> code you really need. Then the compiler will take care of all the messy
> interfacing, and it does this efficiently. You can find examples of
> doing this in the FAQ.
>
> If you think you need assembly language just to build IRQ routines,
> think again. All my interrupt routines are in pure C. I only use
> assenbly language for accessing special things, like the BCD
> instructions. Again, the manual and FAQ contain information on this.
>
> Regards,
> Steve
>
>
> Amol Bhopale wrote:
>
> > Hi folks,
> >
> > I am currently working on a project that needs some functions and
> > interrupt handlers to be coded in assembly. I am using mspgcc and
> > Insight debugger with TI's evaluation board revision 1.1 for msp430149.
> > I need help or some documentation on how to code and add assembly
> > files along with 'c' files in the project. Also my requirement is to
> > call assembly routines from 'c' functions and 'c' functions from
> > assembly routines.
> > Please help me on this problem.
> >
> > Thanking you.
> > Amol.
>
>
>
>
>
> --__--__--
>
> Message: 12
> Date: Fri, 19 Sep 2003 10:39:28 -0300
> From: Pedro Zorzenon Neto <p...@terra.com.br>
> To: mspgcc list <mspgcc-users@lists.sourceforge.net>
> Subject: [Mspgcc-users] NMK - microkernel for msp430 devices
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Hi Folks,
>
>   Hope you like NMK for MSP430 :-)
>
>   http://savannah.nongnu.org/projects/nmk/
>   http://savannah.nongnu.org/cvs/?group=nmk
>   http://savannah.nongnu.org/cgi-bin/viewcvs/nmk/nmk/
>
>   Description:
> Microkernel for small microcontrollers, with limited ROM and, mainly,
> RAM area.
> This microkernel introduces a new paradigma of microkernel programming,
> because it does not provide context saving. Each task must ends before
> a timeout. It is a kind of co-tasks. The way of programming is
> dramaticaly different from a kernel which has context saving. Context
> saving is avoided because of limited RAM space.
>
>   Mailing List:
>     http://mail.nongnu.org/mailman/listinfo/nmk-users
>
>   License:
>     GPL
>
>   Work needed:
>     translate doc/NMK-HOWTO-pt_BR.tex to english
>
>   Contact NMK Authors at:
>     nmk (AT) autsens (DOT) com
>
>   Bye,
>     Pedro
>
>
> --__--__--
>
> Message: 13
> From: Dan Miner <mi...@centtech.com>
> To: "'mspgcc-users@lists.sourceforge.net'"
> <mspgcc-users@lists.sourceforge.net>
> Date: Fri, 19 Sep 2003 09:40:18 -0500
> Subject: [Mspgcc-users] Example files
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> I just discovered the example files on the download page.
> That will help me figure out a lot of my other questions.
>
> By the way - I sent 2 more messages to this list yesterday
> and they still have not appeared.  Is this list working
> corrrectly?
>
> - Dan Miner
>
>
> --__--__--
>
> Message: 14
> From: Dan Miner <mi...@centtech.com>
> To: "'mspgcc-users@lists.sourceforge.net'"
> <mspgcc-users@lists.sourceforge.net>
> Subject: Re: [Mspgcc-users] -O3 internal compiler error
> Date: Fri, 19 Sep 2003 20:05:15 -0500
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> > From: Steve Underwood
> > Sent: Friday, September 19, 2003 4:04 PM
> >
> > What's wrong with using standard C99 things, like int16_t,
> > uint16_t, and uint32_t instead of creating your own
> > non-standard names?
>
> The only problem is me - I'm an old C dinosaur that is still
> learning the "new" stuff like C99.  I'll make a point to go
> read the C99 specificaiton now.  Thanks for the tip.
>
> - Dan Miner
>
>
>
> --__--__--
>
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
> End of Mspgcc-users Digest


Reply via email to