Browse Source

Compile only selected PIO environment (#11519)

Dave Johnson 5 years ago
parent
commit
c64199941e
58 changed files with 248 additions and 84 deletions
  1. 1
    1
      Marlin/src/HAL/HAL_AVR/HAL.h
  2. 1
    1
      Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp
  3. 51
    0
      Marlin/src/HAL/HAL_AVR/persistent_store_impl.cpp
  4. 2
    2
      Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
  5. 1
    1
      Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp
  6. 2
    2
      Marlin/src/HAL/HAL_DUE/HAL.h
  7. 1
    1
      Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
  8. 1
    1
      Marlin/src/HAL/HAL_DUE/Servo_Due.cpp
  9. 3
    3
      Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp
  10. 59
    0
      Marlin/src/HAL/HAL_DUE/persistent_store_impl.cpp
  11. 1
    1
      Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
  12. 2
    2
      Marlin/src/HAL/HAL_ESP32/HAL.h
  13. 1
    1
      Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
  14. 1
    1
      Marlin/src/HAL/HAL_LPC1768/HAL.cpp
  15. 2
    2
      Marlin/src/HAL/HAL_LPC1768/HAL.h
  16. 1
    1
      Marlin/src/HAL/HAL_LPC1768/arduino.cpp
  17. 1
    1
      Marlin/src/HAL/HAL_LPC1768/include/SPI.h
  18. 1
    1
      Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.cpp
  19. 1
    1
      Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h
  20. 1
    1
      Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
  21. 1
    1
      Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
  22. 2
    2
      Marlin/src/HAL/HAL_STM32F1/HAL.h
  23. 1
    1
      Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
  24. 1
    1
      Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
  25. 2
    1
      Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp
  26. 2
    2
      Marlin/src/HAL/HAL_STM32F4/HAL.h
  27. 1
    1
      Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
  28. 1
    1
      Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp
  29. 2
    2
      Marlin/src/HAL/HAL_STM32F7/HAL.h
  30. 1
    1
      Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
  31. 2
    2
      Marlin/src/HAL/HAL_STM32F7/persistent_store_eeprom.cpp
  32. 1
    1
      Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
  33. 2
    2
      Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
  34. 1
    1
      Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp
  35. 51
    0
      Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp
  36. 1
    1
      Marlin/src/HAL/persistent_store_api.cpp
  37. 1
    1
      Marlin/src/HAL/shared/Delay.h
  38. 0
    0
      Marlin/src/HAL/shared/HAL_SPI.h
  39. 1
    1
      Marlin/src/HAL/shared/I2cEeprom.cpp
  40. 1
    1
      Marlin/src/HAL/shared/SpiEeprom.cpp
  41. 1
    1
      Marlin/src/HAL/shared/math_32bit.h
  42. 0
    0
      Marlin/src/HAL/shared/persistent_store_api.h
  43. 0
    0
      Marlin/src/HAL/shared/platforms.h
  44. 1
    1
      Marlin/src/HAL/shared/servo.cpp
  45. 3
    3
      Marlin/src/HAL/shared/servo.h
  46. 2
    2
      Marlin/src/HAL/shared/servo_private.h
  47. 1
    1
      Marlin/src/feature/Max7219_Debug_LEDs.cpp
  48. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  49. 1
    1
      Marlin/src/feature/dac/dac_dac084s085.cpp
  50. 1
    1
      Marlin/src/inc/MarlinConfigPre.h
  51. 1
    1
      Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp
  52. 1
    1
      Marlin/src/module/configuration_store.cpp
  53. 2
    1
      Marlin/src/module/configuration_store.h
  54. 1
    1
      Marlin/src/module/printcounter.cpp
  55. 1
    1
      Marlin/src/module/servo.h
  56. 1
    1
      Marlin/src/module/stepper.cpp
  57. 1
    1
      Marlin/src/module/temperature.cpp
  58. 20
    19
      platformio.ini

+ 1
- 1
Marlin/src/HAL/HAL_AVR/HAL.h View File

34
 #include <avr/interrupt.h>
34
 #include <avr/interrupt.h>
35
 #include <avr/io.h>
35
 #include <avr/io.h>
36
 
36
 
37
-#include "../HAL_SPI.h"
37
+#include "../shared/HAL_SPI.h"
38
 #include "fastio_AVR.h"
38
 #include "fastio_AVR.h"
39
 #include "watchdog_AVR.h"
39
 #include "watchdog_AVR.h"
40
 #include "math_AVR.h"
40
 #include "math_AVR.h"

+ 1
- 1
Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp View File

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

+ 51
- 0
Marlin/src/HAL/HAL_AVR/persistent_store_impl.cpp View File

1
+#ifdef __AVR__
2
+
3
+#include "../shared/persistent_store_api.h"
4
+
5
+#include "../../inc/MarlinConfig.h"
6
+
7
+#if ENABLED(EEPROM_SETTINGS)
8
+
9
+namespace HAL {
10
+namespace PersistentStore {
11
+
12
+bool access_start() { return true; }
13
+bool access_finish() { return true; }
14
+
15
+bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
16
+  while (size--) {
17
+    uint8_t * const p = (uint8_t * const)pos;
18
+    uint8_t v = *value;
19
+    // EEPROM has only ~100,000 write cycles,
20
+    // so only write bytes that have changed!
21
+    if (v != eeprom_read_byte(p)) {
22
+      eeprom_write_byte(p, v);
23
+      if (eeprom_read_byte(p) != v) {
24
+        SERIAL_ECHO_START();
25
+        SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
26
+        return true;
27
+      }
28
+    }
29
+    crc16(crc, &v, 1);
30
+    pos++;
31
+    value++;
32
+  };
33
+  return false;
34
+}
35
+
36
+bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
37
+  do {
38
+    uint8_t c = eeprom_read_byte((unsigned char*)pos);
39
+    if (writing) *value = c;
40
+    crc16(crc, &c, 1);
41
+    pos++;
42
+    value++;
43
+  } while (--size);
44
+  return false;  // always assume success for AVR's
45
+}
46
+
47
+}
48
+}
49
+
50
+#endif // EEPROM_SETTINGS
51
+#endif // __AVR__

