Skip to content

{runtime.os} not being substituted in upload commandline for Sony SPRESENSE board #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdwelsh opened this issue Feb 25, 2021 · 3 comments · Fixed by #1411
Closed

{runtime.os} not being substituted in upload commandline for Sony SPRESENSE board #1198

mdwelsh opened this issue Feb 25, 2021 · 3 comments · Fixed by #1411
Assignees

Comments

@mdwelsh
Copy link

mdwelsh commented Feb 25, 2021

Bug Report

I am unable to upload a sketch for the Sony SPRESENSE board on MacOS X. The error message suggests that arduino-cli is not properly translating {runtime.os} to macosx when it constructs the flash_writer command line.

This is with a trivial "Blink" sketch.

Current behavior

$ arduino-cli upload -p /dev/cu.SLAB_USBtoUART --fqbn SPRESENSE:spresense:spresense Blink -v

Waiting for upload port...
"/Users/mdw/Library/Arduino15/packages/SPRESENSE/tools/spresense-tools/2.0.2/flash_writer/{runtime.os}/flash_writer" -s -c "/dev/cu.SLAB_USBtoUART"  -d -n "/var/folders/bw/pw636xj977n1k9367knvlml80000gn/T/arduino-sketch-69767DD007917B413367753F903A19C4/Blink.ino.spk"
Error during Upload: uploading error: cannot execute upload tool: fork/exec /Users/mdw/Library/Arduino15/packages/SPRESENSE/tools/spresense-tools/2.0.2/flash_writer/{runtime.os}/flash_writer: no such file or directory

Expected behavior

The flash_writer program is found in:

/Users/mdw/Library/Arduino15/packages/SPRESENSE/tools/spresense-tools/2.0.2/flash_writer/macosx/flash_writer

That is, replacing {runtime.os} with macosx in the command line should do the trick. I am not sure why this is not happening automatically.

Environment

  • CLI version (output of arduino-cli version): arduino-cli alpha Version: 0.16.0 Commit: c977a23 Date:

  • OS and platform: MacOS X 10.14.6 on Macbook Pro 2018, with Sony SPRESENSE

@mdwelsh
Copy link
Author

mdwelsh commented Feb 25, 2021

The platform.txt file contains this line:

tools.spresense-tools.cmd.path={path}/flash_writer/{runtime.os}/flash_writer

This core was installed in the IDE (not via arduino-cli) using the instructions here:
https://developer.sony.com/develop/spresense/docs/arduino_set_up_en.html

@mdwelsh
Copy link
Author

mdwelsh commented Feb 25, 2021

Adding the line:

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

to packages/SPRESENSE/hardware/spresense/2.0.2/platform.txt is a workaround, however, I don't understand why it's needed, as {runtime.os} expansion should, in principle, work here.

@mdwelsh
Copy link
Author

mdwelsh commented Feb 25, 2021

I have confirmed this issue still exists in

arduino-cli alpha Version: nightly-20210225 Commit: b8c9e896 Date: 2021-02-25T01:32:05Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants