Browse Source

Don't include STM32 Core code when compiling STM32 Generic (#12575)

mr-miky 6 years ago
parent
commit
11c7945365

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

21
  *
21
  *
22
  */
22
  */
23
 
23
 
24
-#ifdef ARDUINO_ARCH_STM32
24
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
25
+
25
 
26
 
26
 // --------------------------------------------------------------------------
27
 // --------------------------------------------------------------------------
27
 // Includes
28
 // Includes

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.cpp View File

20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
+
24
 
25
 
25
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
26
 
27
 

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp View File

20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
+
24
 
25
 
25
 // --------------------------------------------------------------------------
26
 // --------------------------------------------------------------------------
26
 // Includes
27
 // Includes

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp 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
-#ifdef ARDUINO_ARCH_STM32
22
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
23
+
23
 
24
 
24
 // --------------------------------------------------------------------------
25
 // --------------------------------------------------------------------------
25
 // Includes
26
 // Includes

+ 1
- 1
Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp View File

20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
 
24
 
25
 #include "../../inc/MarlinConfig.h"
25
 #include "../../inc/MarlinConfig.h"
26
 
26
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp View File

20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
 
24
 
25
 #include "../../inc/MarlinConfig.h"
25
 #include "../../inc/MarlinConfig.h"
26
 
26
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
 
24
 
25
 #include "../../inc/MarlinConfig.h"
25
 #include "../../inc/MarlinConfig.h"
26
 
26
 

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

47
 /** @addtogroup EEPROM_Emulation
47
 /** @addtogroup EEPROM_Emulation
48
   * @{
48
   * @{
49
   */
49
   */
50
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
50
+#if defined(STM32GENERIC) && (defined(STM32F4))
51
 
51
 
52
 /* Includes ------------------------------------------------------------------*/
52
 /* Includes ------------------------------------------------------------------*/
53
 #include "eeprom_emul.h"
53
 #include "eeprom_emul.h"

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp View File

17
  *
17
  *
18
  */
18
  */
19
 
19
 
20
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
20
+#if defined(STM32GENERIC) && (defined(STM32F4))
21
 
21
 
22
 /**
22
 /**
23
  * Description: functions for I2C connected external EEPROM.
23
  * Description: functions for I2C connected external EEPROM.
139
 }
139
 }
140
 
140
 
141
 #endif // ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
141
 #endif // ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
142
-#endif // STM32F4 || STM32F4xx
142
+#endif // STM32GENERIC && STM32F4

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

21
  *
21
  *
22
  */
22
  */
23
 
23
 
24
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
24
+#if defined(STM32GENERIC) && defined(STM32F4)
25
 
25
 
26
 // --------------------------------------------------------------------------
26
 // --------------------------------------------------------------------------
27
 // Includes
27
 // Includes
130
   return HAL_adc_result;
130
   return HAL_adc_result;
131
 }
131
 }
132
 
132
 
133
-#endif // STM32F4 || STM32F4xx
133
+#endif // // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp View File

21
  *
21
  *
22
  */
22
  */
23
 
23
 
24
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
24
+#if defined(STM32GENERIC) && defined(STM32F4)
25
 
25
 
26
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
27
 
27
 
50
 }
50
 }
51
 #endif // HAS_SERVOS
51
 #endif // HAS_SERVOS
52
 
52
 
53
-#endif // STM32F4 || STM32F4xx
53
+#endif // STM32GENERIC && STM32F4

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

30
  * Adapted to the STM32F4 HAL
30
  * Adapted to the STM32F4 HAL
31
  */
31
  */
32
 
32
 
33
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
33
+#if defined(STM32GENERIC) && defined(STM32F4)
34
 
34
 
35
 // --------------------------------------------------------------------------
35
 // --------------------------------------------------------------------------
36
 // Includes
36
 // Includes
173
 
173
 
174
 #endif // SOFTWARE_SPI
174
 #endif // SOFTWARE_SPI
175
 
175
 
176
-#endif // STM32F4 || STM32F4xx
176
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
23
+#if defined(STM32GENERIC) && defined(STM32F4)
24
 
24
 
25
 // --------------------------------------------------------------------------
25
 // --------------------------------------------------------------------------
26
 // Includes
26
 // Includes
156
   return false;
156
   return false;
157
 }
157
 }
158
 
158
 
159
-#endif // STM32F4 || STM32F4xx
159
+#endif // STM32GENERIC && STM32F4

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

21
  *
21
  *
22
  */
22
  */
23
 
23
 
24
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
24
+#if defined(STM32GENERIC) && defined(STM32F4)
25
 
25
 
26
 #include "../shared/persistent_store_api.h"
26
 #include "../shared/persistent_store_api.h"
27
 
27
 
66
 size_t PersistentStore::capacity() { return E2END + 1; }
66
 size_t PersistentStore::capacity() { return E2END + 1; }
67
 
67
 
68
 #endif // EEPROM_SETTINGS
68
 #endif // EEPROM_SETTINGS
69
-#endif // STM32F4 || STM32F4xx
69
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
23
+#if defined(STM32GENERIC) && defined(STM32F4)
24
 
24
 
25
 #include "../../inc/MarlinConfig.h"
25
 #include "../../inc/MarlinConfig.h"
26
 
26
 
54
 
54
 
55
 #endif // USE_WATCHDOG
55
 #endif // USE_WATCHDOG
56
 
56
 
57
-#endif // STM32F4 || STM32F4xx
57
+#endif // STM32GENERIC && STM32F4

Loading…
Cancel
Save