Browse Source

QSPI EEPROM for SAMD51 (#17292)

Giuliano Zaro 4 years ago
parent
commit
129b270628
No account linked to committer's email address
41 changed files with 413 additions and 179 deletions
  1. 1
    1
      Marlin/src/HAL/AVR/eeprom.cpp
  2. 1
    1
      Marlin/src/HAL/DUE/EepromEmulation.cpp
  3. 1
    1
      Marlin/src/HAL/DUE/eeprom.cpp
  4. 1
    1
      Marlin/src/HAL/DUE/inc/Conditionals_post.h
  5. 1
    1
      Marlin/src/HAL/ESP32/eeprom_impl.cpp
  6. 1
    1
      Marlin/src/HAL/ESP32/inc/Conditionals_post.h
  7. 1
    1
      Marlin/src/HAL/LINUX/eeprom_impl.cpp
  8. 1
    1
      Marlin/src/HAL/LPC1768/eeprom_api.h
  9. 1
    1
      Marlin/src/HAL/LPC1768/eeprom_flash.cpp
  10. 1
    1
      Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp
  11. 1
    1
      Marlin/src/HAL/LPC1768/inc/Conditionals_post.h
  12. 78
    0
      Marlin/src/HAL/SAMD51/QSPIFlash.cpp
  13. 51
    0
      Marlin/src/HAL/SAMD51/QSPIFlash.h
  14. 66
    0
      Marlin/src/HAL/SAMD51/eeprom.cpp
  15. 96
    0
      Marlin/src/HAL/SAMD51/eeprom_flash.cpp
  16. 71
    0
      Marlin/src/HAL/SAMD51/eeprom_qspi.cpp
  17. 1
    3
      Marlin/src/HAL/SAMD51/inc/Conditionals_post.h
  18. 0
    129
      Marlin/src/HAL/SAMD51/persistent_store_eeprom.cpp
  19. 1
    1
      Marlin/src/HAL/STM32/eeprom_flash.cpp
  20. 6
    6
      Marlin/src/HAL/STM32/eeprom_impl.cpp
  21. 1
    1
      Marlin/src/HAL/STM32/eeprom_sdcard.cpp
  22. 1
    1
      Marlin/src/HAL/STM32/inc/Conditionals_post.h
  23. 3
    3
      Marlin/src/HAL/STM32F1/eeprom.cpp
  24. 3
    4
      Marlin/src/HAL/STM32F1/eeprom_flash.cpp
  25. 1
    2
      Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp
  26. 1
    1
      Marlin/src/HAL/STM32_F4_F7/eeprom.cpp
  27. 1
    1
      Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h
  28. 1
    1
      Marlin/src/HAL/TEENSY31_32/eeprom_impl.cpp
  29. 1
    1
      Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h
  30. 1
    1
      Marlin/src/HAL/TEENSY35_36/eeprom.cpp
  31. 1
    1
      Marlin/src/HAL/shared/eeprom_api.cpp
  32. 0
    0
      Marlin/src/HAL/shared/eeprom_api.h
  33. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  34. 7
    4
      Marlin/src/inc/Conditionals_post.h
  35. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp
  36. 1
    1
      Marlin/src/module/configuration_store.cpp
  37. 1
    1
      Marlin/src/module/configuration_store.h
  38. 1
    1
      Marlin/src/module/printcounter.cpp
  39. 2
    2
      Marlin/src/module/printcounter.h
  40. 2
    1
      Marlin/src/pins/samd/pins_RAMPS_144.h
  41. 1
    0
      platformio.ini

Marlin/src/HAL/AVR/persistent_store_eeprom.cpp → Marlin/src/HAL/AVR/eeprom.cpp View File

@@ -25,7 +25,7 @@
25 25
 
26 26
 #if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
27 27
 
28
-#include "../shared/persistent_store_api.h"
28
+#include "../shared/eeprom_api.h"
29 29
 
30 30
 bool PersistentStore::access_start() { return true; }
31 31
 bool PersistentStore::access_finish() { return true; }

+ 1
- 1
Marlin/src/HAL/DUE/EepromEmulation.cpp View File

@@ -57,7 +57,7 @@
57 57
 #if ENABLED(FLASH_EEPROM_EMULATION)
58 58
 
59 59
 #include "../shared/Marduino.h"
60
-#include "../shared/persistent_store_api.h"
60
+#include "../shared/eeprom_api.h"
61 61
 
62 62
 #define EEPROMSize     4096
63 63
 #define PagesPerGroup   128

Marlin/src/HAL/DUE/persistent_store_eeprom.cpp → Marlin/src/HAL/DUE/eeprom.cpp View File

@@ -27,7 +27,7 @@
27 27
 #if ENABLED(EEPROM_SETTINGS)
28 28
 
29 29
 #include "../../inc/MarlinConfig.h"
30
-#include "../shared/persistent_store_api.h"
30
+#include "../shared/eeprom_api.h"
31 31
 
32 32
 #if !defined(E2END) && ENABLED(FLASH_EEPROM_EMULATION)
33 33
   #define E2END 0xFFF // Default to Flash emulated EEPROM size (EepromEmulation_Due.cpp)

+ 1
- 1
Marlin/src/HAL/DUE/inc/Conditionals_post.h View File

@@ -21,7 +21,7 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if USE_EMULATED_EEPROM
24
+#if USE_FALLBACK_EEPROM
25 25
   #undef SRAM_EEPROM_EMULATION
26 26
   #undef SDCARD_EEPROM_EMULATION
27 27
   #define FLASH_EEPROM_EMULATION

Marlin/src/HAL/ESP32/persistent_store_impl.cpp → Marlin/src/HAL/ESP32/eeprom_impl.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
28 28
 
29
-#include "../shared/persistent_store_api.h"
29
+#include "../shared/eeprom_api.h"
30 30
 #include "EEPROM.h"
31 31
 
32 32
 #define EEPROM_SIZE 4096

+ 1
- 1
Marlin/src/HAL/ESP32/inc/Conditionals_post.h View File

@@ -22,6 +22,6 @@
22 22
 #pragma once
23 23
 
24 24
 // If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
25
-#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
25
+#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
26 26
   #define SDCARD_EEPROM_EMULATION
27 27
 #endif

Marlin/src/HAL/LINUX/persistent_store_impl.cpp → Marlin/src/HAL/LINUX/eeprom_impl.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #if ENABLED(EEPROM_SETTINGS)
28 28
 
29
-#include "../shared/persistent_store_api.h"
29
+#include "../shared/eeprom_api.h"
30 30
 #include <stdio.h>
31 31
 
32 32
 #define LINUX_EEPROM_SIZE (E2END + 1)

Marlin/src/HAL/LPC1768/persistent_store_api.h → Marlin/src/HAL/LPC1768/eeprom_api.h View File

@@ -21,6 +21,6 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#include "../shared/persistent_store_api.h"
24
+#include "../shared/eeprom_api.h"
25 25
 
26 26
 #define FLASH_EEPROM_EMULATION

Marlin/src/HAL/LPC1768/persistent_store_flash.cpp → Marlin/src/HAL/LPC1768/eeprom_flash.cpp View File

@@ -40,7 +40,7 @@
40 40
 
41 41
 #if ENABLED(FLASH_EEPROM_EMULATION)
42 42
 
43
-#include "persistent_store_api.h"
43
+#include "eeprom_api.h"
44 44
 
45 45
 extern "C" {
46 46
   #include <lpc17xx_iap.h>

Marlin/src/HAL/LPC1768/persistent_store_sdcard.cpp → Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #if ENABLED(SDCARD_EEPROM_EMULATION)
28 28
 
29
-#include "persistent_store_api.h"
29
+#include "eeprom_api.h"
30 30
 
31 31
 #include <chanfs/diskio.h>
32 32
 #include <chanfs/ff.h>

+ 1
- 1
Marlin/src/HAL/LPC1768/inc/Conditionals_post.h View File

@@ -21,6 +21,6 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if USE_EMULATED_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
24
+#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
25 25
   #define FLASH_EEPROM_EMULATION
26 26
 #endif

+ 78
- 0
Marlin/src/HAL/SAMD51/QSPIFlash.cpp View File

@@ -0,0 +1,78 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(QSPI_EEPROM)
26
+
27
+#include "QSPIFlash.h"
28
+
29
+#define INVALID_ADDR    0xffffffff
30
+#define SECTOR_OF(a)    (a & ~(SFLASH_SECTOR_SIZE - 1))
31
+#define OFFSET_OF(a)    (a & (SFLASH_SECTOR_SIZE - 1))
32
+
33
+Adafruit_SPIFlashBase * QSPIFlash::_flashBase = nullptr;
34
+uint8_t QSPIFlash::_buf[SFLASH_SECTOR_SIZE];
35
+uint32_t QSPIFlash::_addr = INVALID_ADDR;
36
+
37
+void QSPIFlash::begin() {
38
+  if (_flashBase != nullptr) return;
39
+
40
+  _flashBase = new Adafruit_SPIFlashBase(new Adafruit_FlashTransport_QSPI());
41
+  _flashBase->begin(NULL);
42
+}
43
+
44
+size_t QSPIFlash::size() {
45
+  return _flashBase->size();
46
+}
47
+
48
+uint8_t QSPIFlash::readByte(const uint32_t address) {
49
+  if (SECTOR_OF(address) == _addr) return _buf[OFFSET_OF(address)];
50
+
51
+  return _flashBase->read8(address);
52
+}
53
+
54
+void QSPIFlash::writeByte(const uint32_t address, const uint8_t value) {
55
+  uint32_t const sector_addr = SECTOR_OF(address);
56
+
57
+  // Page changes, flush old and update new cache
58
+  if (sector_addr != _addr) {
59
+    flush();
60
+    _addr = sector_addr;
61
+
62
+    // read a whole page from flash
63
+    _flashBase->readBuffer(sector_addr, _buf, SFLASH_SECTOR_SIZE);
64
+  }
65
+
66
+  _buf[OFFSET_OF(address)] = value;
67
+}
68
+
69
+void QSPIFlash::flush() {
70
+  if (_addr == INVALID_ADDR) return;
71
+
72
+  _flashBase->eraseSector(_addr / SFLASH_SECTOR_SIZE);
73
+  _flashBase->writeBuffer(_addr, _buf, SFLASH_SECTOR_SIZE);
74
+
75
+  _addr = INVALID_ADDR;
76
+}
77
+
78
+#endif // QSPI_EEPROM

+ 51
- 0
Marlin/src/HAL/SAMD51/QSPIFlash.h View File

@@ -0,0 +1,51 @@
1
+/**
2
+ * @file QSPIFlash.h
3
+ *
4
+ * The MIT License (MIT)
5
+ *
6
+ * Copyright (c) 2019 Ha Thach and Dean Miller for Adafruit Industries LLC
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
+ *
26
+ * Derived from Adafruit_SPIFlash class with no SdFat references
27
+ *
28
+ */
29
+
30
+#pragma once
31
+
32
+#include "Adafruit_SPIFlashBase.h"
33
+
34
+// This class extends Adafruit_SPIFlashBase by adding caching support.
35
+//
36
+// This class will use 4096 Bytes of RAM as a block cache.
37
+class QSPIFlash {
38
+  public:
39
+    static void begin();
40
+    static size_t size();
41
+    static uint8_t readByte(const uint32_t address);
42
+    static void writeByte(const uint32_t address, const uint8_t v);
43
+    static void flush();
44
+
45
+  private:
46
+    static Adafruit_SPIFlashBase * _flashBase;
47
+    static uint8_t _buf[SFLASH_SECTOR_SIZE];
48
+    static uint32_t _addr;
49
+};
50
+
51
+extern QSPIFlash qspi;

+ 66
- 0
Marlin/src/HAL/SAMD51/eeprom.cpp View File

@@ -0,0 +1,66 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ *
4
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
+ * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
+ *
20
+ */
21
+
22
+#ifdef __SAMD51__
23
+
24
+#include "../../inc/MarlinConfig.h"
25
+
26
+#if ENABLED(EEPROM_SETTINGS) && NONE(QSPI_EEPROM, FLASH_EEPROM_EMULATION)
27
+
28
+#include "../shared/eeprom_api.h"
29
+
30
+size_t PersistentStore::capacity() { return E2END + 1; }
31
+
32
+bool PersistentStore::access_start() { return true; }
33
+bool PersistentStore::access_finish() { return true; }
34
+
35
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
36
+  while (size--) {
37
+    const uint8_t v = *value;
38
+    uint8_t * const p = (uint8_t * const)pos;
39
+    if (v != eeprom_read_byte(p)) {
40
+      eeprom_write_byte(p, v);
41
+      delay(2);
42
+      if (eeprom_read_byte(p) != v) {
43
+        SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
44
+        return true;
45
+      }
46
+    }
47
+    crc16(crc, &v, 1);
48
+    pos++;
49
+    value++;
50
+  }
51
+  return false;
52
+}
53
+
54
+bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
55
+  while (size--) {
56
+    uint8_t c = eeprom_read_byte((uint8_t*)pos);
57
+    if (writing) *value = c;
58
+    crc16(crc, &c, 1);
59
+    pos++;
60
+    value++;
61
+  }
62
+  return false;
63
+}
64
+
65
+#endif // EEPROM_SETTINGS && !(QSPI_EEPROM || FLASH_EEPROM_EMULATION)
66
+#endif // __SAMD51__