+ 2
- 2
Marlin/src/HAL/HAL_AVR/servo_AVR.cpp View File

60
 #include <avr/interrupt.h>
60
 #include <avr/interrupt.h>
61
 #include <Arduino.h>
61
 #include <Arduino.h>
62
 
62
 
63
-#include "../servo.h"
64
-#include "../servo_private.h"
63
+#include "../shared/servo.h"
64
+#include "../shared/servo_private.h"
65
 
65
 
66
 static volatile int8_t Channel[_Nbr_16timers];              // counter for the servo being pulsed for each timer (or -1 if refresh interval)
66
 static volatile int8_t Channel[_Nbr_16timers];              // counter for the servo being pulsed for each timer (or -1 if refresh interval)
67
 
67
 

+ 1
- 1
Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp View File

31
 
31
 
32
 #ifdef ARDUINO_ARCH_SAM
32
 #ifdef ARDUINO_ARCH_SAM
33
 
33
 
34
-#include "../persistent_store_api.h"
34
+#include "../shared/persistent_store_api.h"
35
 #include "../../inc/MarlinConfig.h"
35
 #include "../../inc/MarlinConfig.h"
36
 
36
 
37
 #if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
37
 #if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)

+ 2
- 2
Marlin/src/HAL/HAL_DUE/HAL.h View File

35
 
35
 
36
 #include <Arduino.h>
36
 #include <Arduino.h>
37
 
37
 
38
-#include "../math_32bit.h"
39
-#include "../HAL_SPI.h"
38
+#include "../shared/math_32bit.h"
39
+#include "../shared/HAL_SPI.h"
40
 #include "fastio_Due.h"
40
 #include "fastio_Due.h"
41
 #include "watchdog_Due.h"
41
 #include "watchdog_Due.h"
42
 #include "HAL_timers_Due.h"
42
 #include "HAL_timers_Due.h"

+ 1
- 1
Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp View File

42
 // --------------------------------------------------------------------------
42
 // --------------------------------------------------------------------------
43
 
43
 
44
 #include "../../inc/MarlinConfig.h"
44
 #include "../../inc/MarlinConfig.h"
45
-#include "../Delay.h"
45
+#include "../shared/Delay.h"
46
 
46
 
47
 // --------------------------------------------------------------------------
47
 // --------------------------------------------------------------------------
48
 // Public Variables
48
 // Public Variables

+ 1
- 1
Marlin/src/HAL/HAL_DUE/Servo_Due.cpp View File

46
 
46
 
47
 #include <Arduino.h>
47
 #include <Arduino.h>
48
 #include "../servo.h"
48
 #include "../servo.h"
49
-#include "../servo_private.h"
49
+#include "../shared/servo_private.h"
50
 
50
 
51
 static volatile int8_t Channel[_Nbr_16timers];              // counter for the servo being pulsed for each timer (or -1 if refresh interval)
51
 static volatile int8_t Channel[_Nbr_16timers];              // counter for the servo being pulsed for each timer (or -1 if refresh interval)
52
 
52
 

+ 3
- 3
Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp View File

22
  */
22
  */
23
 #ifdef ARDUINO_ARCH_SAM
23
 #ifdef ARDUINO_ARCH_SAM
24
 
24
 
25
-#include "../persistent_store_api.h"
26
-
27
-#include "../../inc/MarlinConfig.h"
25
+#include "../../inc/MarlinConfigPre.h"
28
 
26
 
29
 #if ENABLED(EEPROM_SETTINGS)
27
 #if ENABLED(EEPROM_SETTINGS)
30
 
28
 
29
+#include "../shared/persistent_store_api.h"
30
+
31
 extern void eeprom_flush(void);
31
 extern void eeprom_flush(void);
32
 
32
 
33
 bool PersistentStore::access_start() { return true; }
33
 bool PersistentStore::access_start() { return true; }

+ 59
- 0
Marlin/src/HAL/HAL_DUE/persistent_store_impl.cpp View File

1
+#ifdef ARDUINO_ARCH_SAM
2
+
3
+#include "../shared/persistent_store_api.h"
4
+
5
+#include "../../inc/MarlinConfig.h"
6
+
7
+#if ENABLED(EEPROM_SETTINGS)
8
+
9
+extern void eeprom_flush(void);
10
+
11
+namespace HAL {
12
+namespace PersistentStore {
13
+
14
+bool access_start() { return true; }
15
+
16
+bool access_finish() {
17
+  #if DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
18
+    eeprom_flush();
19
+  #endif
20
+  return true;
21
+}
22
+
23
+bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
24
+  while (size--) {
25
+    uint8_t * const p = (uint8_t * const)pos;
26
+    uint8_t v = *value;
27
+    // EEPROM has only ~100,000 write cycles,
28
+    // so only write bytes that have changed!
29
+    if (v != eeprom_read_byte(p)) {
30
+      eeprom_write_byte(p, v);
31
+      if (eeprom_read_byte(p) != v) {
32
+        SERIAL_ECHO_START();
33
+        SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
34
+        return true;
35
+      }
36
+    }
37
+    crc16(crc, &v, 1);
38
+    pos++;
39
+    value++;
40
+  };
41
+  return false;
42
+}
43
+
44
+bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
45
+  do {
46
+    uint8_t c = eeprom_read_byte((unsigned char*)pos);
47
+    if (writing) *value = c;
48
+    crc16(crc, &c, 1);
49
+    pos++;
50
+    value++;
51
+  } while (--size);
52
+  return false;
53
+}
54
+
55
+}
56
+}
57
+
58
+#endif // EEPROM_SETTINGS
59
+#endif // __AVR__

