Skip to content

Commit

Permalink
board target defines
Browse files Browse the repository at this point in the history
  • Loading branch information
rhapsodyv committed Sep 21, 2020
1 parent 3197976 commit fa107db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 9 additions & 4 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@
* 7 | 11
*/

#ifdef TARGET_LPC1768
#error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
#elif defined(__STM32F1__)
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#ifndef __PREBUILD_SCRIPT_RUNNING__
#ifdef TARGET_LPC1768
#error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
#elif defined(__STM32F1__)
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#endif
#endif

#if NONE(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
Expand Down Expand Up @@ -764,3 +766,6 @@
#define CLCD_MOD_RESET 31
#define CLCD_SPI_CS 33
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050


#define BOARD_CUSTOM_BUILD_FLAGS -DFOO
12 changes: 8 additions & 4 deletions buildroot/share/PlatformIO/scripts/common-dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,20 @@
#endif

// define all platform macros to include pins file
#define __PREBUILD_SCRIPT_RUNNING__
#define ARDUINO_GRAND_CENTRAL_M4
#define __AVR_ATmega1280__
#define __AVR_ATmega2560__
#define __AVR_ATmega644P__
#define __AVR_ATmega1284P__
#define __AVR__
#define ARDUINO_ARCH_SAM
#define __MK20DX256__
#define __MK64FX512__
#define __MK66FX1M0__
#define __IMXRT1062__
#define IS_32BIT_TEENSY 1
#define IS_TEENSY32 1
#define STM32GENERIC
#define STM32F4
#define STM32F7
Expand All @@ -168,8 +174,6 @@
#define __SAMD51__
#define MCU_LPC1769
#define MCU_LPC1768
#if !MB(RAMPS_14_EFB)
#define TARGET_LPC1768
#define __STM32F1__
#endif
#define TARGET_LPC1768
#define __STM32F1__
#include "../../../../Marlin/src/pins/pins.h"

0 comments on commit fa107db

Please sign in to comment.