+ 96
- 0
Marlin/src/HAL/SAMD51/eeprom_flash.cpp View File

@@ -0,0 +1,96 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ *
4
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
+ * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
+ *
20
+ */
21
+
22
+#ifdef __SAMD51__
23
+
24
+#include "../../inc/MarlinConfig.h"
25
+
26
+#if ENABLED(FLASH_EEPROM_EMULATION)
27
+
28
+#include "../shared/eeprom_api.h"
29
+
30
+#define NVMCTRL_CMD(c)    do{                                                 \
31
+                            SYNC(!NVMCTRL->STATUS.bit.READY);                 \
32
+                            NVMCTRL->INTFLAG.bit.DONE = true;                 \
33
+                            NVMCTRL->CTRLB.reg = c | NVMCTRL_CTRLB_CMDEX_KEY; \
34
+                            SYNC(NVMCTRL->INTFLAG.bit.DONE);                  \
35
+                          }while(0)
36
+#define NVMCTRL_FLUSH()   do{                                           \
37
+                            if (NVMCTRL->SEESTAT.bit.LOAD)              \
38
+                              NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_SEEFLUSH);  \
39
+                          }while(0)
40
+
41
+size_t PersistentStore::capacity() {
42
+  const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ,
43
+                sblk = NVMCTRL->SEESTAT.bit.SBLK;
44
+
45
+  return   (!psz && !sblk)         ? 0
46
+         : (psz <= 2)              ? (0x200 << psz)
47
+         : (sblk == 1 || psz == 3) ?  4096
48
+         : (sblk == 2 || psz == 4) ?  8192
49
+         : (sblk <= 4 || psz == 5) ? 16384
50
+         : (sblk >= 9 && psz == 7) ? 65536
51
+                                   : 32768;
52
+}
53
+
54
+bool PersistentStore::access_start() {
55
+  NVMCTRL->SEECFG.reg = NVMCTRL_SEECFG_WMODE_BUFFERED;  // Buffered mode and segment reallocation active
56
+  if (NVMCTRL->SEESTAT.bit.RLOCK)
57
+    NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE);    // Unlock E2P data write access
58
+  return true;
59
+}
60
+
61
+bool PersistentStore::access_finish() {
62
+  NVMCTRL_FLUSH();
63
+  if (!NVMCTRL->SEESTAT.bit.LOCK)
64
+    NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_LSEE);    // Lock E2P data write access
65
+  return true;
66
+}
67
+
68
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
69
+  while (size--) {
70
+    const uint8_t v = *value;
71
+    SYNC(NVMCTRL->SEESTAT.bit.BUSY);
72
+    if (NVMCTRL->INTFLAG.bit.SEESFULL)
73
+      NVMCTRL_FLUSH();      // Next write will trigger a sector reallocation. I need to flush 'pagebuffer'
74
+    ((volatile uint8_t *)SEEPROM_ADDR)[pos] = v;
75
+    SYNC(!NVMCTRL->INTFLAG.bit.SEEWRC);
76
+    crc16(crc, &v, 1);
77
+    pos++;
78
+    value++;
79
+  }
80
+  return false;
81
+}
82
+
83
+bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
84
+  while (size--) {
85
+    SYNC(NVMCTRL->SEESTAT.bit.BUSY);
86
+    uint8_t c = ((volatile uint8_t *)SEEPROM_ADDR)[pos];
87
+    if (writing) *value = c;
88
+    crc16(crc, &c, 1);
89
+    pos++;
90
+    value++;
91
+  }
92
+  return false;
93
+}
94
+
95
+#endif // FLASH_EEPROM_EMULATION
96
+#endif // __SAMD51__

