Browse Source

Tweaks to build scripts

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
903d0b91fc
  1. 7
      Marlin/src/HAL/LPC1768/upload_extra_script.py
  2. 3
      buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
  3. 3
      buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
  4. 3
      buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  5. 3
      buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py
  6. 3
      buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
  7. 4
      buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  8. 3
      buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  9. 4
      buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py
  10. 3
      buildroot/share/PlatformIO/scripts/add_nanolib.py
  11. 9
      buildroot/share/PlatformIO/scripts/chitu_crypt.py
  12. 4
      buildroot/share/PlatformIO/scripts/common-dependencies.py
  13. 3
      buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  14. 9
      buildroot/share/PlatformIO/scripts/download_mks_assets.py
  15. 3
      buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
  16. 4
      buildroot/share/PlatformIO/scripts/fly_mini.py
  17. 4
      buildroot/share/PlatformIO/scripts/lerdge.py
  18. 3
      buildroot/share/PlatformIO/scripts/preflight-checks.py
  19. 4
      buildroot/share/PlatformIO/scripts/random-bin.py
  20. 3
      buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  21. 3
      buildroot/share/scripts/config-labels.py
  22. 3
      buildroot/share/scripts/createTemperatureLookupMarlin.py
  23. 3
      buildroot/share/vscode/auto_build.py
  24. 6
      buildroot/share/vscode/create_custom_upload_command_CDC.py
  25. 3
      buildroot/share/vscode/create_custom_upload_command_DFU.py
  26. 8
      platformio.ini

7
Marlin/src/HAL/LPC1768/upload_extra_script.py

@ -8,9 +8,7 @@ from __future__ import print_function
target_filename = "FIRMWARE.CUR" target_filename = "FIRMWARE.CUR"
target_drive = "REARM" target_drive = "REARM"
import os import os,getpass,platform
import getpass
import platform
current_OS = platform.system() current_OS = platform.system()
Import("env") Import("env")
@ -33,9 +31,8 @@ try:
# #
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:' # platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
# Windows - doesn't care about the disk's name, only cares about the drive letter # Windows - doesn't care about the disk's name, only cares about the drive letter
import subprocess import subprocess,string
from ctypes import windll from ctypes import windll
import string
# getting list of drives # getting list of drives
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python # https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python

3
buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py

@ -1,3 +1,6 @@
#
# STM32F103RC_MEEB_3DP.py
#
try: try:
import configparser import configparser
except ImportError: except ImportError:

3
buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py

@ -1,3 +1,6 @@
#
# STM32F103RC_SKR_MINI.py
#
import os import os
Import("env") Import("env")

3
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py

@ -1,3 +1,6 @@
#
# STM32F103RC_fysetc.py
#
import os import os
from os.path import join from os.path import join
from os.path import expandvars from os.path import expandvars

3
buildroot/share/PlatformIO/scripts/creality.py → buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py

@ -1,3 +1,6 @@
#
# STM32F103RET6_creality.py
#
import os import os
Import("env") Import("env")

3
buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py

@ -1,3 +1,6 @@
#
# STM32F103RE_SKR_E3_DIP.py
#
import os import os
Import("env") Import("env")

4
buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py

@ -1,3 +1,7 @@
#
# STM32F103VE_longer.py
# Customizations for env:STM32F103VE_longer
#
import os import os
Import("env") Import("env")

3
buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py

@ -1,3 +1,6 @@
#
# STM32F1_create_variant.py
#
import os,shutil import os,shutil
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
from platformio import util from platformio import util

4
buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py → buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py

@ -1,3 +1,7 @@
#
# STM32F401VE_STEVAL.py
# Customizations for env:STM32F401VE_STEVAL
#
import os import os
Import("env") Import("env")

3
buildroot/share/PlatformIO/scripts/add_nanolib.py

@ -1,2 +1,5 @@
#
# add_nanolib.py
#
Import("env") Import("env")
env.Append(LINKFLAGS=["--specs=nano.specs"]) env.Append(LINKFLAGS=["--specs=nano.specs"])

9
buildroot/share/PlatformIO/scripts/chitu_crypt.py

@ -1,8 +1,9 @@
#
# chitu_crypt.py
# Customizations for Chitu boards
#
Import("env") Import("env")
import os import os,random,struct,uuid
import random
import struct
import uuid
# Relocate firmware from 0x08000000 to 0x08008800 # Relocate firmware from 0x08000000 to 0x08008800
env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000")) env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000"))

4
buildroot/share/PlatformIO/scripts/common-dependencies.py

@ -2,9 +2,7 @@
# common-dependencies.py # common-dependencies.py
# Convenience script to check dependencies and add libs and sources for Marlin Enabled Features # Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
# #
import subprocess import subprocess,os,re
import os
import re
try: try:
import configparser import configparser
except ImportError: except ImportError:

3
buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py

@ -1,3 +1,6 @@
#
# copy_marlin_variant_to_framework.py
#
import os,shutil import os,shutil
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
from platformio import util from platformio import util