+ 1
- 1
Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp View File

61
 
61
 
62
 #include <U8glib.h>
62
 #include <U8glib.h>
63
 #include <Arduino.h>
63
 #include <Arduino.h>
64
-#include "../Delay.h"
64
+#include "../shared/Delay.h"
65
 
65
 
66
 void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) {
66
 void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) {
67
    PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
67
    PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,

+ 2
- 2
Marlin/src/HAL/HAL_ESP32/HAL.h View File

40
 #undef DISABLED
40
 #undef DISABLED
41
 #define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
41
 #define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
42
 
42
 
43
-#include "../math_32bit.h"
44
-#include "../HAL_SPI.h"
43
+#include "../shared/math_32bit.h"
44
+#include "../shared/HAL_SPI.h"
45
 
45
 
46
 #include "fastio_ESP32.h"
46
 #include "fastio_ESP32.h"
47
 #include "watchdog_ESP32.h"
47
 #include "watchdog_ESP32.h"

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp View File

28
 // --------------------------------------------------------------------------
28
 // --------------------------------------------------------------------------
29
 
29
 
30
 #include "HAL.h"
30
 #include "HAL.h"
31
-#include "../HAL_SPI.h"
31
+#include "../shared/HAL_SPI.h"
32
 #include "pins_arduino.h"
32
 #include "pins_arduino.h"
33
 #include "spi_pins.h"
33
 #include "spi_pins.h"
34
 #include "../../core/macros.h"
34
 #include "../../core/macros.h"

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/HAL.cpp View File

21
 #ifdef TARGET_LPC1768
21
 #ifdef TARGET_LPC1768
22
 
22
 
23
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
24
-#include "../Delay.h"
24
+#include "../shared/Delay.h"
25
 
25
 
26
 HalSerial usb_serial;
26
 HalSerial usb_serial;
27
 
27
 

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/HAL.h View File

60
 #include <Arduino.h>
60
 #include <Arduino.h>
61
 #include <pinmapping.h>
61
 #include <pinmapping.h>
62
 
62
 
63
-#include "../math_32bit.h"
64
-#include "../HAL_SPI.h"
63
+#include "../shared/math_32bit.h"
64
+#include "../shared/HAL_SPI.h"
65
 #include "fastio.h"
65
 #include "fastio.h"
66
 #include "watchdog.h"
66
 #include "watchdog.h"
67
 #include "serial.h"
67
 #include "serial.h"

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/arduino.cpp View File

26
 #include <lpc17xx_pinsel.h>
26
 #include <lpc17xx_pinsel.h>
27
 
27
 
28
 #include "../../inc/MarlinConfig.h"
28
 #include "../../inc/MarlinConfig.h"
29
-#include "../Delay.h"
29
+#include "../shared/Delay.h"
30
 
30
 
31
 // Interrupts
31
 // Interrupts
32
 void cli(void) { __disable_irq(); } // Disable
32
 void cli(void) { __disable_irq(); } // Disable

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/include/SPI.h View File

22
 
22
 
23
 #pragma once
23
 #pragma once
24
 
24
 
25
-#include "../../HAL_SPI.h"
25
+#include "../../shared/HAL_SPI.h"
26
 
26
 
27
 #include <stdint.h>
27
 #include <stdint.h>
28
 
28
 

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.cpp View File

37
 //
37
 //
38
 //#include <WInterrupts.h>
38
 //#include <WInterrupts.h>
39
 #include "../../../inc/MarlinConfig.h"
39
 #include "../../../inc/MarlinConfig.h"
40
-#include "../../Delay.h"
40
+#include "../../shared/Delay.h"
41
 #include <stdint.h>
41
 #include <stdint.h>
42
 #include <stdarg.h>
42
 #include <stdarg.h>
43
 #include <Arduino.h>
43
 #include <Arduino.h>

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h View File

19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#include "../persistent_store_api.h"
22
+#include "../shared/persistent_store_api.h"
23
 
23
 
24
 //#define FLASH_EEPROM
24
 //#define FLASH_EEPROM

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp View File

61
 
61
 
62
 //#include <inttypes.h>
62
 //#include <inttypes.h>
63
 #include <U8glib.h>
63
 #include <U8glib.h>
64
-#include "../Delay.h"
64
+#include "../shared/Delay.h"
65
 
65
 
66
 #define SPI_FULL_SPEED 0
66
 #define SPI_FULL_SPEED 0
67
 #define SPI_HALF_SPEED 1
67
 #define SPI_HALF_SPEED 1

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp View File

61
 
61
 
62
 #include <U8glib.h>
62
 #include <U8glib.h>
63
 #include "SoftwareSPI.h"
63
 #include "SoftwareSPI.h"
64
-#include "../Delay.h"
64
+#include "../shared/Delay.h"
65
 
65
 
66
 #define SPI_SPEED 3  // About 1 MHz
66
 #define SPI_SPEED 3  // About 1 MHz
67
 
67
 

+ 2
- 2
Marlin/src/HAL/HAL_STM32F1/HAL.h View File

56
 // Includes
56
 // Includes
57
 // --------------------------------------------------------------------------
57
 // --------------------------------------------------------------------------
58
 
58
 
59
-#include "../math_32bit.h"
60
-#include "../HAL_SPI.h"
59
+#include "../shared/math_32bit.h"
60
+#include "../shared/HAL_SPI.h"
61
 
61
 
62
 #include "fastio_Stm32f1.h"
62
 #include "fastio_Stm32f1.h"
63
 #include "watchdog_Stm32f1.h"
63
 #include "watchdog_Stm32f1.h"

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp View File

37
 // --------------------------------------------------------------------------
37
 // --------------------------------------------------------------------------
38
 
38
 
39
 #include "HAL.h"
39
 #include "HAL.h"
40
-#include "../HAL_SPI.h"
40
+#include "../shared/HAL_SPI.h"
41
 #include "pins_arduino.h"
41
 #include "pins_arduino.h"
42
 #include "spi_pins.h"
42
 #include "spi_pins.h"
43
 #include "../../core/macros.h"
43
 #include "../../core/macros.h"

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp View File

34
 // This is for EEPROM emulation in flash
34
 // This is for EEPROM emulation in flash
35
 #if ENABLED(EEPROM_SETTINGS) && ENABLED(FLASH_EEPROM_EMULATION)
35
 #if ENABLED(EEPROM_SETTINGS) && ENABLED(FLASH_EEPROM_EMULATION)
36
 
36
 
37
-#include "../persistent_store_api.h"
37
+#include "../shared/persistent_store_api.h"
38
 
38
 
39
 #include <flash_stm32.h>
39
 #include <flash_stm32.h>
40
 #include <EEPROM.h>
40
 #include <EEPROM.h>

+ 2
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp View File

31
 
31
 
32
 #if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
32
 #if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
33
 
33
 
34
-#include "../persistent_store_api.h"
34
+#include "../shared/persistent_store_api.h"
35
+
35
 #include "../../sd/cardreader.h"
36
 #include "../../sd/cardreader.h"
36
 
37
 
37
 #define HAL_STM32F1_EEPROM_SIZE 4096
38
 #define HAL_STM32F1_EEPROM_SIZE 4096

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL.h View File

43
   #include <USBSerial.h>
43
   #include <USBSerial.h>
44
 #endif
44
 #endif
45
 
45
 
46
-#include "../math_32bit.h"
47
-#include "../HAL_SPI.h"
46
+#include "../shared/math_32bit.h"
47
+#include "../shared/HAL_SPI.h"
48
 #include "fastio_STM32F4.h"
48
 #include "fastio_STM32F4.h"
49
 #include "watchdog_STM32F4.h"
49
 #include "watchdog_STM32F4.h"
50
 
50
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp View File

37
 // --------------------------------------------------------------------------
37
 // --------------------------------------------------------------------------
38
 
38
 
39
 #include "HAL.h"
39
 #include "HAL.h"
40
-#include "../HAL_SPI.h"
40
+#include "../shared/HAL_SPI.h"
41
 #include "pins_arduino.h"
41
 #include "pins_arduino.h"
42
 #include "spi_pins.h"
42
 #include "spi_pins.h"
43
 #include "../../core/macros.h"
43
 #include "../../core/macros.h"

+ 1
- 1
Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp View File

23
 
23
 
24
 #if defined(STM32F4) || defined(STM32F4xx)
24
 #if defined(STM32F4) || defined(STM32F4xx)
25
 
25
 
26
-#include "../persistent_store_api.h"
26
+#include "../shared/persistent_store_api.h"
27
 
27
 
28
 #include "../../inc/MarlinConfig.h"
28
 #include "../../inc/MarlinConfig.h"
29
 
29
 

+ 2
- 2
Marlin/src/HAL/HAL_STM32F7/HAL.h View File

39
 
39
 
40
 #include "Arduino.h"
40
 #include "Arduino.h"
41
 
41
 
42
-#include "../math_32bit.h"
43
-#include "../HAL_SPI.h"
42
+#include "../shared/math_32bit.h"
43
+#include "../shared/HAL_SPI.h"
44
 
44
 
45
 #include "fastio_STM32F7.h"
45
 #include "fastio_STM32F7.h"
46
 #include "watchdog_STM32F7.h"
46
 #include "watchdog_STM32F7.h"

+ 1
- 1
Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp View File

37
 // --------------------------------------------------------------------------
37
 // --------------------------------------------------------------------------
38
 
38
 
39
 #include "HAL.h"
39
 #include "HAL.h"
40
-#include "../HAL_SPI.h"
40
+#include "../shared/HAL_SPI.h"
41
 #include "pins_arduino.h"
41
 #include "pins_arduino.h"
42
 #include "spi_pins.h"
42
 #include "spi_pins.h"
43
 #include "../../core/macros.h"
43
 #include "../../core/macros.h"

+ 2
- 2
Marlin/src/HAL/HAL_STM32F7/persistent_store_eeprom.cpp View File

23
 
23
 
24
 #ifdef STM32F7
24
 #ifdef STM32F7
25
 
25
 
26
-#include "../../inc/MarlinConfig.h"
26
+#include "../../inc/MarlinConfigPre.h"
27
 
27
 
28
 #if ENABLED(EEPROM_SETTINGS)
28
 #if ENABLED(EEPROM_SETTINGS)
29
 
29
 
30
-#include "../persistent_store_api.h"
30
+#include "../shared/persistent_store_api.h"
31
 
31
 
32
 bool PersistentStore::access_start() { return true; }
32
 bool PersistentStore::access_start() { return true; }
33
 bool PersistentStore::access_finish() { return true; }
33
 bool PersistentStore::access_finish() { return true; }

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp View File

26
 #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
26
 #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
27
 
27
 
28
 #include "HAL.h"
28
 #include "HAL.h"
29
-#include "../Delay.h"
29
+#include "../shared/Delay.h"
30
 
30
 
31
 #include <Wire.h>
31
 #include <Wire.h>
32
 
32
 

+ 2
- 2
Marlin/src/HAL/HAL_TEENSY35_36/HAL.h View File

42
 #undef sq
42
 #undef sq
43
 #define sq(x) ((x)*(x))
43
 #define sq(x) ((x)*(x))
44
 
44
 
45
-#include "../math_32bit.h"
46
-#include "../HAL_SPI.h"
45
+#include "../shared/math_32bit.h"
46
+#include "../shared/HAL_SPI.h"
47
 
47
 
48
 #include "fastio_Teensy.h"
48
 #include "fastio_Teensy.h"
49
 #include "watchdog_Teensy.h"
49
 #include "watchdog_Teensy.h"

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp View File

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

+ 51
- 0
Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp View File

1
+#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
2
+
3
+#include "../../inc/MarlinConfig.h"
4
+
5
+#if ENABLED(EEPROM_SETTINGS)
6
+
7
+#include "../shared/persistent_store_api.h"
8
+
9
+namespace HAL {
10
+namespace PersistentStore {
11
+
12
+bool access_start() { return true; }
13
+bool access_finish() { return true; }
14
+
15
+bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
16
+  while (size--) {
17
+    uint8_t * const p = (uint8_t * const)pos;
18
+    uint8_t v = *value;
19
+    // EEPROM has only ~100,000 write cycles,
20
+    // so only write bytes that have changed!
21
+    if (v != eeprom_read_byte(p)) {
22
+      eeprom_write_byte(p, v);
23
+      if (eeprom_read_byte(p) != v) {
24
+        SERIAL_ECHO_START();
25
+        SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
26
+        return true;
27
+      }
28
+    }
29
+    crc16(crc, &v, 1);
30
+    pos++;
31
+    value++;
32
+  };
33
+  return false;
34
+}
35
+
36
+bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
37
+  do {
38
+    uint8_t c = eeprom_read_byte((unsigned char*)pos);
39
+    if (writing) *value = c;
40
+    crc16(crc, &c, 1);
41
+    pos++;
42
+    value++;
43
+  } while (--size);
44
+  return false;
45
+}
46
+
47
+} // PersistentStore
48
+} // HAL
49
+
50
+#endif // EEPROM_SETTINGS
51
+#endif // __MK64FX512__ || __MK66FX1M0__

