mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +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'
|
||||
)
|
||||
|
||||
if env.get("BOARD_OPTIONS", {}).get("build", {}).get("cpu")[-2:] == "m4":
|
||||
if env.get("BOARD_OPTIONS", {}).get("build", {}).get("cpu", "")[-2:] == "m4":
|
||||
env.Append(
|
||||
ASFLAGS=[
|
||||
"-mfloat-abi=hard",
|
||||
@ -90,6 +90,17 @@ env.Append(
|
||||
"$SOURCES",
|
||||
"$TARGET"]),
|
||||
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
|
||||
#
|
||||
|
||||
if "cortex" in env.get("BOARD_OPTIONS").get("build").get("cpu", ""):
|
||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||
target_firm = join("$BUILD_DIR", "firmware.bin")
|
||||
else:
|
||||
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
|
||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||
target_firm = join("$BUILD_DIR", "firmware.hex")
|
||||
else:
|
||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||
target_firm = join("$BUILD_DIR", "firmware.hex")
|
||||
else:
|
||||
target_firm = env.ElfToHex(join("$BUILD_DIR", "firmware"), target_elf)
|
||||
target_firm = env.ElfToHex(join("$BUILD_DIR", "firmware"), target_elf)
|
||||
|
||||
#
|
||||
# Target: Print binary size
|
||||
|
Reference in New Issue
Block a user