[Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Arturo Gurrola

 Hello everyone,

I'm installing MSPGCC4 through Cygwin on windows (command: perl 
buildgcc.pl).


BinUtils, GCC and Libc have installed correctly so far.

But then when it comes to GDB (command in the script: bash do-gdb.sh 
/cygdrive/c/mspgcc4/ 7.1 http://ftp.uni-kl.de; build gdb), and 
after Unpacking gdb... and a bunch of patching file ..., I get 
try184.c:1:20: error: curses.h: No such file or directory and then 
Note that you must have libcurses developer headers installed. Abort..
Now, I do have the package Libs (and a bunch of others) which contains 
some libncurses... files in my Cygwin installation. And I do have the 
file curses.h somewhere in my mspgcc4 directory.
Should I install a specific package for Cygwin? Or should I copy 
curses.h to a specific directory?


Thanks in advance.



Re: [Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Peter Bigot
Not a cygwin user, so I'm reaching here, but there may be a package
libcurses-devel (or libncurses-devel) that you need in order to get the
headers.  This is generally the fix for this problem when it arises under
Linux.

Unless you're sure the curses.h you found matches the libncurses library, I
do not recommend copying it into the gdb source area.  You'll probably just
find that there's another header that's missing too.

Peter

On Thu, Sep 2, 2010 at 12:52 PM, Arturo Gurrola
mgurr...@gdl.cinvestav.mxwrote:

  Hello everyone,

 I'm installing MSPGCC4 through Cygwin on windows (command: perl
 buildgcc.pl).

 BinUtils, GCC and Libc have installed correctly so far.

 But then when it comes to GDB (command in the script: bash do-gdb.sh
 /cygdrive/c/mspgcc4/ 7.1 http://ftp.uni-kl.de; build gdb), and
 after Unpacking gdb... and a bunch of patching file ..., I get
 try184.c:1:20: error: curses.h: No such file or directory and then
 Note that you must have libcurses developer headers installed. Abort..
 Now, I do have the package Libs (and a bunch of others) which contains
 some libncurses... files in my Cygwin installation. And I do have the
 file curses.h somewhere in my mspgcc4 directory.
 Should I install a specific package for Cygwin? Or should I copy
 curses.h to a specific directory?

 Thanks in advance.


 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Mspgcc-users mailing list
 Mspgcc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mspgcc-users



[Mspgcc-users] Multiplication using Horner's method

2010-09-02 Thread Andres Vahter
Hi,

I would like to use Horner's method for fast multiplication on MSP430f2234.
I found source files from: 
http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa329

multiply_int.c:
/**
*   MSP430FG439 Horner's method to perform efficient multiplication
*
*   Description: This code performs a integer-integert multplication of numbers 
*41 and 441 to give the result 18081. The main C file calls
*four multiplication functions. The first is a IAR CLIB function
*followed by a conventional multiply algorithm, Horner's method 
*and Horner's method with CSD format. 
*
*   Note:This code assumes 32.768kHz XTAL on LFXT1 on the MSP430FG439 
*
* MSP430FG439
*   -
*  |  XIN|-  
*  | | 32.768kHz
*  | XOUT|-
*  | |
*
*
*   K. Venkat
*   Texas Instruments Inc.
*   July 2006
*   Built with IAR Embedded Workbench Version: 3.41A
/
#include  stdio.h
#include  msp430xG43x.h
int mul_c_int(int,int);
int mul_hamacher(register int, register int); 
int mul_horner_int(register int);
int mul_csd_int(register int);
int input=41,mult=441;
int result1, result2,result3,result4;
main()
{

WDTCTL = WDTPW + WDTHOLD; //Stop WDT.
FLL_CTL0 |= XCAP18PF; //Configure load caps.

result1=mul_c_int(input,mult);//C routine called for multiplication.

result2=mul_hamacher(input,mult); //MSP430 Assembly routine for 
algorithm. 
  //explained for multiplication in 
Hamacher etal. 
result3=mul_horner_int(input);//MSP430 Assembly routine with 
Horner's
  //method for multiplication.
result4=mul_csd_int(input);   //MSP430 Assembly routine with 
Horner's
  //method using CSD format for 
multiplication.

printf(%d\n%d\n%d\n%d\n,result1,result2,result3,result4);
}

int mul_c_int(int x, int y)   //C routine for multiplication
{
  return(x*y);
}



horner_mul_int.s43

;**
;   MSP430FG439 Integer-Integer multiplication using Horner's Algorithm 
;
;   Description: This code performs a 16-bit integer-integer multplication 
; of numbers to return an 16-bit integer
; 
;
;   Note:This code assumes 32.768kHz XTAL on LFXT1 on the MSP430FG439 
; MSP430FG439
;   -
;  |  XIN|-  
;  | | 32.768kHz
;  | XOUT|-
;  | |
;
;
;   K. Venkat
;   Texas Instruments Inc.
;   July 2006
;   Built with IAR Embedded Workbench Version: 3.41A
;***/
public mul_horner_int

RSEG CODE

mul_horner_int

mov.w R12,R13   ; The operand input in register 
R12 
rla.w R13 
add.w R12,R13   ; X1=X*2^1+X
rla.w R13
rla.w R13
add.w R12,R13   ; X2=X1*2^2+X
rla.w R13
add.w R12,R13   ; X3=X2*2^1+X
rla.w R13
add.w R12,R13   ; X4=X4*2^1+X
rla.w R13
rla.w R13
rla.w R13
add.w R12,R13   ; Final Result=X5=X4*2^3+X 
mov.w R13,R12   ; The final answer returned to the 
; calling function
ret
END



My question is what exactly asm mul_horner_int does? Why it has only one 
argument - comment states that it is integer integer multiplication that 
multiplies two numbers?

Re: [Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Mark J. Blair

On Sep 2, 2010, at 10:52 AM, Arturo Gurrola wrote:
 try184.c:1:20: error: curses.h: No such file or directory and then 
 Note that you must have libcurses developer headers installed. Abort..


I'm also installing MSPGCC4 under Cygwin right now, and I ran into the same 
problem. I have libncurses-devel installed, which provides ncurses/curses.h, 
but MSPGCC4's do-gdb.sh script looks for curses.h and doesn't find it. Since 
the compilation runs so terribly slowly for me (I'm running WinXP in a virtual 
machine on my Mac, and the compilation is easily an order of magnitude slower 
than it was when doing it natively under OSX), and buildgcc.pl does a 
brute-force compilation which will rebuild gcc before it even gets around to 
choking on gdb... I decided to try skipping do-gdb.sh and instead compile gdb 
manually.

What I've done so far is:

  cd build/gdb-7.1
  ./configure --prefix=/opt/msp430-gcc-4.4.4 --target=msp430 --disable-werror
  make

It failed to find libz and choked on the compilation, so I'm not there just yet.

I plan to use the compiler under OSX, but I'm still trying to build it under 
WinXP so that I can try to use gdb + gdbproxy to download code with my eZ430 
dongle or MSP-FET430UIF, which aren't supported under OSX yet.

I wouldn't mind using IAR or CCC to download code built by msp430-gcc, but it 
seems that they want the code in a .d43 format which I don't know how to create 
with msp430-gcc.

-- 
Mark J. Blair, NF6X n...@nf6x.net
Web page: http://www.nf6x.net/
GnuPG public key available from my web page.







Re: [Mspgcc-users] Multiplication using Horner's method

2010-09-02 Thread Baruch Siach
Hi Andres,

On Thu, Sep 02, 2010 at 09:35:22PM +0200, Andres Vahter wrote:
 horner_mul_int.s43
 
 ;**
 ;   MSP430FG439 Integer-Integer multiplication using Horner's Algorithm 
 ;
 ;   Description: This code performs a 16-bit integer-integer multplication 
 ; of numbers to return an 16-bit integer
 ; 
 ;
 ;   Note:This code assumes 32.768kHz XTAL on LFXT1 on the MSP430FG439 
 ; MSP430FG439
 ;   -
 ;  |  XIN|-  
 ;  | | 32.768kHz
 ;  | XOUT|-
 ;  | |
 ;
 ;
 ;   K. Venkat
 ;   Texas Instruments Inc.
 ;   July 2006
 ;   Built with IAR Embedded Workbench Version: 3.41A
 ;***/
 public mul_horner_int
   
 RSEG CODE
 
 mul_horner_int
 
 mov.w R12,R13   ; The operand input in register 
 R12 
 rla.w R13 
 add.w R12,R13   ; X1=X*2^1+X
 rla.w R13
 rla.w R13
 add.w R12,R13   ; X2=X1*2^2+X
 rla.w R13
 add.w R12,R13   ; X3=X2*2^1+X
 rla.w R13
 add.w R12,R13   ; X4=X4*2^1+X
 rla.w R13
 rla.w R13
 rla.w R13
 add.w R12,R13   ; Final Result=X5=X4*2^3+X 
 mov.w R13,R12   ; The final answer returned to 
 the 
 ; calling function
 ret
 END

The binary representation of the number 441 is embedded in the code from left 
to right.

441 = 110111001b

Something like the following pseudo-code:

for each binary digit d do:
if d == 1
mov.w R12,R13
rla.w R13
else
rla.w R13
end

baruch


-- 
 ~. .~   Tk Open Systems
=}ooO--U--Ooo{=
   - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



Re: [Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Peter Bigot
Go to http://www.elprotronic.com and download FET-Pro430.  The Lite (free)
version has done everything I needed.

Use msp430-objcopy to convert the elf output from mspgcc to Intel hex and
program with FET-Pro430.  You may need to name the file something.hex to get
FET-Pro430 to recognize it.

Best solution I found prior to mspdebug working under Linux.

Peter

On Thu, Sep 2, 2010 at 1:38 PM, Mark J. Blair n...@nf6x.net wrote:


 On Sep 2, 2010, at 10:52 AM, Arturo Gurrola wrote:
  try184.c:1:20: error: curses.h: No such file or directory and then
  Note that you must have libcurses developer headers installed. Abort..


 I'm also installing MSPGCC4 under Cygwin right now, and I ran into the same
 problem. I have libncurses-devel installed, which provides
 ncurses/curses.h, but MSPGCC4's do-gdb.sh script looks for curses.h and
 doesn't find it. Since the compilation runs so terribly slowly for me (I'm
 running WinXP in a virtual machine on my Mac, and the compilation is easily
 an order of magnitude slower than it was when doing it natively under OSX),
 and buildgcc.pl does a brute-force compilation which will rebuild gcc
 before it even gets around to choking on gdb... I decided to try skipping
 do-gdb.sh and instead compile gdb manually.

 What I've done so far is:

  cd build/gdb-7.1
  ./configure --prefix=/opt/msp430-gcc-4.4.4 --target=msp430
 --disable-werror
  make

 It failed to find libz and choked on the compilation, so I'm not there just
 yet.

 I plan to use the compiler under OSX, but I'm still trying to build it
 under WinXP so that I can try to use gdb + gdbproxy to download code with my
 eZ430 dongle or MSP-FET430UIF, which aren't supported under OSX yet.

 I wouldn't mind using IAR or CCC to download code built by msp430-gcc, but
 it seems that they want the code in a .d43 format which I don't know how to
 create with msp430-gcc.

 --
 Mark J. Blair, NF6X n...@nf6x.net
 Web page: http://www.nf6x.net/
 GnuPG public key available from my web page.






 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Mspgcc-users mailing list
 Mspgcc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mspgcc-users



Re: [Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Peter Bigot
Don't have Mac OS X, but mspdebug allows me to use the FETUIF-430 under
Fedora 13 on Linux.  Infinitely nicer than an ssh terminal under Windows and
a shared disk drive.  See mspdebug.sourceforge.net.

http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Mac_OS_X#Installing_mspdebug_under_Mac_OS_X

On Thu, Sep 2, 2010 at 2:02 PM, Mark J. Blair n...@nf6x.net wrote:


 On Sep 2, 2010, at 11:57 AM, Peter Bigot wrote:
  Go to http://www.elprotronic.com and download FET-Pro430.  The Lite
 (free)
  version has done everything I needed.

 Thanks for the suggestion! I'll give that a try.

 I hope that someday I'll be able to use the TI USB programmers under Mac OS
 X, without needing to pop up WinXP on a virtual machine. Has anybody looked
 into reverse-engineering the USB protocols for those programmers so that a
 fully open-source implementation that supports them can be created?

 --
 Mark J. Blair, NF6X n...@nf6x.net
 Web page: http://www.nf6x.net/
 GnuPG public key available from my web page.






 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Mspgcc-users mailing list
 Mspgcc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mspgcc-users



Re: [Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Baruch Siach
Hi Mark,

On Thu, Sep 02, 2010 at 12:02:48PM -0700, Mark J. Blair wrote:
 On Sep 2, 2010, at 11:57 AM, Peter Bigot wrote:
  Go to http://www.elprotronic.com and download FET-Pro430.  The Lite (free)
  version has done everything I needed.
 
 Thanks for the suggestion! I'll give that a try.
 
 I hope that someday I'll be able to use the TI USB programmers under Mac OS 
 X, without needing to pop up WinXP on a virtual machine. Has anybody looked 
 into reverse-engineering the USB protocols for those programmers so that a 
 fully open-source implementation that supports them can be created?

A fully open-source implementation exists, it's called mspdebug  
(http://mspdebug.sourceforge.net/). And the protocol is not a USB one, it's a 
serial protocol over a USB-to-serial chip (the TI3410). So, all you need is a 
driver for the TI3410 for your OS, and you're done.

baruch


-- 
 ~. .~   Tk Open Systems
=}ooO--U--Ooo{=
   - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



Re: [Mspgcc-users] problem while installing GDB of MSPGCC4

2010-09-02 Thread Mark J. Blair
I'll look at mspdebug today. I was under the impression that the USB-based TI 
programmers (including the eZ430 dongles) were only supported under Windows 
(using TI DLLs) and Linux (using pre-compiled libraries based on proprietary TI 
code).

-- 
Mark J. Blair, NF6X n...@nf6x.net
Web page: http://www.nf6x.net/
GnuPG public key available from my web page.