Skip to content

flash_writer path is not properly templated when using arduino-cli on Linux #127

Closed
@guberti

Description

@guberti

Issue

When uploading Spresense Arduino projects from a machine running Ubuntu 20.04 with arduino-cli, I get the following error:

guberti@microtvm:~/blink$ arduino-cli upload --fqbn SPRESENSE:spresense:spresense --port /dev/ttyUSB0
Error during Upload: uploading error: cannot execute upload tool: fork/exec /home/vagrant/.arduino15/pack
ages/SPRESENSE/tools/spresense-tools/2.2.1/flash_writer/{runtime.os}/flash_writer: no such file or direct
ory

Workaround

This path (tools.spresense-tools.cmd.path.linux) is defined in platform.txt as seen below:

# ------------------------------
tools.spresense-tools.path={runtime.tools.spresense-tools.path}
tools.spresense-tools.cmd.path={path}/flash_writer/{runtime.os}/flash_writer
tools.spresense-tools.cmd.path.windows={path}/flash_writer/{runtime.os}/flash_writer.exe
tools.spresense-tools.cmd.path.linux={path}/flash_writer/{runtime.os}/flash_writer

This issue can be fixed by changing the path to:

tools.spresense-tools.cmd.path.linux={path}/flash_writer/linux/flash_writer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions