1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
LibrePilot/flight/PiOS
Stacey Sheldon 43b31efb76 pios: allocate driver instance data from heap
Allocate per-instance data for drivers from the heap
rather than as static variables from the .data segment.

This converts > 800 bytes of RAM from being always consumed
as static data into being allocated from the heap only when
a particular feature is enabled in the hwsettings object.

A minimal config (no receivers, flexi port disabled, main port
disabled) leaves 2448 bytes of free heap.  That's our new baseline.

Approximate RAM (heap) costs of enabling various features:
 + 632 Serial Telemetry (includes 400 bytes of Rx/Tx buffers)
 + 108 PWM Rcvr
 + 152 PPM Rcvr
 + 112 Spektrum Rcvr
 + 24  S.Bus (Should be closer to 68 since driver is still using
              static memory)

There are still some drivers that pre-allocate all of their memory
as static data.  It'll take some work to convert those over to
dynamically allocating their instance data.
2011-08-31 22:35:03 -04:00
..
Boards Make PWM/PPM and Servo drivers play nicely together 2011-08-27 21:39:56 -04:00
Common pios: allocate driver instance data from heap 2011-08-31 22:35:03 -04:00
inc Make PWM/PPM and Servo drivers play nicely together 2011-08-27 21:39:56 -04:00
STM32F10x pios: allocate driver instance data from heap 2011-08-31 22:35:03 -04:00
pios.h rcvr: add generic driver API for receivers 2011-07-05 22:02:47 -04:00