Re: Newcomer unable to compile a very simple program in ubuntu 13.04.

Peter Bigot <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <CAPOJ94OxFF7NM8+Fr7c3bFO_ngDj25WMCSOfYdLP_y08B3u8Xw@mail.gmail.com>
No.  Unless you are using a custom linker script you never need to
reference it directly.  Use -mmcu=whatever when compiling and linking: that
adds the appropriate linker paths and compiler flags.

Only if that fails do you have a problem with msp430-mcu (the package that
provides the linker scripts), which may not be installed depending on what
apt-get command you ran.

Peter

On Fri, Aug 9, 2013 at 6:42 AM, Rahimov <[email protected]> wrote:

> Hi,
> The Linker is looking for the ldscript file memory.x in your system and
> cannot find it.. try to find it manually in your mspgcc installation folder
> smth. like this folder
>
> msp430\lib\ldscripts.. there should be this ld script file.. and try
> to give the phad to your script in compiler options with option -T
>
> -T scriptfile
>        --script=scriptfile
>            Use scriptfile as the linker script.  This script replaces ld’s
>            default linker script (rather than adding to it), so commandfile
>            must specify everything necessary to describe the output file.
>            If scriptfile does not exist in the current directory, "ld"
> looks
>            for it in the directories specified by any preceding -L options.
>
> Hope it helps,
>
> Regards
>
>
>
> On Fri, Aug 9, 2013 at 1:21 PM, Sigmatec Automação e Sistemas <
> [email protected]> wrote:
>
> >
> > Hello,
> >
> > I'm just starting to explore this platform and am unable to solve a
> > configuration issue (I guess) in the first program I try, very simple,
> > below. The set I use is the MSP430 Ultra-Low-Power MCUs eZ430-F2013
> > Development Tool with ubuntu v13.04. The installed MSP430 toolchain is
> > the default one from its apt-get command.
> > include "msp430x22x4.h"
> >
> > volatile unsigned int i; // volatile to prevent optimization
> >
> > void main(void)
> > {
> > WDTCTL = WDTPW + WDTHOLD; // stop watchdog timer
> > P1DIR |= 0X01; // set P1.0 to output direction
> >
> > for(;;) {
> > P1OUT ^= 0x01; // toogle P1.0 exclusive-OR
> > i = 50000; // delay
> > do (i--);
> > while (i != 0);
> > }
> > }
> >
> > When I try to compile it under ubuntu 13.04 I receive the error message
> > below,
> >
> > sigmatech@sigmatech:~/Desktop/ESL/code/MSP430$ msp430-gcc hello_word.c
> > /usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot open linker
> > script file memory.x: No such file or directory
> > collect2: ld returned 1 exit
> > status/usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot open
> > linker script file memory.x: No such file or directory
> > collect2: ld returned 1 exit status
> >
> > Could anyone help please?
> >
> > TIA
> >
> > Sigmatech
> > PS - is there an emacs mode available?
> >
> >
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
> > It's a free troubleshooting tool designed for production.
> > Get down to code-level detail for bottlenecks, with <2% overhead.
> > Download for free and get started troubleshooting in minutes.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Mspgcc-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> >
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk

_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.