+ 1
- 1
Marlin/src/HAL/persistent_store_api.cpp View File

24
 
24
 
25
 #if ENABLED(EEPROM_SETTINGS)
25
 #if ENABLED(EEPROM_SETTINGS)
26
 
26
 
27
-  #include "persistent_store_api.h"
27
+  #include "shared/persistent_store_api.h"
28
   PersistentStore persistentStore;
28
   PersistentStore persistentStore;
29
 
29
 
30
 #endif
30
 #endif

Marlin/src/HAL/Delay.h → Marlin/src/HAL/shared/Delay.h View File

31
 #ifndef MARLIN_DELAY_H
31
 #ifndef MARLIN_DELAY_H
32
 #define MARLIN_DELAY_H
32
 #define MARLIN_DELAY_H
33
 
33
 
34
-#include "../core/macros.h"
34
+#include "../../core/macros.h"
35
 
35
 
36
 #if defined(__arm__) || defined(__thumb__)
36
 #if defined(__arm__) || defined(__thumb__)
37
 
37
 

Marlin/src/HAL/HAL_SPI.h → Marlin/src/HAL/shared/HAL_SPI.h View File


Marlin/src/HAL/I2cEeprom.cpp → Marlin/src/HAL/shared/I2cEeprom.cpp View File

25
  * Not platform dependent.
