🔨 Fix IntelliSense / PIO conflicts (#23058)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
Robby Candra 2021-11-04 17:28:42 +07:00 committed by GitHub
parent 399faa91b9
commit 4483b8aaf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 1075 additions and 1041 deletions

View file

@ -1,18 +1,20 @@
#
# Convert the ELF to an SREC file suitable for some bootloaders
#
import os,sys
from os.path import join
import pioutil
if pioutil.is_pio_build():
import os,sys
from os.path import join
Import("env")
Import("env")
board = env.BoardConfig()
board_keys = board.get("build").keys()
if 'encrypt' in board_keys:
env.AddPostAction(
join("$BUILD_DIR", "${PROGNAME}.bin"),
env.VerboseAction(" ".join([
"$OBJCOPY", "-O", "srec",
"\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encrypt")) + "\""
]), "Building $TARGET")
)
board = env.BoardConfig()
board_keys = board.get("build").keys()
if 'encrypt' in board_keys:
env.AddPostAction(
join("$BUILD_DIR", "${PROGNAME}.bin"),
env.VerboseAction(" ".join([
"$OBJCOPY", "-O", "srec",
"\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encrypt")) + "\""
]), "Building $TARGET")
)