瀏覽代碼

Tell externals it's Marlin

Scott Lahteine 5 年之前
父節點
當前提交
20fbb751f1
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. 2
    0
      Marlin/src/inc/MarlinConfigPre.h
  2. 5
    5
      platformio.ini

+ 2
- 0
Marlin/src/inc/MarlinConfigPre.h 查看文件

@@ -21,7 +21,9 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
+#ifndef __MARLIN_FIRMWARE__
24 25
 #define __MARLIN_FIRMWARE__
26
+#endif
25 27
 
26 28
 //
27 29
 // Prefix header to acquire configurations

+ 5
- 5
platformio.ini 查看文件

@@ -23,7 +23,7 @@ default_envs = megaatmega2560
23 23
 [common]
24 24
 default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
25 25
 extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
26
-build_flags = -fmax-errors=5 -g
26
+build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__
27 27
 lib_deps =
28 28
   U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
29 29
   LiquidCrystal@1.3.4
@@ -149,7 +149,7 @@ monitor_speed = 250000
149 149
 platform          = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/master.zip
150 150
 framework         = arduino
151 151
 board             = nxp_lpc1768
152
-build_flags       = -DTARGET_LPC1768 -DU8G_HAL_LINKS -IMarlin/src/HAL/HAL_LPC1768/include -IMarlin/src/HAL/HAL_LPC1768/u8g ${common.build_flags}
152
+build_flags       = -DTARGET_LPC1768 -DU8G_HAL_LINKS  -IMarlin/src/HAL/HAL_LPC1768/include -IMarlin/src/HAL/HAL_LPC1768/u8g ${common.build_flags}
153 153
 # debug options for backtrace
154 154
 #  -funwind-tables
155 155
 #  -mpoke-function-name
@@ -532,7 +532,7 @@ platform    = ststm32
532 532
 framework   = arduino
533 533
 board       = malyanM200
534 534
 build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py -DMCU_STM32F103CB -D __STM32F1__=1 -std=c++1y -D MOTHERBOARD="BOARD_MALYAN_M200" -DSERIAL_USB -ffunction-sections -fdata-sections -Wl,--gc-sections
535
-  -DDEBUG_LEVEL=0
535
+  -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
536 536
 src_filter  = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
537 537
 #-<frameworks>
538 538
 lib_ignore  = Adafruit NeoPixel, LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SPI
@@ -573,7 +573,7 @@ monitor_speed     = 250000
573 573
 #
574 574
 [env:linux_native]
575 575
 platform        = native
576
-build_flags     = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread
576
+build_flags     = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__
577 577
 src_build_flags = -Wall -IMarlin/src/HAL/HAL_LINUX/include
578 578
 build_unflags   = -Wall
579 579
 lib_ldf_mode    = off
@@ -602,7 +602,7 @@ debug_tool    = jlink
602 602
 platform    = atmelavr
603 603
 framework   = arduino
604 604
 board       = megaatmega2560
605
-build_flags = -c -H -std=gnu++11 -Wall -Os
605
+build_flags = -c -H -std=gnu++11 -Wall -Os -D__MARLIN_FIRMWARE__
606 606
 lib_deps    = ${common.lib_deps}
607 607
   TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
608 608
 src_filter  = +<src/Marlin.cpp>

Loading…
取消
儲存