diff --git a/Makefile b/Makefile index f3f29edd4..2b47c9967 100644 --- a/Makefile +++ b/Makefile @@ -429,6 +429,8 @@ CC3D_SRC = \ drivers/system_stm32f10x.c \ drivers/timer.c \ drivers/timer_stm32f10x.c \ + drivers/flash_m25p16.c \ + io/flashfs.c \ $(HIGHEND_SRC) \ $(COMMON_SRC) \ $(VCP_SRC) diff --git a/src/main/main.c b/src/main/main.c index 7e530b3f3..6e703d0f3 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -370,7 +370,7 @@ void init(void) m25p16_init(); } #endif -#ifdef SPRACINGF3 +#if defined(SPRACINGF3) || defined(CC3D) m25p16_init(); #endif flashfsInit(); diff --git a/src/main/target/CC3D/target.h b/src/main/target/CC3D/target.h index ed0a7fca8..652bd74f4 100644 --- a/src/main/target/CC3D/target.h +++ b/src/main/target/CC3D/target.h @@ -35,6 +35,13 @@ #define MPU6000_CS_PIN GPIO_Pin_4 #define MPU6000_SPI_INSTANCE SPI1 +#define M25P16_CS_GPIO GPIOB +#define M25P16_CS_PIN GPIO_Pin_12 +#define M25P16_SPI_INSTANCE SPI2 + +#define USE_FLASHFS +#define USE_FLASH_M25P16 + #define USABLE_TIMER_CHANNEL_COUNT 12 #define GYRO @@ -97,7 +104,6 @@ #define RSSI_ADC_GPIO_PIN GPIO_Pin_1 #define RSSI_ADC_CHANNEL ADC_Channel_1 - #define GPS #define LED_STRIP #define LED_STRIP_TIMER TIM3