+ 71
- 0
Marlin/src/HAL/SAMD51/eeprom_qspi.cpp View File

@@ -0,0 +1,71 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ *
4
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
+ * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
+ *
20
+ */
21
+#ifdef __SAMD51__
22
+
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(QSPI_EEPROM)
26
+
27
+#include "../shared/eeprom_api.h"
28
+
29
+#include "QSPIFlash.h"
30
+
31
+static bool initialized;
32
+
33
+size_t PersistentStore::capacity() { return qspi.size(); }
34
+
35
+bool PersistentStore::access_start() {
36
+  if (!initialized) {
37
+    qspi.begin();
38
+    initialized = true;
39
+  }
40
+  return true;
41
+}
42
+
43
+bool PersistentStore::access_finish() {
44
+  qspi.flush();
45
+  return true;
46
+}
47
+
48
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
49
+  while (size--) {
50
+    const uint8_t v = *value;
51
+    qspi.writeByte(pos, v);
52
+    crc16(crc, &v, 1);
53
+    pos++;
54
+    value++;
55
+  }
56
+  return false;
57
+}
58
+
59
+bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
60
+  while (size--) {
61
+    uint8_t c = qspi.readByte(pos);
62
+    if (writing) *value = c;
63
+    crc16(crc, &c, 1);
64
+    pos++;
65
+    value++;
66
+  }
67
+  return false;
68
+}
69
+
70
+#endif // QSPI_EEPROM
71
+#endif // __SAMD51__