25
  * Not platform dependent.
26
  */
26
  */
27
 
27
 
28
-#include "../inc/MarlinConfig.h"
28
+#include "../../inc/MarlinConfig.h"
29
 
29
 
30
 #if ENABLED(I2C_EEPROM)
30
 #if ENABLED(I2C_EEPROM)
31
 
31
 

Marlin/src/HAL/SpiEeprom.cpp → Marlin/src/HAL/shared/SpiEeprom.cpp View File

25
  * Not platform dependent.
25
  * Not platform dependent.
26
  */
26
  */
27
 
27
 
28
-#include "../inc/MarlinConfig.h"
28
+#include "../../inc/MarlinConfig.h"
29
 
29
 
30
 #if ENABLED(SPI_EEPROM)
30
 #if ENABLED(SPI_EEPROM)
31
 
31
 

Marlin/src/HAL/math_32bit.h → Marlin/src/HAL/shared/math_32bit.h View File

23
 #ifndef MATH_32BIT_H
23
 #ifndef MATH_32BIT_H
24
 #define MATH_32BIT_H
24
 #define MATH_32BIT_H
25
 
25
 
26
-#include "../core/macros.h"
26
+#include "../../core/macros.h"
27
 
27
 
28
 /**
28
 /**
29
  * Math helper functions for 32 bit CPUs
29
  * Math helper functions for 32 bit CPUs

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


Marlin/src/HAL/platforms.h → Marlin/src/HAL/shared/platforms.h View File


Marlin/src/HAL/servo.cpp → Marlin/src/HAL/shared/servo.cpp View File

51
  *
51
  *
52
  */
52
  */
53
 
53
 
54
-#include "../inc/MarlinConfig.h"
54
+#include "../../inc/MarlinConfig.h"
55
 
55
 
56
 #if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768) || defined(STM32F4) || defined(STM32F4xx))
56
 #if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768) || defined(STM32F4) || defined(STM32F4xx))
57
 
57
 

Marlin/src/HAL/servo.h → Marlin/src/HAL/shared/servo.h View File

70
 #define SERVO_H
70
 #define SERVO_H
71
 
71
 
72
 #if IS_32BIT_TEENSY
72
 #if IS_32BIT_TEENSY
73
-  #include "HAL_TEENSY35_36/HAL_Servo_Teensy.h" // Teensy HAL uses an inherited library
73
+  #include "../HAL_TEENSY35_36/HAL_Servo_Teensy.h" // Teensy HAL uses an inherited library
74
 
74
 
75
 #elif defined(TARGET_LPC1768)
75
 #elif defined(TARGET_LPC1768)
76
-  #include "HAL_LPC1768/LPC1768_Servo.h"
76
+  #include "../HAL_LPC1768/LPC1768_Servo.h"
77
 #elif defined(STM32F4) || defined(STM32F4xx)
77
 #elif defined(STM32F4) || defined(STM32F4xx)
78
-  #include "HAL_STM32F4/HAL_Servo_STM32F4.h"
78
+  #include "../HAL_STM32F4/HAL_Servo_STM32F4.h"
79
 #else
