Skip to main content
replaced http://electronics.stackexchange.com/ with https://electronics.stackexchange.com/
Source Link

I saw a questiona question about a similar problem here, but as you see, the OP admits that he has no idea why it started working for him.

I saw a question about a similar problem here, but as you see, the OP admits that he has no idea why it started working for him.

I saw a question about a similar problem here, but as you see, the OP admits that he has no idea why it started working for him.

was able to solve one small error by myself, changed output to what I got after I removed it
Source Link
rumtscho@simak:~/Projects/had_launchpad-blink-master$ make
msp430-gcc -Os -Wall -g -mmcu=msp430x2012 -c main.c
In file included from main.c:32:0:
/usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal.h:43:2:

warningrumtscho@simak: #warning~/Projects/had_launchpad-blink-master$ make msp430-libc <signal.h> deprecated, usinggcc <legacymsp430.h> [-Wcpp] In file included fromOs /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/legacymsp430.h:34:0, from-Wall /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal-g -mmcu=msp430g2553 -c main.h:45, fromc In file included from main.c:32:0: /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/msp430signal.h:81343:2: warning: #warning Unable to identify and include MCU headermsp430-libc <signal.h> deprecated, useusing -mmcu=MCU<legacymsp430.h> [-Wcpp] main main.c: In function ‘initLEDs’‘main’: main main.c:4365:311: error error: ‘P1DIR’‘TASSEL__ACLK’ undeclared (first use in this function) main.c:4365:311: note: each undeclared identifier is reported only once for for each function it appears in main.c:43:14: error: ‘BIT0’ undeclared (first use in this function) main.c:43:21: error: ‘BIT6’ undeclared (first use in this function) main.c:44:3: error: ‘P1OUT’ undeclared (first use in this function) main.c: In function ‘main’: main.c:50:3: error: ‘WDTCTL’ undeclared (first use in this function) main.c:50:12: error: ‘WDTPW’ undeclared (first use in this function) main.c:50:20: error: ‘WDTHOLD’ undeclared (first use in this function) main.c:63:3: error: ‘BCSCTL3’ undeclared (first use in this function) main.c:63:14: error: ‘LFXT1S_2’ undeclared (first use in this function) main.c:65:3: error: ‘TACTL’ undeclared (first use in this function) main.c:65:11: error: ‘TASSEL__ACLK’ undeclared (first use in this function) mainmain.c:65:26: error: ‘MC__UP’ undeclared (first use in this function) main.c:66:3: error: ‘TACCTL0’ undeclared (first use in this function) main.c:66:13: error: ‘CCIE’ undeclared (first use in this function) main.c:67:3: error: ‘TACCR0’ undeclared (first use in this function) main.c:72:3: error: ‘GIE’ undeclaredundeclared (first use in this function) main main.c: In function ‘TIMERA0_ISR’: main‘TIMERA0_ISR’: main.c:79:27: error: interrupt vector offset ‘TIMERA0_VECTOR’ ‘TIMERA0_VECTOR’ is not an integer constant main.c:80:3: error: ‘P1OUT’ undeclared (first use in this function) main.c:80:15: error: ‘BIT0’ undeclared (first use in this function) main.c:80:22: error: ‘BIT6’ undeclared (first use in this function) make make: *** [main.o] Error 1

If I understand it correctly, the included library is deprecated, but I have no idea how to find which isand so the correct library to include insteadvariables it should contain are not found and the compiler thinks they are undeclared. But I also don't know what a MCU is, so don't know if the warning about the -mmcu flagthis is importantthe correct interpretation, and how to correctfind the problemcorrect library to use.

rumtscho@simak:~/Projects/had_launchpad-blink-master$ make
msp430-gcc -Os -Wall -g -mmcu=msp430x2012 -c main.c
In file included from main.c:32:0:
/usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal.h:43:2:

warning: #warning msp430-libc <signal.h> deprecated, using <legacymsp430.h> [-Wcpp] In file included from /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/legacymsp430.h:34:0, from /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal.h:45, from main.c:32: /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/msp430.h:813:2: warning: #warning Unable to identify and include MCU header, use -mmcu=MCU [-Wcpp] main.c: In function ‘initLEDs’: main.c:43:3: error: ‘P1DIR’ undeclared (first use in this function) main.c:43:3: note: each undeclared identifier is reported only once for each function it appears in main.c:43:14: error: ‘BIT0’ undeclared (first use in this function) main.c:43:21: error: ‘BIT6’ undeclared (first use in this function) main.c:44:3: error: ‘P1OUT’ undeclared (first use in this function) main.c: In function ‘main’: main.c:50:3: error: ‘WDTCTL’ undeclared (first use in this function) main.c:50:12: error: ‘WDTPW’ undeclared (first use in this function) main.c:50:20: error: ‘WDTHOLD’ undeclared (first use in this function) main.c:63:3: error: ‘BCSCTL3’ undeclared (first use in this function) main.c:63:14: error: ‘LFXT1S_2’ undeclared (first use in this function) main.c:65:3: error: ‘TACTL’ undeclared (first use in this function) main.c:65:11: error: ‘TASSEL__ACLK’ undeclared (first use in this function) main.c:65:26: error: ‘MC__UP’ undeclared (first use in this function) main.c:66:3: error: ‘TACCTL0’ undeclared (first use in this function) main.c:66:13: error: ‘CCIE’ undeclared (first use in this function) main.c:67:3: error: ‘TACCR0’ undeclared (first use in this function) main.c:72:3: error: ‘GIE’ undeclared (first use in this function) main.c: In function ‘TIMERA0_ISR’: main.c:79:27: error: interrupt vector offset ‘TIMERA0_VECTOR’ is not an integer constant main.c:80:3: error: ‘P1OUT’ undeclared (first use in this function) main.c:80:15: error: ‘BIT0’ undeclared (first use in this function) main.c:80:22: error: ‘BIT6’ undeclared (first use in this function) make: *** [main.o] Error 1

