Skip to content

Commit

Permalink
Pins/tests followup (MarlinFirmware#21268)
Browse files Browse the repository at this point in the history
Missing commit from MarlinFirmware#21254
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
thisiskeithb authored and vyacheslav-shubin committed Mar 10, 2021
1 parent 72d0cd2 commit b881af3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#define BOARD_INFO_NAME "BTT SKR V1.4"
#endif

#ifndef BOARD_CUSTOM_BUILD_FLAGS
#define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28
#endif

//
// SD Connection
//
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
#warning "Serial 3 is originally reserved to Y limit switches. Hardware changes are required to use it."
#endif

// Custom flags and defines for the build
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__

#define BOARD_INFO_NAME "LGT KIT V1.0"

//
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@

#include "env_validate.h"

// Custom flags and defines for the build
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__

#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "RAMPS 1.4"
#endif
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/pins/ramps/pins_RAMPS_S_12.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

#include "env_validate.h"

// Custom flags and defines for the build
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__

#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "RAMPS S 1.2"
#endif
Expand Down
16 changes: 16 additions & 0 deletions buildroot/share/PlatformIO/scripts/common-dependencies-post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# common-dependencies-post.py
# Convenience script to add build flags for Marlin Enabled Features
#

Import("env")
Import("projenv")

def apply_board_build_flags():
if not 'BOARD_CUSTOM_BUILD_FLAGS' in env['MARLIN_FEATURES']:
return
projenv.Append(CCFLAGS=env['MARLIN_FEATURES']['BOARD_CUSTOM_BUILD_FLAGS'].split())

# We need to add the board build flags in a post script
# so the platform build script doesn't overwrite the custom CCFLAGS
apply_board_build_flags()

0 comments on commit b881af3

Please sign in to comment.