Skip to content

mpy-cross needs a --version option #3410

@goatchurchprime

Description

@goatchurchprime

It seems like it's really important when you build the mpy-cross compiler from source that it matches exactly the version of the micropython on the device.

When you log on to the device you get a detailed version of micropython on the command prompt, like so:
"MicroPython v1.9.3-8-g63826ac5c on 2017-11-01"

Is there a way to get an equally specific version code from the mpy-cross program?

In an attempt to get to the correct one, I am doing:

git tag --list
git checkout tags/v1.9.3
cd mpy-cross
make

But you can never be sure this is going to be exactly right, and this can be one fiendish source of bugs.

I can see no hidden code supporting this option already in place:
https://github.com/micropython/micropython/blob/master/mpy-cross/main.c

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