Firmware stripping #2160
Replies: 2 comments 4 replies
-
The Prime hub has plenty of free memory and flash space, so I wouldn't recommend disabling anything. The firmware only uses about 25% of the available resources and you would only stand to gain about another 5% by disabling things. Also, be careful with the clock speed. In addition to the CPU, it affects all of the peripherals. In particular, this would break USB which requires exactly a 48MHz clock and could also mess up the baud rate on UART sensors (and less critically, the PWM frequencies). What exactly are you wanting to do with this speed machine? |
Beta Was this translation helpful? Give feedback.
-
If you're building your own firmware anyway, you may be able to speed things up a lot more by doing some of your math in C, and leave things like clock speeds unchanged. The actual math speed is the same, but the time savings will be in micropython not having to allocate any heap memory to do floating point math and do garbage collecting. It also saves time doing function lookups. There is an existing hello_world example function for this in the pybricks.experimental module. It explains how to process arguments and return a result. In between, you can do anything you like. You can find it in pybricks/experimental. |
Beta Was this translation helpful? Give feedback.
-
Hi! I am currently making my own modded firmware for specialized purpose. So far i've forced the gyro's high performance mode and overclocked the prime hub to 108MHZ. My question is - is there anything i can strip from the firmware to help save ram, flash and get calculations (floating point) done faster? or any other firmware level trick thats relevant for my case?
Beta Was this translation helpful? Give feedback.
All reactions