79
 #else
80
   #include <stdint.h>
80
   #include <stdint.h>
81
 
81
 

Marlin/src/HAL/servo_private.h → Marlin/src/HAL/shared/servo_private.h View File

46
 
46
 
47
 // Architecture specific include
47
 // Architecture specific include
48
 #ifdef __AVR__
48
 #ifdef __AVR__
49
-  #include "HAL_AVR/ServoTimers.h"
49
+  #include "../HAL_AVR/ServoTimers.h"
50
 #elif defined(ARDUINO_ARCH_SAM)
50
 #elif defined(ARDUINO_ARCH_SAM)
51
-  #include "HAL_DUE/ServoTimers.h"
51
+  #include "../HAL_DUE/ServoTimers.h"
52
 #else
52
 #else
53
   #error "This library only supports boards with an AVR or SAM3X processor."
53
   #error "This library only supports boards with an AVR or SAM3X processor."
54
 #endif
54
 #endif

+ 1
- 1
Marlin/src/feature/Max7219_Debug_LEDs.cpp View File

46
 #include "../module/planner.h"
46
 #include "../module/planner.h"
47
 #include "../module/stepper.h"
47
 #include "../module/stepper.h"
48
 #include "../Marlin.h"
48
 #include "../Marlin.h"
49
-#include "../HAL/Delay.h"
49
+#include "../HAL/shared/Delay.h"
50
 
50
 
51
 uint8_t LEDs[8 * (MAX7219_NUMBER_UNITS)] = { 0 };
51
 uint8_t LEDs[8 * (MAX7219_NUMBER_UNITS)] = { 0 };
52
 
52
 

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

29
   #include "ubl.h"
29
   #include "ubl.h"
30
 
30
 
31
   #include "../../../Marlin.h"
31
   #include "../../../Marlin.h"
32
-  #include "../../../HAL/persistent_store_api.h"
32
+  #include "../../../HAL/shared/persistent_store_api.h"
33
   #include "../../../libs/hex_print_routines.h"
33
   #include "../../../libs/hex_print_routines.h"
34
   #include "../../../module/configuration_store.h"
34
   #include "../../../module/configuration_store.h"
35
   #include "../../../lcd/ultralcd.h"
35
   #include "../../../lcd/ultralcd.h"

+ 1
- 1
Marlin/src/feature/dac/dac_dac084s085.cpp View File

12
 
12
 
13
 #include "../../Marlin.h"
13
 #include "../../Marlin.h"
14
 #include "../../module/stepper.h"
14
 #include "../../module/stepper.h"
15
-#include "../../HAL/Delay.h"
15
+#include "../../HAL/shared/Delay.h"
16
 
16
 
17
 dac084s085::dac084s085() { }
17
 dac084s085::dac084s085() { }
18
 
18
 

+ 1
- 1
Marlin/src/inc/MarlinConfigPre.h View File

23
 #ifndef _MARLIN_CONFIGPRE_H_
23
 #ifndef _MARLIN_CONFIGPRE_H_
24
 #define _MARLIN_CONFIGPRE_H_
24
 #define _MARLIN_CONFIGPRE_H_
25
 
25
 
26
-#include "../HAL/platforms.h"
26
+#include "../HAL/shared/platforms.h"
27
 #include "../core/boards.h"
27
 #include "../core/boards.h"
28
 #include "../core/macros.h"
28
 #include "../core/macros.h"
29
 #include "../core/types.h"
29
 #include "../core/types.h"

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp View File

29
 
29
 
30
 #if !(defined(U8G_HAL_LINKS) || defined(__SAM3X8E__))
30
 #if !(defined(U8G_HAL_LINKS) || defined(__SAM3X8E__))
31
 
31
 
32
-#include "../../HAL/Delay.h"
32
+#include "../../HAL/shared/Delay.h"
33
 
33
 
34
 #define ST7920_CLK_PIN  LCD_PINS_D4
34
 #define ST7920_CLK_PIN  LCD_PINS_D4
35
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE
35
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE

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

344
 }
344
 }
345
 
345
 
346
 #if ENABLED(EEPROM_SETTINGS)
346
 #if ENABLED(EEPROM_SETTINGS)
347
-  #include "../HAL/persistent_store_api.h"
347
+  #include "../HAL/shared/persistent_store_api.h"
348
 
348
 
349
   #define DUMMY_PID_VALUE 3000.0f
349
   #define DUMMY_PID_VALUE 3000.0f
350
   #define EEPROM_START() int eeprom_index = EEPROM_OFFSET; persistentStore.access_start()
350
   #define EEPROM_START() int eeprom_index = EEPROM_OFFSET; persistentStore.access_start()

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

24
 #define CONFIGURATION_STORE_H
24
 #define CONFIGURATION_STORE_H
25
 
25
 
26
 #include "../inc/MarlinConfig.h"
26
 #include "../inc/MarlinConfig.h"
27
+
27
 #if ENABLED(EEPROM_SETTINGS)
28
 #if ENABLED(EEPROM_SETTINGS)
28
-  #include "../HAL/persistent_store_api.h"
29
+  #include "../HAL/shared/persistent_store_api.h"
29
 #endif
30
 #endif
30
 
31
 
31
 #define ADD_PORT_ARG ENABLED(EEPROM_CHITCHAT) && NUM_SERIAL > 1
32
 #define ADD_PORT_ARG ENABLED(EEPROM_CHITCHAT) && NUM_SERIAL > 1

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

31
 
31
 
32
 #include "printcounter.h"
32
 #include "printcounter.h"
33
 #include "../Marlin.h"
33
 #include "../Marlin.h"
34
-#include "../HAL/persistent_store_api.h"
34
+#include "../HAL/shared/persistent_store_api.h"
35
 
35
 
36
 PrintCounter print_job_timer;   // Global Print Job Timer instance
