Closed rei-vilo closed 7 years ago
Can you please provide an example Sketch that shows the error?
uint8_t * pointer;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
uint8_t * table = new uint8_t[16];
pointer = (uint8_t *) table;
pointer [1] = 1;
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print(pointer[1], DEC);
while (1);
}
Compiles and run on TM4C but fails on MSP430F5529.
mspgcc does not have full support for C++. For example, there is no libstdc++. The new compiler soon to be featured in Energia will have more extensive support for C++.
For the moment, the only turn-around is to define the arrays directly as variable without using new()
.
@robertinant Any update on the switch to the new compiler?
Using
new
against the MSP430F5529 raises an error.Maybe energia/msp430-ng-core will support it?
Cross posted with https://github.com/energia/msp430-ng-core/issues/2