Skip to content

Commit f198150

Browse files
committed
add formatting of ExtraFS area used by MeshCore
1 parent 673a8b5 commit f198150

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

platformio.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,24 @@ build_flags =
66
-D NRF52_S140=1
77
-I src
88
-L boards
9+
-w
910
framework = arduino
1011
monitor_speed = 115200
12+
lib_deps =
13+
https://github.com/oltaco/CustomLFS @ 0.2.1
1114

1215
[env:FLASH_ERASE_nrf52_softdevice_v6]
1316
extends = nrf52_base
1417
board = nrf52840_s140_v6
1518
build_flags = ${nrf52_base.build_flags}
1619
-I arch/nrf52/s140_6.1.1
1720
-I arch/nrf52/s140_6.1.1/nrf52
21+
lib_deps = ${nrf52_base.lib_deps}
1822

1923
[env:FLASH_ERASE_nrf52_softdevice_v7]
2024
extends = nrf52_base
2125
board = nrf52840_s140_v7
2226
build_flags = ${nrf52_base.build_flags}
2327
-I arch/nrf52/s140_7.3.0
2428
-I arch/nrf52/s140_7.3.0/nrf52
29+
lib_deps = ${nrf52_base.lib_deps}

src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <Adafruit_LittleFS.h>
22
#include <InternalFileSystem.h>
33
#include <Adafruit_TinyUSB.h>
4+
#include <CustomLFS.h>
45

56
using namespace Adafruit_LittleFS_Namespace;
67

@@ -11,6 +12,10 @@ void setup() {
1112
delay(500);
1213
InternalFS.format();
1314

15+
delay(500);
16+
CustomLFS ExtraFS(0xD4000, 0x19000, 128);
17+
ExtraFS.format();
18+
1419
delay(500);
1520
enterUf2Dfu();
1621
}

src/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ extern "C"
4343
#define PIN_SERIAL1_TX (-1)
4444
#define LED_STATE_ON LOW
4545

46+
// Placeholder pins to allow CustomLFS to compile
47+
#define SPI_INTERFACES_COUNT (1)
48+
#define PIN_SPI_MOSI (255)
49+
#define PIN_SPI_MISO (255)
50+
#define PIN_SPI_SCK (255)
51+
4652
#ifdef __cplusplus
4753
}
4854
#endif

0 commit comments

Comments
 (0)