+ 1
- 3
Marlin/src/HAL/SAMD51/inc/Conditionals_post.h View File

@@ -21,8 +21,6 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if USE_EMULATED_EEPROM
25
-  #undef SRAM_EEPROM_EMULATION
26
-  #undef SDCARD_EEPROM_EMULATION
24
+#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
27 25
   #define FLASH_EEPROM_EMULATION
28 26
 #endif

+ 0
- 129
Marlin/src/HAL/SAMD51/persistent_store_eeprom.cpp View File

@@ -1,129 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- *
4
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
- * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
6
- *
7
- * This program is free software: you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation, either version 3 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
- *
20
- */
21
-
22
-#ifdef __SAMD51__
23
-
24
-#include "../../inc/MarlinConfig.h"
25
-
26
-#if ENABLED(EEPROM_SETTINGS)
27
-
28
-#include "../shared/persistent_store_api.h"
29
-
30
-#if ENABLED(FLASH_EEPROM_EMULATION)
31
-  #define NVMCTRL_CMD(c)    do{                                                 \
32
-                              SYNC(!NVMCTRL->STATUS.bit.READY);                 \
33
-                              NVMCTRL->INTFLAG.bit.DONE = true;                 \
34
-                              NVMCTRL->CTRLB.reg = c | NVMCTRL_CTRLB_CMDEX_KEY; \
35
-                              SYNC(NVMCTRL->INTFLAG.bit.DONE);                  \
36
-                            }while(0)
37
-  #define NVMCTRL_FLUSH()   do{                                           \
38
-                              if (NVMCTRL->SEESTAT.bit.LOAD)              \
39
-                                NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_SEEFLUSH);  \
40
-                            }while(0)
41
-#endif
42
-
43
-bool PersistentStore::access_start() {
44
-  #if ENABLED(FLASH_EEPROM_EMULATION)
45
-    NVMCTRL->SEECFG.reg = NVMCTRL_SEECFG_WMODE_BUFFERED;  // Buffered mode and segment reallocation active
46
-  #endif
47
-
48
-  return true;
49
-}
50
-
51
-bool PersistentStore::access_finish() {
52
-  #if ENABLED(FLASH_EEPROM_EMULATION)
53
-    NVMCTRL_FLUSH();
54
-    if (!NVMCTRL->SEESTAT.bit.LOCK)
55
-      NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_LSEE);    // Lock E2P data write access
56
-  #endif
57
-
58
-  return true;
59
-}
60
-
61
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
62
-  #if ENABLED(FLASH_EEPROM_EMULATION)
63
-    if (NVMCTRL->SEESTAT.bit.RLOCK)
64
-      NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE);    // Unlock E2P data write access
65
-  #endif
66
-
67
-  while (size--) {
68
-    const uint8_t v = *value;
69
-    #if ENABLED(FLASH_EEPROM_EMULATION)
70
-      SYNC(NVMCTRL->SEESTAT.bit.BUSY);
71
-      if (NVMCTRL->INTFLAG.bit.SEESFULL)
72
-        NVMCTRL_FLUSH();      // Next write will trigger a sector reallocation. I need to flush 'pagebuffer'
73
-      ((volatile uint8_t *)SEEPROM_ADDR)[pos] = v;
74
-      SYNC(!NVMCTRL->INTFLAG.bit.SEEWRC);
75
-    #else
76
-      uint8_t * const p = (uint8_t * const)pos;
77
-      if (v != eeprom_read_byte(p)) {
78
-        eeprom_write_byte(p, v);
79
-        delay(2);
80
-        if (eeprom_read_byte(p) != v) {
81
-          SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
82
-          return true;
83
-        }
84
-      }
85
-    #endif
86
-    crc16(crc, &v, 1);
87
-    pos++;
88
-    value++;
89
-  }
90
-  return false;
91
-}
92
-
93
-bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
94
-  while (size--) {
95
-    uint8_t c;
96
-    #if ENABLED(FLASH_EEPROM_EMULATION)
97
-      SYNC(NVMCTRL->SEESTAT.bit.BUSY);
98
-      c = ((volatile uint8_t *)SEEPROM_ADDR)[pos];
99
-    #else
100
-      c = eeprom_read_byte((uint8_t*)pos);
101
-    #endif
102
-    if (writing) *value = c;
103
-    crc16(crc, &c, 1);
104
-    pos++;
105
-    value++;
106
-  }
107
-  return false;
108
-}
109
-
110
-size_t PersistentStore::capacity() {
111
-  #if ENABLED(FLASH_EEPROM_EMULATION)
112
-    const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ,
113
-                  sblk = NVMCTRL->SEESTAT.bit.SBLK;
114
-
115
-         if (!psz && !sblk)         return     0;
116
-    else if (psz <= 2)              return (0x200 << psz);
117
-    else if (sblk == 1 || psz == 3) return  4096;
118
-    else if (sblk == 2 || psz == 4) return  8192;
119
-    else if (sblk <= 4 || psz == 5) return 16384;
120
-    else if (sblk >= 9 && psz == 7) return 65536;
121
-    else                            return 32768;
122
-  #else
123
-    return E2END + 1;
124
-  #endif
125
-}
126
-
127
-#endif // EEPROM_SETTINGS
128
-
129
-#endif // __SAMD51__

