-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Size bloat when LED_DDR != USBDDR #251
Labels
Comments
You are right the compiler in this case refuses to optimize the constant expression. what a pity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changing the LED_DDR to be a different register than the USB DDR bloats the code size (even if the LED isn't used).
I'm testing with
t167_default
on master. Building as-is: 1340 bytes. If inbootloaderconfig.h
I change#define LED_DDR DDRB
to#define LED_DDR DDRA
, the code now builds with size 1454 bytes.I haven't gone too far down the rabbit hole, but I'm thinking that https://github.com/micronucleus/micronucleus/blob/master/firmware/main.c#L600 isn't actually getting optimized like the comment indicates. If I comment out the if/else section and hardcode it to always use
usbDeviceConnect();
, then the code stays at 1340 bytes independent of which DDR the LED uses.The text was updated successfully, but these errors were encountered: