Conversation
|
According to OpenCyphal-Garage/libcyphal#33, RAM reduction in the case above is about 42K - 26K = 16K. |
|
CPU load during firmware update at 1 Mbps: Testing with firmware update and some nodes connected shows that peak memory usage does not exceed 80 blocks, so the limit of 500 blocks seems enough. |
|
Nice! |
5430a54 to
f872cbf
Compare
|
@bendyer @mhkabir Does anybody want to give it a try? Seems to work flawlessly for me so far, although it still leaks about ~300 bytes of memory per restart (@davids5 master does too). The problem is certainly not with libuavcan (it's unit tested for leaks), could be either the application, some part of PX4 or NuttX. I'm not sure how important this issue is, considering that the driver is not supposed to be stopped during normal operation. |
|
@pavel-kirienko A test flight with this change would be great. |
|
Toggling to re-run hans-ci. |
9a90bce to
d90192d
Compare
|
@pavel-kirienko @bendyer Is this flight tested? I'll rebase it on master to make it easier to handle. |
d90192d to
de452c9
Compare
|
Not yet. Some hardware needed for the test is still stuck in post. I'll update you once it's tested. |
…eak is deetcted upon destruction
de452c9 to
96a12a6
Compare
|
Good to go for a test flight. |
|
I'm going to test fly this early next week. Should resolve #3102. |
|
This has been test flown on an Iris with UAVCAN ESC without issues. |
|
I test flew this today as well. System loading / memory looks good! :) |
|
Will someone volunteer to merge this? I have already updated this PR to the yesterday's master. |
UAVCAN footprint reduction
We simply call the srrink methode after the server stop. See #3005 (comment) for backgound
* Update libuavcan to upstream master with PX4 contrib for NuttX 7.16+ * Release any 64B blocks not needed by usavcan after FW server is stopped. We simply call the srrink methode after the server stop. See #3005 (comment) for backgound
@LorenzMeier @davids5 @bendyer @mhkabir
This optimization feels like cheating.
ROM reduction (I swear I didn't touch the compiler flags): 980204 - 967772 = 12 K.
RAM reduction: it's complicated.
Connecting Zubax GNSS, which requires the driver to sponge more memory, yet we can see that fragmentation does not increase (pay attention to the field
largest):Connecting another node (
px4cannode-v1) with an outdated firmware - the driver initiates the update procedure; at the end of it we see this:In this particular test, worst case memory use was 82400 - 55920 = 26K.
What happened?
Stay tuned, work is still in progress.