diff --git a/libraries/AP_Filesystem/AP_Filesystem_Sys.cpp b/libraries/AP_Filesystem/AP_Filesystem_Sys.cpp index 546f4bea97..2dc7ed5d23 100644 --- a/libraries/AP_Filesystem/AP_Filesystem_Sys.cpp +++ b/libraries/AP_Filesystem/AP_Filesystem_Sys.cpp @@ -33,6 +33,7 @@ struct SysFileList { static const SysFileList sysfs_file_list[] = { {"threads.txt", 1024}, {"tasks.txt", 6500}, + {"dma.txt", 1024}, #if HAL_MAX_CAN_PROTOCOL_DRIVERS {"can_log.txt", 1024}, {"can0_stats.txt", 1024}, @@ -98,6 +99,12 @@ int AP_Filesystem_Sys::open(const char *fname, int flags) } } } + if (strcmp(fname, "dma.txt") == 0) { + r.data->data = (char *)malloc(max_size); + if (r.data->data) { + r.data->length = hal.util->dma_info(r.data->data, max_size); + } + } #if HAL_MAX_CAN_PROTOCOL_DRIVERS int8_t can_stats_num = -1; if (strcmp(fname, "can_log.txt") == 0) {