🔨 Fix IntelliSense / PIO conflicts (#23058)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
committed by
Scott Lahteine
parent
f97635de36
commit
fc2020c6ec
@ -1,40 +1,43 @@
|
||||
#
|
||||
# buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
|
||||
# STM32F103RC_MEEB_3DP.py
|
||||
#
|
||||
try:
|
||||
import configparser
|
||||
except ImportError:
|
||||
import ConfigParser as configparser
|
||||
import pioutil
|
||||
if pioutil.is_pio_build():
|
||||
|
||||
import os
|
||||
Import("env", "projenv")
|
||||
try:
|
||||
import configparser
|
||||
except ImportError:
|
||||
import ConfigParser as configparser
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read("platformio.ini")
|
||||
import os
|
||||
Import("env", "projenv")
|
||||
|
||||
#
|
||||
# Upload actions
|
||||
#
|
||||
def before_upload(source, target, env):
|
||||
env.Execute("pwd")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("platformio.ini")
|
||||
|
||||
def after_upload(source, target, env):
|
||||
env.Execute("pwd")
|
||||
#
|
||||
# Upload actions
|
||||
#
|
||||
def before_upload(source, target, env):
|
||||
env.Execute("pwd")
|
||||
|
||||
env.AddPreAction("upload", before_upload)
|
||||
env.AddPostAction("upload", after_upload)
|
||||
def after_upload(source, target, env):
|
||||
env.Execute("pwd")
|
||||
|
||||
flash_size = 0
|
||||
vect_tab_addr = 0
|
||||
env.AddPreAction("upload", before_upload)
|
||||
env.AddPostAction("upload", after_upload)
|
||||
|
||||
for define in env['CPPDEFINES']:
|
||||
if define[0] == "VECT_TAB_ADDR":
|
||||
vect_tab_addr = define[1]
|
||||
if define[0] == "STM32_FLASH_SIZE":
|
||||
flash_size = define[1]
|
||||
flash_size = 0
|
||||
vect_tab_addr = 0
|
||||
|
||||
print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr))
|
||||
print('Use the {0:d}KB flash version of stm32f103rct6 chip.'.format(flash_size))
|
||||
for define in env['CPPDEFINES']:
|
||||
if define[0] == "VECT_TAB_ADDR":
|
||||
vect_tab_addr = define[1]
|
||||
if define[0] == "STM32_FLASH_SIZE":
|
||||
flash_size = define[1]
|
||||
|
||||
import marlin
|
||||
marlin.custom_ld_script("STM32F103RC_MEEB_3DP.ld")
|
||||
print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr))
|
||||
print('Use the {0:d}KB flash version of stm32f103rct6 chip.'.format(flash_size))
|
||||
|
||||
import marlin
|
||||
marlin.custom_ld_script("STM32F103RC_MEEB_3DP.ld")
|
||||
|
Reference in New Issue
Block a user