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

Micropython Cmake support #4

Open
NHTHEBEST opened this issue Oct 6, 2021 · 5 comments
Open

Micropython Cmake support #4

NHTHEBEST opened this issue Oct 6, 2021 · 5 comments

Comments

@NHTHEBEST
Copy link

I tried to compile this for a rpi pico but dint seem to work

Then I tried to port the micropython.mk file to a cmake file but and it complied but did not integrate into micropython

micropython.cmake

@NHTHEBEST
Copy link
Author

Managed to compile
Not sure what the issue was
did have to comment some stuff out

@kdmukai
Copy link

kdmukai commented Jul 2, 2022

@NHTHEBEST your cmake file got me closer (I'm trying to compile for esp32) but the compiler is failing on:

In file included from /root/usermods/secp256k1-embedded/secp256k1/src/secp256k1.c:17:
/root/usermods/secp256k1-embedded/secp256k1/src/ecmult_impl.h:59:4: error: #error Set ECMULT_WINDOW_SIZE to an integer in range [2..24].
 #  error Set ECMULT_WINDOW_SIZE to an integer in range [2..24].
    ^~~~~
In file included from /root/usermods/secp256k1-embedded/secp256k1/src/ecmult_gen_impl.h:13,
                 from /root/usermods/secp256k1-embedded/secp256k1/src/secp256k1.c:19:
/root/usermods/secp256k1-embedded/secp256k1/src/ecmult_gen.h:14:4: error: #error "Set ECMULT_GEN_PREC_BITS to 2, 4 or 8."
 #  error "Set ECMULT_GEN_PREC_BITS to 2, 4 or 8."
    ^~~~~

Any tips?

I set up a Docker container configured with all the tools and documented the steps I followed: https://github.com/kdmukai/micropython-esp32

@kdmukai
Copy link

kdmukai commented Jul 2, 2022

I did get it to compile and run on ESP32. Required some tweaks to secp256k1, secp256k1-embedded, and micropython.

I've forked all of them and will have a complete Docker-based build environment ready to share soon.

@dipunm
Copy link

dipunm commented Jan 14, 2023

@kdmukai How did you get on with this? I am attempting to integrate this into a custom firmware for the badger2040 and I'm getting this same exact error message.

Hopefully it is just a specific thing that needs to be done here?

@kdmukai
Copy link

kdmukai commented Jan 14, 2023

@kdmukai How did you get on with this? I am attempting to integrate this into a custom firmware for the badger2040 and I'm getting this same exact error message.

I can't recall, but look through the commit history of my fork: https://github.com/kdmukai/secp256k1-embedded/tree/75469814bf9ac978236f51b2c509837faed38879

Maybe: kdmukai@993112e

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

3 participants