Marlin/src/HAL/STM32/persistent_store_flash.cpp → Marlin/src/HAL/STM32/eeprom_flash.cpp View File

@@ -27,7 +27,7 @@
27 27
 
28 28
 #if BOTH(EEPROM_SETTINGS, FLASH_EEPROM_EMULATION)
29 29
 
30
-#include "../shared/persistent_store_api.h"
30
+#include "../shared/eeprom_api.h"
31 31
 
32 32
 
33 33
 // Only STM32F4 can support wear leveling at this time

Marlin/src/HAL/STM32/persistent_store_impl.cpp → Marlin/src/HAL/STM32/eeprom_impl.cpp View File

@@ -24,9 +24,9 @@
24 24
 
25 25
 #include "../../inc/MarlinConfig.h"
26 26
 
27
-#if EITHER(USE_REAL_EEPROM, SRAM_EEPROM_EMULATION)
27
+#if EITHER(USE_WIRED_EEPROM, SRAM_EEPROM_EMULATION)
28 28
 
29
-#include "../shared/persistent_store_api.h"
29
+#include "../shared/eeprom_api.h"
30 30
 
31 31
 bool PersistentStore::access_start() {
32 32
   return true;
@@ -41,7 +41,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
41 41
     uint8_t v = *value;
42 42
 
43 43
     // Save to either external EEPROM, program flash or Backup SRAM
44
-    #if USE_REAL_EEPROM
44
+    #if USE_WIRED_EEPROM
45 45
       // EEPROM has only ~100,000 write cycles,
46 46
       // so only write bytes that have changed!
47 47
       uint8_t * const p = (uint8_t * const)pos;
@@ -68,7 +68,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
68 68
   do {
69 69
     // Read from either external EEPROM, program flash or Backup SRAM
70 70
     const uint8_t c = (
71
-      #if USE_REAL_EEPROM
71
+      #if USE_WIRED_EEPROM
72 72
         eeprom_read_byte((uint8_t*)pos)
73 73
       #else
74 74
         (*(__IO uint8_t *)(BKPSRAM_BASE + ((uint8_t*)pos)))
@@ -85,7 +85,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
85 85
 
86 86
 size_t PersistentStore::capacity() {
87 87
   return (
88
-    #if USE_REAL_EEPROM
88
+    #if USE_WIRED_EEPROM
89 89
       E2END + 1
90 90
     #else
91 91
       4096 // 4kB
@@ -93,5 +93,5 @@ size_t PersistentStore::capacity() {
93 93
   );
94 94
 }
95 95
 
96
-#endif // USE_REAL_EEPROM || SRAM_EEPROM_EMULATION
96
+#endif // USE_WIRED_EEPROM || SRAM_EEPROM_EMULATION
97 97
 #endif // ARDUINO_ARCH_STM32 && !STM32GENERIC

Marlin/src/HAL/STM32/persistent_store_sdcard.cpp → Marlin/src/HAL/STM32/eeprom_sdcard.cpp View File

@@ -30,7 +30,7 @@
30 30
 
31 31
 #if ENABLED(SDCARD_EEPROM_EMULATION)
32 32
 
33
-#include "../shared/persistent_store_api.h"
33
+#include "../shared/eeprom_api.h"
34 34
 
35 35
 #ifndef E2END
36 36
   #define E2END 0xFFF // 4KB

+ 1
- 1
Marlin/src/HAL/STM32/inc/Conditionals_post.h View File

@@ -22,6 +22,6 @@
22 22
 #pragma once
23 23
 
24 24
 // If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
25
-#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
25
+#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
26 26
   #define SDCARD_EEPROM_EMULATION
27 27
 #endif

Marlin/src/HAL/STM32F1/persistent_store_eeprom.cpp → Marlin/src/HAL/STM32F1/eeprom.cpp View File

@@ -22,9 +22,9 @@
22 22
 
23 23
 #include "../../inc/MarlinConfig.h"
24 24
 
25
-#if USE_REAL_EEPROM
25
+#if USE_WIRED_EEPROM
26 26
 
27
-#include "../shared/persistent_store_api.h"
27
+#include "../shared/eeprom_api.h"
28 28
 
29 29
 bool PersistentStore::access_start() {
30 30
   #if ENABLED(SPI_EEPROM)
@@ -73,5 +73,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
73 73
 
74 74
 size_t PersistentStore::capacity() { return E2END + 1; }
75 75
 
76
-#endif // USE_REAL_EEPROM
76
+#endif // USE_WIRED_EEPROM
77 77
 #endif // __STM32F1__

Marlin/src/HAL/STM32F1/persistent_store_flash.cpp → Marlin/src/HAL/STM32F1/eeprom_flash.cpp View File

@@ -31,10 +31,9 @@
31 31
 
32 32
 #include "../../inc/MarlinConfig.h"
33 33
 
34
-// This is for EEPROM emulation in flash
35
-#if BOTH(EEPROM_SETTINGS, FLASH_EEPROM_EMULATION)
34
+#if ENABLED(FLASH_EEPROM_EMULATION)
36 35
 
37
-#include "../shared/persistent_store_api.h"
36
+#include "../shared/eeprom_api.h"
38 37
 
39 38
 #include <flash_stm32.h>
40 39
 #include <EEPROM.h>
@@ -108,5 +107,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin
108 107
 
109 108
 size_t PersistentStore::capacity() { return EEPROM_SIZE; }
110 109
 
111
-#endif // EEPROM_SETTINGS && EEPROM FLASH
110
+#endif // FLASH_EEPROM_EMULATION
112 111
 #endif // __STM32F1__

Marlin/src/HAL/STM32F1/persistent_store_sdcard.cpp → Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp View File

@@ -31,7 +31,7 @@
31 31
 
32 32
 #if ENABLED(SDCARD_EEPROM_EMULATION)
33 33
 
34
-#include "../shared/persistent_store_api.h"
34
+#include "../shared/eeprom_api.h"
35 35
 
36 36
 #ifndef E2END
37 37
   #define E2END 0xFFF // 4KB
@@ -101,5 +101,4 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin
101 101
 size_t PersistentStore::capacity() { return HAL_EEPROM_SIZE; }
102 102
 
103 103
 #endif // SDCARD_EEPROM_EMULATION
104
-
105 104
 #endif // __STM32F1__

Marlin/src/HAL/STM32_F4_F7/persistent_store_eeprom.cpp → Marlin/src/HAL/STM32_F4_F7/eeprom.cpp View File

@@ -27,7 +27,7 @@
27 27
 
28 28
 #if ENABLED(EEPROM_SETTINGS)
29 29
 
30
-#include "../shared/persistent_store_api.h"
30
+#include "../shared/eeprom_api.h"
31 31
 
32 32
 bool PersistentStore::access_start() { return true; }
33 33
 bool PersistentStore::access_finish() { return true; }

+ 1
- 1
Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h View File

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 #if ENABLED(EEPROM_SETTINGS) && defined(STM32F7)
25
-  #undef USE_REAL_EEPROM
25
+  #undef USE_WIRED_EEPROM
26 26
   #undef SRAM_EEPROM_EMULATION
27 27
   #undef SDCARD_EEPROM_EMULATION
28 28
   #define FLASH_EEPROM_EMULATION

Marlin/src/HAL/TEENSY31_32/persistent_store_impl.cpp → Marlin/src/HAL/TEENSY31_32/eeprom_impl.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #if ENABLED(EEPROM_SETTINGS)
24 24
 
25
-#include "../shared/persistent_store_api.h"
25
+#include "../shared/eeprom_api.h"
26 26
 
27 27
 bool PersistentStore::access_start() { return true; }
28 28
 bool PersistentStore::access_finish() { return true; }

+ 1
- 1
Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h View File

@@ -22,6 +22,6 @@
22 22
 #pragma once
23 23
 
24 24
 // If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
25
-#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
25
+#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
26 26
   #define SDCARD_EEPROM_EMULATION
27 27
 #endif

Marlin/src/HAL/TEENSY35_36/persistent_store_eeprom.cpp → Marlin/src/HAL/TEENSY35_36/eeprom.cpp View File

@@ -27,7 +27,7 @@
27 27
 
28 28
 #if ENABLED(EEPROM_SETTINGS)
29 29
 
30
-#include "../shared/persistent_store_api.h"
30
+#include "../shared/eeprom_api.h"
31 31
 #include <avr/eeprom.h>
32 32
 
33 33
 bool PersistentStore::access_start() { return true; }

Marlin/src/HAL/shared/persistent_store_api.cpp → Marlin/src/HAL/shared/eeprom_api.cpp View File

@@ -24,7 +24,7 @@
24 24
 
25 25
 #if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
26 26
 
27
-  #include "persistent_store_api.h"
27
+  #include "eeprom_api.h"
28 28
   PersistentStore persistentStore;
29 29
 
30 30
 #endif

Marlin/src/HAL/shared/persistent_store_api.h → Marlin/src/HAL/shared/eeprom_api.h View File


+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -27,7 +27,7 @@
27 27
   #include "../bedlevel.h"
28 28
 
29 29
   #include "../../../MarlinCore.h"
30
-  #include "../../../HAL/shared/persistent_store_api.h"
30
+  #include "../../../HAL/shared/eeprom_api.h"
31 31
   #include "../../../libs/hex_print_routines.h"
32 32
   #include "../../../module/configuration_store.h"
33 33
   #include "../../../lcd/ultralcd.h"

+ 7
- 4
Marlin/src/inc/Conditionals_post.h View File

@@ -35,16 +35,19 @@
35 35
   #define HAS_LINEAR_E_JERK 1
36 36
 #endif
37 37
 
38
-// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
38
+// Determine which type of 'EEPROM' is in use
39 39
 #if ENABLED(EEPROM_SETTINGS)
40
-  #if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && EITHER(I2C_EEPROM, SPI_EEPROM)
41
-    #define USE_REAL_EEPROM 1
40
+  // EEPROM type may be defined by compile flags, configs, HALs, or pins
41
+  // Set additional flags to let HALs choose in their Conditionals_post.h
42
+  #if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM)
43
+    #define USE_WIRED_EEPROM    1
42 44
   #else
43
-    #define USE_EMULATED_EEPROM 1
45
+    #define USE_FALLBACK_EEPROM 1
44 46
   #endif
45 47
 #else
46 48
   #undef I2C_EEPROM
47 49
   #undef SPI_EEPROM
50
+  #undef QSPI_EEPROM
48 51
   #undef SDCARD_EEPROM_EMULATION
49 52
   #undef SRAM_EEPROM_EMULATION
50 53
   #undef FLASH_EEPROM_EMULATION

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp View File

@@ -252,7 +252,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
252 252
 }
253 253
 
254 254
 #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
255
-  #include "../../../../../HAL/shared/persistent_store_api.h"
255
+  #include "../../../../../HAL/shared/eeprom_api.h"
256 256
 
257 257
   bool restoreEEPROM() {
258 258
     uint8_t data[ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE];

+ 1
- 1
Marlin/src/module/configuration_store.cpp View File

@@ -57,7 +57,7 @@
57 57
 #include "../MarlinCore.h"
58 58
 
59 59
 #if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
60
-  #include "../HAL/shared/persistent_store_api.h"
60
+  #include "../HAL/shared/eeprom_api.h"
61 61
 #endif
62 62
 
63 63
 #include "probe.h"

+ 1
- 1
Marlin/src/module/configuration_store.h View File

@@ -24,7 +24,7 @@
24 24
 #include "../inc/MarlinConfig.h"
25 25
 
26 26
 #if ENABLED(EEPROM_SETTINGS)
27
-  #include "../HAL/shared/persistent_store_api.h"
27
+  #include "../HAL/shared/eeprom_api.h"
28 28
 #endif
29 29
 
30 30
 class MarlinSettings {

+ 1
- 1
Marlin/src/module/printcounter.cpp View File

@@ -35,7 +35,7 @@ Stopwatch print_job_timer;      // Global Print Job Timer instance
35 35
 
36 36
 #include "printcounter.h"
37 37
 #include "../MarlinCore.h"
38
-#include "../HAL/shared/persistent_store_api.h"
38
+#include "../HAL/shared/eeprom_api.h"
39 39
 
40 40
 #if HAS_BUZZER && SERVICE_WARNING_BUZZES > 0
41 41
   #include "../libs/buzzer.h"

+ 2
- 2
Marlin/src/module/printcounter.h View File

@@ -28,7 +28,7 @@
28 28
 // Print debug messages with M111 S2
29 29
 //#define DEBUG_PRINTCOUNTER
30 30
 
31
-#if USE_REAL_EEPROM
31
+#if USE_WIRED_EEPROM
32 32
   // round up address to next page boundary (assuming 32 byte pages)
33 33
   #define STATS_EEPROM_ADDRESS 0x40
34 34
 #else
@@ -57,7 +57,7 @@ class PrintCounter: public Stopwatch {
57 57
   private:
58 58
     typedef Stopwatch super;
59 59
 
60
-    #if USE_REAL_EEPROM || defined(CPU_32_BIT)
60
+    #if USE_WIRED_EEPROM || defined(CPU_32_BIT)
61 61
       typedef uint32_t eeprom_address_t;
62 62
     #else
63 63
       typedef uint16_t eeprom_address_t;

+ 2
- 1
Marlin/src/pins/samd/pins_RAMPS_144.h View File

@@ -44,8 +44,9 @@
44 44
 //
45 45
 // EEPROM
46 46
 //
47
-#define E2END 0x7FFF                              // 32Kb (24lc256)
47
+//#define QSPI_EEPROM                             // Use AGCM4 onboard QSPI EEPROM (Uses 4K of RAM)
48 48
 #define I2C_EEPROM                                // EEPROM on I2C-0
49
+#define E2END 0x7FFF                              // 32K (24lc256)
49 50
 
50 51
 //
51 52
 // Limit Switches

+ 1
- 0
platformio.ini View File

@@ -792,6 +792,7 @@ build_unflags  = -std=gnu++11
792 792
 src_filter     = ${common.default_src_filter} +<src/HAL/SAMD51>
793 793
 lib_deps       = ${common.lib_deps}
794 794
   SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
795
+  Adafruit_SPIFlash=https://github.com/adafruit/Adafruit_SPIFlash/archive/master.zip
795 796
 debug_tool     = jlink
796 797
 
797 798
 #

Loading…
Cancel
Save