36
 PrintCounter print_job_timer;   // Global Print Job Timer instance
37
 
37
 

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

27
 #ifndef _SERVO_H_
27
 #ifndef _SERVO_H_
28
 #define _SERVO_H_
28
 #define _SERVO_H_
29
 
29
 
30
-#include "../HAL/servo.h"
30
+#include "../HAL/shared/servo.h"
31
 
31
 
32
 extern HAL_SERVO_LIB servo[NUM_SERVOS];
32
 extern HAL_SERVO_LIB servo[NUM_SERVOS];
33
 extern void servo_init();
33
 extern void servo_init();

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

93
 #include "../gcode/queue.h"
93
 #include "../gcode/queue.h"
94
 #include "../sd/cardreader.h"
94
 #include "../sd/cardreader.h"
95
 #include "../Marlin.h"
95
 #include "../Marlin.h"
96
-#include "../HAL/Delay.h"
96
+#include "../HAL/shared/Delay.h"
97
 
97
 
98
 #if MB(ALLIGATOR)
98
 #if MB(ALLIGATOR)
99
   #include "../feature/dac/dac_dac084s085.h"
99
   #include "../feature/dac/dac_dac084s085.h"

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

31
 #include "../lcd/ultralcd.h"
31
 #include "../lcd/ultralcd.h"
32
 #include "planner.h"
32
 #include "planner.h"
33
 #include "../core/language.h"
33
 #include "../core/language.h"
34
-#include "../HAL/Delay.h"
34
+#include "../HAL/shared/Delay.h"
35
 
35
 
36
 #if ENABLED(HEATER_0_USES_MAX6675)
36
 #if ENABLED(HEATER_0_USES_MAX6675)
37
   #include "../libs/private_spi.h"
37
   #include "../libs/private_spi.h"

+ 20
- 19
platformio.ini View File

58
 build_flags       = ${common.build_flags}
58
 build_flags       = ${common.build_flags}
59
 board_build.f_cpu = 16000000L
59
 board_build.f_cpu = 16000000L
60
 lib_deps          = ${common.lib_deps}
60
 lib_deps          = ${common.lib_deps}
61
-src_filter        = ${common.default_src_filter}
61
+src_filter        = ${common.default_src_filter} +<src/HAL/HAL_AVR>
62
 monitor_speed     = 250000
62
 monitor_speed     = 250000
63
 
63
 
64
 #
64
 #
71
 build_flags       = ${common.build_flags}
71
 build_flags       = ${common.build_flags}
72
 board_build.f_cpu = 16000000L
72
 board_build.f_cpu = 16000000L
73
 lib_deps          = ${common.lib_deps}
73
 lib_deps          = ${common.lib_deps}
74
-src_filter        = ${common.default_src_filter}
74
+src_filter        = ${common.default_src_filter} +<src/HAL/HAL_AVR>
75
 monitor_speed     = 250000
75
 monitor_speed     = 250000
76
 
76
 
77
 #
77
 #
88
 build_flags   = ${common.build_flags}
88
 build_flags   = ${common.build_flags}
89
 lib_deps      = ${common.lib_deps}
89
 lib_deps      = ${common.lib_deps}
90
 lib_ldf_mode  = deep+
90
 lib_ldf_mode  = deep+
91
-src_filter    = ${common.default_src_filter}
91
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_AVR>
92
 extra_scripts = pre:buildroot/share/atom/create_custom_upload_command_CDC.py
92
 extra_scripts = pre:buildroot/share/atom/create_custom_upload_command_CDC.py
93
 monitor_speed = 250000
93
 monitor_speed = 250000
94
 
94
 
122
 build_flags   = ${common.build_flags}
122
 build_flags   = ${common.build_flags}
123
 lib_deps      = ${common.lib_deps}
123
 lib_deps      = ${common.lib_deps}
124
 lib_ignore    = c1921b4
124
 lib_ignore    = c1921b4
125
-src_filter    = ${common.default_src_filter}
125
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_DUE>
126
 monitor_speed = 250000
126
 monitor_speed = 250000
127
 [env:DUE_USB]
127
 [env:DUE_USB]
128
 platform      = atmelsam
128
 platform      = atmelsam
131
 build_flags   = ${common.build_flags}
131
 build_flags   = ${common.build_flags}
132
 lib_deps      = ${common.lib_deps}
132
 lib_deps      = ${common.lib_deps}
133
 lib_ignore    = c1921b4
133
 lib_ignore    = c1921b4
134
-src_filter    = ${common.default_src_filter}
134
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_DUE>
135
 monitor_speed = 250000
135
 monitor_speed = 250000
136
 [env:DUE_debug]
136
 [env:DUE_debug]
137
 # Used when WATCHDOG_RESET_MANUAL is enabled
137
 # Used when WATCHDOG_RESET_MANUAL is enabled
143
   -mpoke-function-name
143
   -mpoke-function-name
144
 lib_deps      = ${common.lib_deps}
144
 lib_deps      = ${common.lib_deps}
145
 lib_ignore    = c1921b4
145
 lib_ignore    = c1921b4
146
-src_filter    = ${common.default_src_filter}
146
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_DUE>
147
 monitor_speed = 250000
147
 monitor_speed = 250000
148
 
148
 
149
 #
149
 #
165
   TMC2130Stepper@>=2.2.1
165
   TMC2130Stepper@>=2.2.1
166
   TMC2208Stepper@>=0.2.1
166
   TMC2208Stepper@>=0.2.1
167
 extra_scripts     = Marlin/src/HAL/HAL_LPC1768/debug_extra_script.py, Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py, Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py
167
 extra_scripts     = Marlin/src/HAL/HAL_LPC1768/debug_extra_script.py, Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py, Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py
168
-src_filter        = ${common.default_src_filter}
168
+src_filter        = ${common.default_src_filter} +<src/HAL/HAL_LPC1768>
169
 monitor_speed     = 250000
