This commit is contained in:
rusEfi 2017-05-03 21:24:18 -04:00
parent fed67399d2
commit bc5b322166
3 changed files with 12 additions and 2 deletions

View File

@ -97,7 +97,8 @@ static void setWarningEnabled(int value) {
}
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
static char FILE_LOGGER[1000] CCM_OPTIONAL;
// this one needs to be in main ram so that SD card SPI DMA works fine
static char FILE_LOGGER[1000] MAIN_RAM;
static Logging fileLogger("file logger", FILE_LOGGER, sizeof(FILE_LOGGER));
#endif /* EFI_FILE_LOGGING */

View File

@ -13,7 +13,7 @@
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
#include "status_loop.h"
static char LOGGING_BUFFER[5000];
static char LOGGING_BUFFER[5000] CCM_OPTIONAL;
static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
static int pendingData = false;

View File

@ -57,6 +57,15 @@ typedef unsigned int time_t;
#define EFI_ERROR_CODE 0xffffffff
#if EFI_USE_CCM && defined __GNUC__
#define MAIN_RAM __attribute__((section(".ram0")))
#elif defined __GNUC__
#define MAIN_RAM
#else
#define MAIN_RAM @ ".ram0"
#endif
#if EFI_USE_CCM && defined __GNUC__
#define CCM_OPTIONAL __attribute__((section(".ram4")))
#elif defined __GNUC__