You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in bootloaderconfig.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:
You are right the compiler in this case refuses to optimize the constant expression. what a pity.
But the code looks like requiring to be tested better, since for USB_CFG_PULLUP_IOPORTNAME the device is still disconnected.
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: