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
Move hub is once again dangerously close (less than 500 bytes) to running out of flash memory for the firmware. So, we need to come up with more ideas to free up space.
The recent ColorLightMatrix class added 500 bytes. So if each of these devices is in that ballpark, this could potentially save 1-3k (for up to 6 device classes).
For motors, probably only the tuning data is different since they all share a common class, so removing those would probably would only make a small difference.
Idea: disable keyword arguments on Move Hub. Since we use macros for all of them, maybe we can change those for Move Hub, perhaps without changing all the classes. To gain the full benefit we'd also need to change the function object definitions, so this is probably a bit more work than it's worth.
Managed to cut it by 508 bytes. Combined with your 320 byte savings for the firmware info, we might have a little longer to go.
But if we have to:
Idea: disable WeDo 2.0 and/or SPIKE I/O devices.
From a functionality and savings point of view, we could perhaps start with the SPIKE Color Sensor and SPIKE Ultrasonic Sensor since distance and color sensing is provided by the ColorDistanceSensor.
They should also give the biggest gain as we also get to cut the Common.LightArray class used for their built-in lights.
The ColorLightMatrix might still be somewhat nice to keep, since it does have nice use cases in system/city applications.
Idea: disable the Control() class on motors and drive bases.
Really, the defaults will do fine for most cases.
One downside is that control.stalled and control.done would no longer be available so multi-motor control would be a bit harder. These are already being flattened in the DriveBase case, so maybe it makes sense to do that for Motor as well.
Disabling Motor.control, Motor.log, and the corresponding control and log objects in DriveBase saves about 2800 bytes, which should keep us going for a little while longer.
I’d need to have a closer look tomorrow, but I think the limits() call here has become redundant anyway. Just the settings() call should suffice, and we’re keeping that one.
Hello, thank you for developing this very useful tool!
I'm new to the community and not a coding expert. What if, like for the option to download the program together with the firmware, there is an option on which firmware blocks to include in the firmware to download? This way you could save memory when downloading not needed firmware blocks knowing of course that the developing platform is not complete anymore for new developments....
Is there also a way to make a program autostart just to start the downloaded program right when powering up?
This way you could make "permanent final programs" which uses less memory as they are not intended for development anymore.
If you need do develop a new program then you reinstall the full firmware and start the program with the play icon.
Even nicer would it be if you could determine which firmware blocks to download automatically by downloading of the firmware+program operation.
Kind regards
What if, like for the option to download the program together with the firmware, there is an option on which firmware blocks to include in the firmware to download?
This is probably too complicated. We would have to build a separate firmware for each combination of features. Pro users can download the source code and do this themselves though.
Is there also a way to make a program autostart just to start the downloaded program right when powering up
No, this isn't possible. However, it only takes one extra press of the button to start the program.
The problems with the poor lego BOOST move hub memory are really limiting the possibility of implementing meaningful programs with this device, especially when considering a pybricks firmware that supports all possible devices. If considering reducing the amount of supported peripheric devices there seem not to be a Tecnical objective choice on which peripheric device to support and which not. As the lego BOOST move hub memory is really limited my suggestion is to limit the supported peripheric devices to the standard lego BOOST set at least to give a consistency on the purchased package which would probably fits to the majority of those who purchased this lego set and giving them the possibility to make meaningful programs.
Kind regards
Activity
dlech commentedon Nov 8, 2021
Idea: disable WeDo 2.0 and/or SPIKE I/O devices.
The recent
ColorLightMatrixclass added 500 bytes. So if each of these devices is in that ballpark, this could potentially save 1-3k (for up to 6 device classes).For motors, probably only the tuning data is different since they all share a common class, so removing those would probably would only make a small difference.
laurensvalk commentedon Nov 8, 2021
pybricks/pybricks-micropython@7dd84a3 seems much larger (+1K) than I expected, so I'll need to have a look at that one.
laurensvalk commentedon Nov 8, 2021
Idea: disable keyword arguments on Move Hub. Since we use macros for all of them, maybe we can change those for Move Hub, perhaps without changing all the classes. To gain the full benefit we'd also need to change the function object definitions, so this is probably a bit more work than it's worth.
laurensvalk commentedon Nov 9, 2021
Managed to cut it by 508 bytes. Combined with your 320 byte savings for the firmware info, we might have a little longer to go.
But if we have to:
From a functionality and savings point of view, we could perhaps start with the SPIKE Color Sensor and SPIKE Ultrasonic Sensor since distance and color sensing is provided by the
ColorDistanceSensor.They should also give the biggest gain as we also get to cut the
Common.LightArrayclass used for their built-in lights.The
ColorLightMatrixmight still be somewhat nice to keep, since it does have nice use cases in system/city applications.laurensvalk commentedon Nov 18, 2021
Idea: disable the
Control()class on motors and drive bases.Really, the defaults will do fine for most cases.
One downside is that
control.stalledandcontrol.donewould no longer be available so multi-motor control would be a bit harder. These are already being flattened in theDriveBasecase, so maybe it makes sense to do that forMotoras well.laurensvalk commentedon Dec 21, 2021
Disabling
Motor.control,Motor.log, and the corresponding control and log objects inDriveBasesaves about 2800 bytes, which should keep us going for a little while longer.dlech commentedon Dec 22, 2021
FYI, pybricks/pybricks-micropython@44ee268 breaks our R2-D2 example program since is uses
drive.distance_control.limits().laurensvalk commentedon Dec 22, 2021
I’d need to have a closer look tomorrow, but I think the limits() call here has become redundant anyway. Just the settings() call should suffice, and we’re keeping that one.
c59-zurich commentedon Dec 29, 2021
Hello, thank you for developing this very useful tool!
I'm new to the community and not a coding expert. What if, like for the option to download the program together with the firmware, there is an option on which firmware blocks to include in the firmware to download? This way you could save memory when downloading not needed firmware blocks knowing of course that the developing platform is not complete anymore for new developments....
Is there also a way to make a program autostart just to start the downloaded program right when powering up?
This way you could make "permanent final programs" which uses less memory as they are not intended for development anymore.
If you need do develop a new program then you reinstall the full firmware and start the program with the play icon.
Even nicer would it be if you could determine which firmware blocks to download automatically by downloading of the firmware+program operation.
Kind regards
dlech commentedon Dec 29, 2021
This is probably too complicated. We would have to build a separate firmware for each combination of features. Pro users can download the source code and do this themselves though.
No, this isn't possible. However, it only takes one extra press of the button to start the program.
c59-zurich commentedon Jan 12, 2022
The problems with the poor lego BOOST move hub memory are really limiting the possibility of implementing meaningful programs with this device, especially when considering a pybricks firmware that supports all possible devices. If considering reducing the amount of supported peripheric devices there seem not to be a Tecnical objective choice on which peripheric device to support and which not. As the lego BOOST move hub memory is really limited my suggestion is to limit the supported peripheric devices to the standard lego BOOST set at least to give a consistency on the purchased package which would probably fits to the majority of those who purchased this lego set and giving them the possibility to make meaningful programs.
Kind regards
dlech commentedon Oct 10, 2022
We have made good progress on freeing up space. There is a more general discussion about the future of move hub at #218.