Rename "stm32" platform to "ststm32"

This commit is contained in:
Valeriy Koval committed 2015-03-09 12:18:46 +02:00
1 parent 2224f98d2d
commit 13455987ae
11 files changed
+554 -197

No files matched your search

@@ -2,15 +2,23 @@
# See LICENSE for details.
"""
Builder for STMicroelectronics
STM32 Series ARM microcontrollers.
Builder for ST STM32 Series ARM microcontrollers.
"""
from os.path import join
from shutil import copyfile
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
DefaultEnvironment, SConscript)
def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621
env.AutodetectUploadPort()
copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"),
join(env.subst("$UPLOAD_PORT"), "firmware.bin"))
print ("Firmware has been successfully uploaded.\n"
"Please restart your board.")
env = DefaultEnvironment()
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
@@ -38,13 +46,11 @@ env.Append(
]
)
CORELIBS = env.ProcessGeneral()
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware(["c", "gcc", "m", "nosys"] + CORELIBS)
target_elf = env.BuildFirmware()
#
# Target: Build the .bin file
@@ -66,7 +72,10 @@ AlwaysBuild(target_size)
# Target: Upload by default .bin file
#
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
if "mbed" in env.subst("$FRAMEWORK"):
upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk)
else:
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
AlwaysBuild(upload)
#