TauLabs/TauLabs — pull request #808 by solidgoldbomb (2013-07-29 05:37:00+00:00)
Title: Use ccmram as heap on F3/F4

This patch set provides:
* Create a new PIOS_malloc() and PIOS_malloc_no_dma() API to abstract the actual heap allocator from the PIOS driver layer.
* Provide a simple heap allocator when FreeRTOS is not present so PIOS drivers don't need to handle their own dev struct allocation.
* Use underlying FreeRTOS allocator (when available) for the standard heap
* Create a new heap over the unused CCM RAM on F3 and F4 targets
* Not DMA safe
* Faster than SRAM (zero wait state)
* Falls back to standard heap when allocation in CCM RAM cannot be satisfied
* Max 8KB on F3, Max 64KB on F4
* IRQ stack steals some of the CCM RAM
* Adapt all PIOS drivers to use the new PIOS_malloc() API
* Adapt UAVO Object Manager to use the PIOS_malloc_no_dma() API for all UAVO data and event structs.
* Saves 5KB of standard heap on FlyingF3

Needs significant testing before merging.

Fixes #276 or at least provides all of the infrastructure to enable increased utilization of the CCM RAM.