diff --git a/libraries/AP_HAL_PX4/Util.cpp b/libraries/AP_HAL_PX4/Util.cpp index dce8882639..6e4dea5693 100644 --- a/libraries/AP_HAL_PX4/Util.cpp +++ b/libraries/AP_HAL_PX4/Util.cpp @@ -236,11 +236,19 @@ extern "C" { */ void *PX4Util::dma_allocate(size_t size) { +#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1 return fat_dma_alloc(size); +#else + return malloc(size); +#endif } void PX4Util::dma_free(void *ptr, size_t size) { +#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1 fat_dma_free(ptr, size); +#else + return free(ptr); +#endif } #endif // CONFIG_HAL_BOARD == HAL_BOARD_PX4