Open WestfW opened 1 month ago
To be honest, I don't know for sure. I was struggling to get the size of a compiled, blank sketch down to the same size as @nerdralph's picoCore would achieve. I asked him what the secret sauce was, and I was allowed to borrow code (and platform.txt data) to achieve similar results.
Can you try to remove the -ffixed flags and see how/if it makes a difference?
It looks like picoCore uses an entirely register-based WDT/millis implementation: https://github.com/nerdralph/picoCore/blob/master/avr/cores/picocore/millis.S#L23 While microCore has the somewhat bigger NerdRalph Memory-based millis() (when it's turned on.) ( https://github.com/MCUdude/MicroCore/blob/master/avr/cores/microcore/millis.S#L46 )
Not sure why I haven't caught the change. Would you like to submit a PR for it? I'm all for saving every bit of memory on these tiny AVRs!
The discussion was years ago, but my recollection is that you opted for the larger code size for better accuracy. Your sample of t13s had an average WDT frequency around 110 kHz, and chose a 19/16 correction factor. PicoCore supports the t13 and t85, and my sampling of chips had a somewhat higher average WDT frequency, and minimum size took priority over accuracy.
On Wed, Sep 25, 2024 at 6:18 AM Hans @.***> wrote:
Not sure why I haven't caught the change. Would you like to submit a PR for it? I'm all for saving every bit of memory on these tiny AVRs!
— Reply to this email directly, view it on GitHub https://github.com/MCUdude/MicroCore/issues/160#issuecomment-2373527715, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKNZ6X5O7YG3RCOGNRTX7TZYJ5XFAVCNFSM6AAAAABOZZE22OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGUZDONZRGU . You are receiving this because you were mentioned.Message ID: @.***>
platform.txt contains:
However, it looks like the nerdRalph millis code no longer keeps stuff in registers; I can't find any actual used of r2-r4 anywhere in the current source code.
(it is unlikely that this will change anything in any program small enough to fit in a tiny13, but...)