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

mpy-cross needs a --version option #3410

Closed
goatchurchprime opened this issue Nov 3, 2017 · 4 comments
Closed

mpy-cross needs a --version option #3410

goatchurchprime opened this issue Nov 3, 2017 · 4 comments

Comments

@goatchurchprime
Copy link

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

@peterhinch
Copy link
Contributor

See #3357.

@SpotlightKid
Copy link
Contributor

See also this relevant forum discussion: https://forum.micropython.org/viewtopic.php?p=23524#p23524
A --version option would indeed be very helpful and should also include the Bytecode version produced by the particular mpy-cross binary.

@dpgeorge
Copy link
Member

dpgeorge commented May 2, 2019

See #4739 for a patch to do this.

@dpgeorge
Copy link
Member

dpgeorge commented May 7, 2019

Option added in 7e90e22

@dpgeorge dpgeorge closed this as completed May 7, 2019
tannewt pushed a commit to tannewt/circuitpython that referenced this issue Jul 13, 2021
As discussed in micropython#3410, this is a micropython-compatible (though
differently named) function that allows creation of useful time
and deadline functions in pure python.
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

No branches or pull requests

4 participants