If I understand it correctly, the included library is deprecated, but I have no idea how to find which is the correct library to include instead. I also don't know what a MCU is, so don't know if the warning about the -mmcu flag is important, and how to correct the problem.

rumtscho@simak:~/Projects/had_launchpad-blink-master$ make msp430-gcc -Os -Wall -g -mmcu=msp430g2553 -c main.c In file included from main.c:32:0: /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal.h:43:2: warning: #warning msp430-libc <signal.h> deprecated, using <legacymsp430.h> [-Wcpp] main.c: In function ‘main’: main.c:65:11: error: ‘TASSEL__ACLK’ undeclared (first use in this function) main.c:65:11: note: each undeclared identifier is reported only once for each function it appears in main.c:65:26: error: ‘MC__UP’ undeclared (first use in this function) main.c: In function ‘TIMERA0_ISR’: main.c:79:27: error: interrupt vector offset ‘TIMERA0_VECTOR’ is not an integer constant make: *** [main.o] Error 1

If I understand it correctly, the included library is deprecated, and so the variables it should contain are not found and the compiler thinks they are undeclared. But I don't know if this is the correct interpretation, and how to find the correct library to use.

Source Link

How to troubleshoot a TI launchpad not running under Linux?

I have no experience with microcontrollers, except for a project a friend started with me and then abandoned midway. I still have the hardware and the code, want to complete the project, but I have forgotten most of the things we did two years ago, and I have reinstalled my OS, so I no longer have my dev environment set up. I also don't know C, but I can program in other languages.

My code does not do anything when I try to run it. To check if the microcontroller is communicating with the computer properly, I looked around for tutorials. This is what I found:

  1. I should start mspdebug. I don't even know what I should expect to happen, but what I get is an error.
rumtscho@simak:~/Projects/sovfor$ sudo mspdebug -d /dev/ttyACM0 uif
[sudo] password for rumtscho: 
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer <[email protected]>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open UIF on /dev/ttyACM0...
Initializing FET...
uif: read error: Connection timed out
fet: open failed
Trying again...
Initializing FET...
uif: read error: Connection timed out
fet: open failed

I saw a question about a similar problem here, but as you see, the OP admits that he has no idea why it started working for him.

  1. I should run a minimal program. I got to the make step, included <msp430.h> instead of <io.h> because the compiler suggested it. Then I got another error:
rumtscho@simak:~/Projects/had_launchpad-blink-master$ make
msp430-gcc -Os -Wall -g -mmcu=msp430x2012 -c main.c
In file included from main.c:32:0:
/usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal.h:43:2:

warning: #warning msp430-libc <signal.h> deprecated, using <legacymsp430.h> [-Wcpp] In file included from /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/legacymsp430.h:34:0, from /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/signal.h:45, from main.c:32: /usr/lib/gcc/msp430/4.6.3/../../../../msp430/include/msp430.h:813:2: warning: #warning Unable to identify and include MCU header, use -mmcu=MCU [-Wcpp] main.c: In function ‘initLEDs’: main.c:43:3: error: ‘P1DIR’ undeclared (first use in this function) main.c:43:3: note: each undeclared identifier is reported only once for each function it appears in main.c:43:14: error: ‘BIT0’ undeclared (first use in this function) main.c:43:21: error: ‘BIT6’ undeclared (first use in this function) main.c:44:3: error: ‘P1OUT’ undeclared (first use in this function) main.c: In function ‘main’: main.c:50:3: error: ‘WDTCTL’ undeclared (first use in this function) main.c:50:12: error: ‘WDTPW’ undeclared (first use in this function) main.c:50:20: error: ‘WDTHOLD’ undeclared (first use in this function) main.c:63:3: error: ‘BCSCTL3’ undeclared (first use in this function) main.c:63:14: error: ‘LFXT1S_2’ undeclared (first use in this function) main.c:65:3: error: ‘TACTL’ undeclared (first use in this function) main.c:65:11: error: ‘TASSEL__ACLK’ undeclared (first use in this function) main.c:65:26: error: ‘MC__UP’ undeclared (first use in this function) main.c:66:3: error: ‘TACCTL0’ undeclared (first use in this function) main.c:66:13: error: ‘CCIE’ undeclared (first use in this function) main.c:67:3: error: ‘TACCR0’ undeclared (first use in this function) main.c:72:3: error: ‘GIE’ undeclared (first use in this function) main.c: In function ‘TIMERA0_ISR’: main.c:79:27: error: interrupt vector offset ‘TIMERA0_VECTOR’ is not an integer constant main.c:80:3: error: ‘P1OUT’ undeclared (first use in this function) main.c:80:15: error: ‘BIT0’ undeclared (first use in this function) main.c:80:22: error: ‘BIT6’ undeclared (first use in this function) make: *** [main.o] Error 1

If I understand it correctly, the included library is deprecated, but I have no idea how to find which is the correct library to include instead. I also don't know what a MCU is, so don't know if the warning about the -mmcu flag is important, and how to correct the problem.

As you can see, I'm quite over my head here. Can you suggest what next steps I could try? How do I start talking to the controller?

I am developing on Debian Wheezy, and installed all the packages suggested in various tutorials (everything with msp430 in the name, and a few others). I took the versions available in the Debian repository, did not compile from source.