File tree 3 files changed +23
-10
lines changed
3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 9
9
#define FULL_UPDATE_FILE_PATH " /" SD_MOUNT_PATH " /" MBED_CONF_APP_UPDATE_FILE
10
10
11
11
#define POST_APPLICATION_ADDR 0x10000
12
+ #define VERSION 1
12
13
13
14
#if !defined(POST_APPLICATION_ADDR)
14
15
#error "target.restrict_size must be set for your target in mbed_app.json"
15
16
#endif
16
17
17
18
// Pin order: MOSI, MISO, SCK, CS
18
- // FlashIAPBlockDevice sd(XIP_BASE + 0xF00000, 0x100000);
19
- FlashIAPBlockDevice sd (XIP_BASE + 0x100000 , 0x100000 );
19
+ FlashIAPBlockDevice sd (XIP_BASE + 0xF00000 , 0x100000 );
20
+ // FlashIAPBlockDevice sd(XIP_BASE + 0x100000, 0x100000);
20
21
FATFileSystem fs (SD_MOUNT_PATH);
21
22
FlashIAP flash;
22
23
Original file line number Diff line number Diff line change 1
- https://github.com/arduino/mbed-os/#1820aade78cbc3e3231def2c3ffd0b363bf1778c
1
+ https://github.com/arduino/mbed-os/#45445a4b76d8d05d6083f8bf481e5b4efe7bf1c7
Original file line number Diff line number Diff line change 1
1
#include " SFU.h"
2
2
#include " FlashIAPBlockDevice.h"
3
3
#include " FATFileSystem.h"
4
- // #include "PluggableUSBMSD.h"
4
+ #include " PluggableUSBMSD.h"
5
5
6
6
const unsigned char SFU[0x10000 ] __attribute__ ((section(" .second_stage_ota" ), used)) = {
7
7
#include " rp2040.h"
8
8
};
9
9
10
- FlashIAPBlockDevice bd (XIP_BASE + 0x100000 , 0x100000 );
11
- static mbed::FATFileSystem fs (" ota" );
10
+ FlashIAPBlockDevice bd (XIP_BASE + 0xF00000 , 0x100000 );
12
11
13
- int SFU::begin () {
14
- int err = fs.mount (&bd);
15
- if (err) {
16
- err = fs.reformat (&bd);
12
+ void USBMSD::begin ()
13
+ {
14
+ int err = getFileSystem ().mount (&bd);
15
+ if (err) {
16
+ err = getFileSystem ().reformat (&bd);
17
17
}
18
18
}
19
19
20
+ mbed::FATFileSystem& USBMSD::getFileSystem ()
21
+ {
22
+ static mbed::FATFileSystem fs (" ota" );
23
+ return fs;
24
+ }
25
+
26
+ USBMSD MassStorage (&bd);
27
+
28
+ int SFU::begin () {
29
+ MassStorage.begin ();
30
+ }
31
+
20
32
int SFU::download (const char * url) {
21
33
// No download at the moment, allow the user to upload a file via mass storage
22
34
}
You can’t perform that action at this time.
0 commit comments