The CRSF and DSM RC driver pre-allocates ~ 1KB of RAM on the heap, which means that if DSM/CRSF is not in use this memory can't reclaimed.
Please move this to the local stack so it's only allocated when either DSM or CRSF is used.
Furthermore I think Nuttx or PX4 already provide a CRC8 implementation, please re-use that instead of making custom one with it's own pre-allocated lut table.
Describe the bug
The CRSF and DSM RC driver pre-allocates ~ 1KB of RAM on the heap, which means that if DSM/CRSF is not in use this memory can't reclaimed. Please move this to the local stack so it's only allocated when either DSM or CRSF is used.
Furthermore I think Nuttx or PX4 already provide a CRC8 implementation, please re-use that instead of making custom one with it's own pre-allocated lut table.
To Reproduce
Build px4_fmu-v5 using
make px4_fmu-v5 bloaty_ram
You'll get the following output.
Expected behavior
Memory isn't pre-allocated
Screenshot / Media
No response
Flight Log
N/A
Software Version
PX4 Main
Flight controller
px4_fmu-v5
Vehicle type
None
How are the different components wired up (including port information)
No response
Additional context
No response