Skip to content
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

calliope-mini: flash script not very cleanly written #11404

Closed
miri64 opened this issue Apr 16, 2019 · 3 comments
Closed

calliope-mini: flash script not very cleanly written #11404

miri64 opened this issue Apr 16, 2019 · 3 comments
Assignees
Labels
Area: boards Area: Board ports Area: tools Area: Supplementary tools Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Comments

@miri64
Copy link
Member

miri64 commented Apr 16, 2019

While testing #11395, I noticed that the flash script for the calliope mini isn't that well written. It makes some assumptions that just aren't given or expects given configuration that isn't documented anywhere:

  • It assumes that Linux always auto-mounts at /media/${USER} which it doesn't (e.g. in Arch it is /run/media/${USER})
    if [ ${OS} = "Linux" ]
    then
    MOUNT=/media/${USER}/${NAME}
  • Appearently it assumes that the storage device of the calliope mini is configured in the fstab and can somehow be mounted this way without root. Otherwise I can't explain to myself.
  • It exits on 0 in its error states, so make returns success even if flashing failed.

Sadly, after a short while of trying to fix it I had to give up, since I'm short on time, but I suggest instead of trying to infer the device somehow from the mount-point to use tools like lsblk (on Linux) and diskutil (on OSX) to determine the device name from the MINI label (maybe even confirm the USB-ID) and mount the device using udiskctl [1] [2] if it is available to mount it (don't know the equivalent on OSX though).

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tools Area: Supplementary tools Area: boards Area: Board ports labels Apr 16, 2019
@aabadie
Copy link
Contributor

aabadie commented Apr 16, 2019

Maybe, you can try to flash this board using openocd, reusing the same configuration that is used for the microbit ? I suspect this board is using a DAPLink programmer. Maybe pyocd would also work.

@aabadie
Copy link
Contributor

aabadie commented Apr 16, 2019

@aabadie
Copy link
Contributor

aabadie commented Jul 4, 2019

The flash script was removed in #11608 so we can close this one.

@aabadie aabadie closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: tools Area: Supplementary tools Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

No branches or pull requests

5 participants