Author Topic: Compiled size larger using Moteino target instead of Arduino Uno  (Read 445 times)

tleavitt

  • Newbie
  • *
  • Posts: 11
Compiled size larger using Moteino target instead of Arduino Uno
« on: December 23, 2018, 07:31:32 PM »
So random thing I noticed after accidentally leaving my target as an UNO instead of Moteino, the compiled size is quite a bit larger when using the Moteino target. Same code, but when compiled for the Uno the total sketch size is 10910 bytes with 563 bytes of global variables. But when I compile for Moteino/MoteinoUSB I get a sketch size of 12228 bytes with 577 bytes of global variables.
And for comparison, I tried again using the Blink example code. The Uno gives 930 byte sketch with 9 bytes of global variables and the Moteino gives 1006 byte sketch with 9 bytes of global variables.
Why the difference when both build options produce working Moteinos?
This also begs the question, whats the difference between the two builds?

And yes, my Arduino IDE and Moteino Core are up to date.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5779
  • Country: us
    • LowPowerLab
Re: Compiled size larger using Moteino target instead of Arduino Uno
« Reply #1 on: December 24, 2018, 09:05:58 AM »
Not sure, I will have to look into it. There are some optimization parameters in the Moteino package that might make the difference.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5779
  • Country: us
    • LowPowerLab
Re: Compiled size larger using Moteino target instead of Arduino Uno
« Reply #2 on: March 21, 2019, 03:56:38 PM »
I just released Moteino AVR Boards version 1.5.0, this should be able to fix this and compile to the same size as the UNO.
This is based on the latest Arduino AVR Boards v1.6.23.
When you restart the IDE it should notify you of updates available for your boards, or you can update manually in the Tools > Boards > Boards Manager.

tleavitt

  • Newbie
  • *
  • Posts: 11
Re: Compiled size larger using Moteino target instead of Arduino Uno
« Reply #3 on: April 25, 2019, 10:05:15 PM »
I just released Moteino AVR Boards version 1.5.0, this should be able to fix this and compile to the same size as the UNO.
This is based on the latest Arduino AVR Boards v1.6.23.
When you restart the IDE it should notify you of updates available for your boards, or you can update manually in the Tools > Boards > Boards Manager.

Awesome! Thanks Felix. I imagine it would be better to use the Moteino specific compilation over the standard UNO one

EDIT: Just updated and the compilation sizes are the same! Ill update my motes next time Im in their boxes
« Last Edit: April 25, 2019, 10:09:24 PM by tleavitt »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5779
  • Country: us
    • LowPowerLab
Re: Compiled size larger using Moteino target instead of Arduino Uno
« Reply #4 on: April 25, 2019, 10:42:37 PM »
"The same" as UNO?
I would hope so. Others report the size has gone down significantly form the previous v1.4 definition.
Let me know if this can be marked SOLVED.