10000 Info: PlatformIO, Arduino Mega, build & upload OTA · Issue #29 · JAndrassy/ArduinoOTA · GitHub
[go: up one dir, main page]

Skip to content
Info: PlatformIO, Arduino Mega, build & upload OTA #29
@pantata

Description

@pantata

Tested for macOS.

  1. add to platformio.ini
 extra_scripts = post:extra_scripts.py
 upload_protocol = custom
 upload_flags =
   http://arduino:password@ip_address:65280/sketch
  1. write extra_scripts.py next to platform.ini
Import("env", "projenv")

env.Replace(    
    UPLOADCMD="curl --request POST --data-binary @\"$BUILD_DIR\"${PROGNAME}.bin $UPLOADERFLAGS"
)

env.AddPostAction(
    "$BUILD_DIR/${PROGNAME}.elf",
    env.VerboseAction(" ".join([
        "$OBJCOPY", "-O", "binary",
        "\"$BUILD_DIR\"/${PROGNAME}.elf", "\"$BUILD_DIR\"${PROGNAME}.bin"
    ]), "Building $BUILD_DIR/${PROGNAME}.bin")
)

LS.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0