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:
- 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.
- I should run a minimal program. I got to the
make
step, included<msp430.h>
instead of because the compiler suggested it. Then I got another error:
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 deprecated, using [-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.
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.