Hello!
I just discovered that CCS is now available on MacOS-X and I wanted to have a test
run. I did a minimal program using a brand new launchpad (5529) that I just bought.
CCS has updated the FET firmware, everyhing is fine in C, I can blink the red LED
on P1 bit 0.
Now I wanted to do the same thing in C++. I made a LED class which does basically
nothing. The Init function is P1DIR = 0x01; P1OUT = 0;
The Set function is P1OUT = 0x01, the Reset function is P1OUT = 0;
It compiles fine. When I start it, it steps over the first line. However, stepping
over MyRedLed.Init() causes the program getting lost. If I pause the debugger, the
program is in an abort function in exit.c.
Anybody knows how to use C++ in CCS on mac?
NB: I can use it on PC after enabling C++ in the preferences. On Mac, if I open the
project properties -> Build -> MSP430 compiler -> Advanced options -> Language options,
I have chosen C++ dialect as C++03 mode (whatever it is), but the other option doesn't
work either.
By the way, is C++ supported in this beta? (I should have asked that first...)
Thanks,
Pascal
#include <msp430.h>
#include "Led.h"
/*
* main.c
*/
Led MyRedLed;
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
MyRedLed.Init();
MyRedLed.Set();
return 0;
}