169
 monitor_speed     = 250000
170
 debug_tool        = custom
170
 debug_tool        = custom
171
 debug_server      =
171
 debug_server      =
187
 build_flags   = ${common.build_flags}
187
 build_flags   = ${common.build_flags}
188
 upload_speed  = 57600
188
 upload_speed  = 57600
189
 lib_deps      = ${common.lib_deps}
189
 lib_deps      = ${common.lib_deps}
190
-src_filter    = ${common.default_src_filter}
190
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_AVR>
191
 monitor_speed = 250000
191
 monitor_speed = 250000
192
 
192
 
193
 #
193
 #
200
 build_flags   = ${common.build_flags}
200
 build_flags   = ${common.build_flags}
201
 upload_speed  = 115200
201
 upload_speed  = 115200
202
 lib_deps      = ${common.lib_deps}
202
 lib_deps      = ${common.lib_deps}
203
-src_filter    = ${common.default_src_filter}
203
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_AVR>
204
 monitor_speed = 250000
204
 monitor_speed = 250000
205
 
205
 
206
 #
206
 #
213
 build_flags       = ${common.build_flags}
213
 build_flags       = ${common.build_flags}
214
 board_build.f_cpu = 16000000L
214
 board_build.f_cpu = 16000000L
215
 lib_deps          = ${common.lib_deps}
215
 lib_deps          = ${common.lib_deps}
216
-src_filter        = ${common.default_src_filter}
216
+src_filter        = ${common.default_src_filter} +<src/HAL/HAL_AVR>
217
 monitor_speed     = 250000
217
 monitor_speed     = 250000
218
 
218
 
219
 #
219
 #
225
 board         = sanguino_atmega644p
225
 board         = sanguino_atmega644p
226
 build_flags   = ${common.build_flags}
226
 build_flags   = ${common.build_flags}
227
 lib_deps      = ${common.lib_deps}
227
 lib_deps      = ${common.lib_deps}
228
-src_filter    = ${common.default_src_filter}
228
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_AVR>
229
 monitor_speed = 250000
229
 monitor_speed = 250000
230
 
230
 
231
 #
231
 #
237
 board         = sanguino_atmega1284p
237
 board         = sanguino_atmega1284p
238
 build_flags   = ${common.build_flags}
238
 build_flags   = ${common.build_flags}
239
 lib_deps      = ${common.lib_deps}
239
 lib_deps      = ${common.lib_deps}
240
-src_filter    = ${common.default_src_filter}
240
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_AVR>
241
 monitor_speed = 250000
241
 monitor_speed = 250000
242
 
242
 
243
 #
243
 #
259
   libf3e
259
   libf3e
260
   TMC26XStepper
260
   TMC26XStepper
261
 lib_ldf_mode  = 1
261
 lib_ldf_mode  = 1
262
-src_filter    = ${common.default_src_filter}
262
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
263
 monitor_speed = 250000
263
 monitor_speed = 250000
264
 
264
 
265
 #
265
 #
272
 build_flags   = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB
272
 build_flags   = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB
273
 lib_deps      = ${common.lib_deps}
273
 lib_deps      = ${common.lib_deps}
274
 lib_ignore    = Adafruit NeoPixel, c1921b4, TMC2130Stepper
274
 lib_ignore    = Adafruit NeoPixel, c1921b4, TMC2130Stepper
275
-src_filter    = ${common.default_src_filter}
275
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F4>
276
 monitor_speed = 250000
276
 monitor_speed = 250000
277
 
277
 
278
 #
278
 #
285
 build_flags   = ${common.build_flags}
285
 build_flags   = ${common.build_flags}
286
 lib_deps      = ${common.lib_deps}
286
 lib_deps      = ${common.lib_deps}
287
 lib_ignore    = Adafruit NeoPixel
287
 lib_ignore    = Adafruit NeoPixel
288
-src_filter    = ${common.default_src_filter}
288
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_TEENSY35_36>
289
 monitor_speed = 250000
289
 monitor_speed = 250000
290
 
290
 
291
 [env:malyanm200]
291
 [env:malyanm200]
293
 framework   = arduino
293
 framework   = arduino
294
 board       = malyanM200
294
 board       = malyanM200
295
 build_flags = !python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py -DMCU_STM32F103CB -D __STM32F1__=1 -std=c++1y -D MOTHERBOARD="BOARD_MALYAN_M200" -DSERIAL_USB -ffunction-sections -fdata-sections -Wl,--gc-sections
295
 build_flags = !python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py -DMCU_STM32F103CB -D __STM32F1__=1 -std=c++1y -D MOTHERBOARD="BOARD_MALYAN_M200" -DSERIAL_USB -ffunction-sections -fdata-sections -Wl,--gc-sections
296
-src_filter  = ${common.default_src_filter}
296
+src_filter  = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
297
 #-<frameworks>
297
 #-<frameworks>
298
 lib_ignore  =
298
 lib_ignore  =
299
   U8glib
299
   U8glib
313
 # Espressif ESP32
313
 # Espressif ESP32
314
 #
314
 #
315
 [env:esp32]
315
 [env:esp32]
316
-platform = https://github.com/platformio/platform-espressif32.git#feature/stage
317
-board = esp32dev
318
-framework = arduino
316
+platform    = https://github.com/platformio/platform-espressif32.git#feature/stage
317
+board       = esp32dev
318
+framework   = arduino
319
 upload_port = COM3
319
 upload_port = COM3
320
 lib_ignore  =
320
 lib_ignore  =
321
   LiquidCrystal_I2C
321
   LiquidCrystal_I2C
324
   LiquidTWI2
324
   LiquidTWI2
325
   TMC26XStepper
325
   TMC26XStepper
326
   c1921b4
326
   c1921b4
327
+src_filter  = ${common.default_src_filter} +<src/HAL/HAL_ESP32>

Loading…
Cancel
Save