mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Merge pull request #87 from valeros/develop
Fix teensy firmware file format
This commit is contained in:
@ -61,7 +61,7 @@ env.Replace(
|
|||||||
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES'
|
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES'
|
||||||
)
|
)
|
||||||
|
|
||||||
if env.get("BOARD_OPTIONS", {}).get("build", {}).get("cpu")[-2:] == "m4":
|
if env.get("BOARD_OPTIONS", {}).get("build", {}).get("cpu", "")[-2:] == "m4":
|
||||||
env.Append(
|
env.Append(
|
||||||
ASFLAGS=[
|
ASFLAGS=[
|
||||||
"-mfloat-abi=hard",
|
"-mfloat-abi=hard",
|
||||||
@ -90,6 +90,17 @@ env.Append(
|
|||||||
"$SOURCES",
|
"$SOURCES",
|
||||||
"$TARGET"]),
|
"$TARGET"]),
|
||||||
suffix=".bin"
|
suffix=".bin"
|
||||||
|
),
|
||||||
|
ElfToHex=Builder(
|
||||||
|
action=" ".join([
|
||||||
|
"$OBJCOPY",
|
||||||
|
"-O",
|
||||||
|
"ihex",
|
||||||
|
"-R",
|
||||||
|
".eeprom",
|
||||||
|
"$SOURCES",
|
||||||
|
"$TARGET"]),
|
||||||
|
suffix=".hex"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -69,16 +69,10 @@ target_elf = env.BuildFirmware(["m"] + CORELIBS)
|
|||||||
# Target: Build the firmware file
|
# Target: Build the firmware file
|
||||||
#
|
#
|
||||||
|
|
||||||
if "cortex" in env.get("BOARD_OPTIONS").get("build").get("cpu", ""):
|
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
target_firm = join("$BUILD_DIR", "firmware.hex")
|
||||||
target_firm = join("$BUILD_DIR", "firmware.bin")
|
|
||||||
else:
|
|
||||||
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
|
|
||||||
else:
|
else:
|
||||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
target_firm = env.ElfToHex(join("$BUILD_DIR", "firmware"), target_elf)
|
||||||
target_firm = join("$BUILD_DIR", "firmware.hex")
|
|
||||||
else:
|
|
||||||
target_firm = env.ElfToHex(join("$BUILD_DIR", "firmware"), target_elf)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Target: Print binary size
|
# Target: Print binary size
|
||||||
|
Reference in New Issue
Block a user