9
buildroot/share/PlatformIO/scripts/download_mks_assets.py

@ -1,9 +1,8 @@
#
# download_mks_assets.py
#
Import("env") Import("env")
import os import os,requests,zipfile,tempfile,shutil
import requests
import zipfile
import tempfile
import shutil
url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/master.zip" url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/master.zip"
zip_path = os.path.join(env.Dictionary("PROJECT_LIBDEPS_DIR"), "mks-assets.zip") zip_path = os.path.join(env.Dictionary("PROJECT_LIBDEPS_DIR"), "mks-assets.zip")

3
buildroot/share/PlatformIO/scripts/fix_framework_weakness.py

@ -1,3 +1,6 @@
#
# fix_framework_weakness.py
#
from os.path import join, isfile from os.path import join, isfile
import shutil import shutil
from pprint import pprint from pprint import pprint

4
buildroot/share/PlatformIO/scripts/fly_mini.py

@ -1,3 +1,7 @@
#
# fly_mini.py
# Customizations for env:FLY_MINI
#
import os import os
Import("env") Import("env")

4
buildroot/share/PlatformIO/scripts/lerdge.py

@ -1,3 +1,7 @@
#
# lerdge.py
# Customizations for Lerdge build environments
#
import os,sys import os,sys
Import("env") Import("env")

3
buildroot/share/PlatformIO/scripts/preflight-checks.py

@ -2,8 +2,7 @@
# preflight-checks.py # preflight-checks.py
# Check for common issues prior to compiling # Check for common issues prior to compiling
# #
import os import os,re
import re
Import("env") Import("env")
def get_envs_for_board(board): def get_envs_for_board(board):

4
buildroot/share/PlatformIO/scripts/random-bin.py

@ -1,3 +1,7 @@
#
# random-bin.py
# Set a unique firmware name based on current date and time
#
Import("env") Import("env")
from datetime import datetime from datetime import datetime

3
buildroot/share/PlatformIO/scripts/stm32_bootloader.py

@ -1,3 +1,6 @@
#
# stm32_bootloader.py
#
import os,sys,shutil import os,sys,shutil
Import("env") Import("env")

3
buildroot/share/scripts/config-labels.py

@ -22,8 +22,7 @@
# 2020-06-05 SRL style tweaks # 2020-06-05 SRL style tweaks
#----------------------------------- #-----------------------------------
# #
import sys import sys,os
import os
from pathlib import Path from pathlib import Path
from distutils.dir_util import copy_tree # for copy_tree, because shutil.copytree can't handle existing files, dirs from distutils.dir_util import copy_tree # for copy_tree, because shutil.copytree can't handle existing files, dirs

3
buildroot/share/scripts/createTemperatureLookupMarlin.py

@ -22,8 +22,7 @@ from __future__ import print_function
from __future__ import division from __future__ import division
from math import * from math import *
import sys import sys,getopt
import getopt
"Constants" "Constants"
ZERO = 273.15 # zero point of Kelvin scale ZERO = 273.15 # zero point of Kelvin scale

3
buildroot/share/vscode/auto_build.py

@ -72,8 +72,7 @@
from __future__ import print_function from __future__ import print_function
from __future__ import division from __future__ import division
import sys import sys,os
import os
pwd = os.getcwd() # make sure we're executing from the correct directory level pwd = os.getcwd() # make sure we're executing from the correct directory level
pwd = pwd.replace('\\', '/') pwd = pwd.replace('\\', '/')

6
buildroot/share/vscode/create_custom_upload_command_CDC.py

@ -13,11 +13,9 @@
from __future__ import print_function from __future__ import print_function
from __future__ import division from __future__ import division
import subprocess import subprocess,os,sys,platform
import os
import sys
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
import platform
current_OS = platform.system() current_OS = platform.system()
env = DefaultEnvironment() env = DefaultEnvironment()

3
buildroot/share/vscode/create_custom_upload_command_DFU.py

@ -9,8 +9,7 @@
# Will continue on if a COM port isn't found so that the compilation can be done. # Will continue on if a COM port isn't found so that the compilation can be done.
# #
import os import os,sys
import sys
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
import platform import platform
current_OS = platform.system() current_OS = platform.system()

8
platformio.ini

@ -1155,7 +1155,7 @@ extends = env:STM32F103RE
build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4 build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4
extra_scripts = ${env:STM32F103RE.extra_scripts} extra_scripts = ${env:STM32F103RE.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/random-bin.py pre:buildroot/share/PlatformIO/scripts/random-bin.py
buildroot/share/PlatformIO/scripts/creality.py buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py
debug_tool = jlink debug_tool = jlink
upload_protocol = jlink upload_protocol = jlink
@ -1194,7 +1194,7 @@ build_flags = ${common_stm32.build_flags}
-DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py
# #
# STM32F401RC # STM32F401RC
@ -1569,7 +1569,9 @@ board_build.ldscript = ldscript.ld
board_build.offset = 0x10000 board_build.offset = 0x10000
build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
################################# #################################
# # # #

Loading…
Cancel
Save