Just clean installed by laptop and went for Arduino 1.6.3 as Teensyduino now supports

Just clean installed by laptop and went for Arduino 1.6.3 as Teensyduino now supports it. What I wasn’t expecting is the jump in memory usage, thought bloatware was Microsoft’s domain…
Under 1.0.5 - ram 20960, rom 22116
Under 1.6.3 - ram 23844, rom 32188
Exactly the same code, exactly the same execution speed!!!

Same MCU?

I just loaded it to debug my Dads app on the Due, but didn’t compare compile sizes… I’ll have to check it tomorrow.

Next thing you know we’ll have to deal with removing Ask.com toolbars for microcontrollers :stuck_out_tongue_closed_eyes:

Sorry, yes, it’s on a Teensy 3.
I think you will find the ram usage has increased on a Due as well, I wrote some vector tube clock code for a friend last year and he had issues when updating with ram usage.

Have you tried the different optimization options (in the speed menu)? I think the new default is speed at the expense of size.

Thanks for pointing that out! It was set to 96MHz optimized, when I change it to just 96MHz I get…
ram 20,044, rom 26136
So almost 1k less ram but almost 4k more rom still. Perhaps it is connected with the Teensduino addon?

No problem. I would guess it’s mostly due to the new compiler version used by Arduino and Teensyduino.

I have been digging in the Arduino/Tennsyduino files and came across the boards.txt in the arduino\hardware\teensy\avr folder.
The optimized options set the ‘/O’ flag and the standard ones set the ‘/Os’ flag. On checking the gcc compiler options I found you could also use /O2 or /O3 for more aggressive optimizations.
My cycle time for /Os is 32.5ms, /O is 30.5ms and for /O2 or /O3 is 28.5ms.
The code size for /O2 is similar to /O but for /O3 is much higher.
The big problem is that my code uses the Octo parallel output and when using the /O2 or /O3, I notice that the first LED on each line fails to be controlled.
The other point of interest in this boards.txt file though is the other commented out overclock options of 120MHz, 144MHz & 168MHz.
I have tried them all but found that the 168MHz is not reliable but achieve 28.5ms cycle time with 120MHz and 23.5ms with 144MHz.