Graynomad:
Are you sureSerial.print("FAIL");
Uses RAM on the Due. I would have thought on the ARM architecture constants are kept in flash anyway and the P macro is redundant.
Rob
I'm pretty sure, unless they changed it in the last few versions. My game has a lot of text and the RAM function I run will show FREE RAM go up alot when converting to flash memory storage.
int freeRam(void)
{
extern int __bss_end;
extern int *__brkval;
int free_memory;
if((int)__brkval == 0) {
free_memory = ((int)&free_memory) - ((int)&__bss_end);
}
else {
free_memory = ((int)&free_memory) - ((int)__brkval);
}
return free_memory;
}
/////called in the upgrade code/regen function like this
void RAM()
{
clearLCD();
mySerial.print(F("Free RAM: ")); //debug code
mySerial.print(freeRam()); //debug code
}