TheMadHouse
Member
I have a puzzlement over compiled code size when swapping between Arduino and Teensy.
Project compile results below. When compiling for the Teensy the resulting code is three time the size and uses 88% more memory.
It's identical code, all I've done is change the target board.
Any clues as to why?
Not feasible to post the code as there are 23 files in the project, these are the external dependencies, no other libraries are used.
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <MFRC522.h>
#include <Wire.h>
Compiling 'teamTRACK' for 'ATmega2560 (Mega 2560) (Arduino Mega)'
Program size: 24,092 bytes (used 9% of a 253,952 byte maximum) (3.11 secs)
Minimum Memory Usage: 3019 bytes (37% of a 8192 byte maximum)
Compiling 'teamTRACK' for 'Teensy 3.5'
Program size: 60,824 bytes (used 12% of a 524,288 byte maximum) (6.31 secs)
Minimum Memory Usage: 5700 bytes (2% of a 262136 byte maximum)
Jim
Project compile results below. When compiling for the Teensy the resulting code is three time the size and uses 88% more memory.
It's identical code, all I've done is change the target board.
Any clues as to why?
Not feasible to post the code as there are 23 files in the project, these are the external dependencies, no other libraries are used.
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <MFRC522.h>
#include <Wire.h>
Compiling 'teamTRACK' for 'ATmega2560 (Mega 2560) (Arduino Mega)'
Program size: 24,092 bytes (used 9% of a 253,952 byte maximum) (3.11 secs)
Minimum Memory Usage: 3019 bytes (37% of a 8192 byte maximum)
Compiling 'teamTRACK' for 'Teensy 3.5'
Program size: 60,824 bytes (used 12% of a 524,288 byte maximum) (6.31 secs)
Minimum Memory Usage: 5700 bytes (2% of a 262136 byte maximum)
Jim