SDFat 1.0.16 with Device OS 1.2.1

I am upgrading Device OS from 0.8.0-RC.11 to 1.2.1 and the SDFat library from 0.0.7 to 1.0.16.

I am getting this error when compiling in the Web IDE

The program includes are as follows:

#include "Particle.h"
#include <SdFat.h>
#include "softap_http.h"
#include "PS2keyboard.h"
#include "AA_ST7735.h"
#include "Adafruit_mfGFX.h"
#include "device-locator.h"

The raw compiler error is like this - not sure how to fix this? I thought the F_CPU was defined in the “Particle.h” file?

In file included from lib/SdFat/src/SdCard/SdSpiCard.h:33:0,
                 from lib/SdFat/src/BlockDriver.h:32,
                 from lib/SdFat/src/SdFat.h:32,
                 from src/powerhub212.cpp:289:
powerhub212.ino: In function 'boolean sdCardInit()':
lib/SdFat/src/SdCard/SdInfo.h:112:34: error: 'F_CPU' was not declared in this scope
lib/SdFat/src/SdCard/SdInfo.h:104:41: note: in definition of macro 'SD_SCK_HZ'
 #define SD_SCK_HZ(maxSpeed) SPISettings(maxSpeed, MSBFIRST, SPI_MODE0)
powerhub212.ino:6926:25: note: in expansion of macro 'SPI_HALF_SPEED'
../build/ recipe for target '../build/target/user/platform-6-msrc/powerhub212.o' failed
make[2]: Leaving directory '/firmware/user'
make[2]: *** [../build/target/user/platform-6-msrc/powerhub212.o] Error 1

Try full-speed instead - don’t bother with SPI_HALF_SPEED.

I reverted the library version to 0.0.7 and it builds and works fine. The problem I have is that the SD connector is on the back of a TFT screen as a module and that TFT controller just does not work with SPI_FULL_SPEED. It is odd because I have used the version 1.0.16 SDFat library elsewhere but not with 1.2.1 before!