dmazzella / ucrypto

Micropython package for doing fast rsa and elliptic curve cryptography, specifically digital signatures
31 stars 11 forks source link

make on Pi Pico RP2040 board #14

Closed cockerfly closed 1 year ago

cockerfly commented 1 year ago

Hi, friend!) What is the right command to make firmware on Pi Pico 2040 board? When i used this -> make -j8 -C mpy-cross && make -j8 -C ports/stm32/ BOARD="PYBD_SF6" USER_C_MODULES="$(pwd)/ports/stm32/boards/PYBD_SF6/cmodules" firmware.elf is not supported. And when i convert this firmware with ./elf2uf2 firmware.elf firmware.uf2 I get an error "ERROR: HARD-FLOAT not supported"

Please help me to understand this

dmazzella commented 1 year ago

Hi, try this:

clone ucrypto into RPI_PICO/cmodules/ucrypto:

micropython (master) ✗ git clone https://github.com/dmazzella/ucrypto.git $(pwd)/ports/rp2/boards/RPI_PICO/cmodules/ucrypto

edit ports/rp2/boards/manifest.py at the and of file add:

include("$(BOARD_DIR)/cmodules/ucrypto/modules")

build RPI_PICO:

micropython (master) ✗ make -j8 -C mpy-cross && make -j8 -C ports/rp2 BOARD=RPI_PICO USER_C_MODULES="$(pwd)/ports/rp2/boards/RPI_PICO/cmodules/ucrypto/micropython.cmake"
cockerfly commented 1 year ago

I did everything you said, in the end an error still appears

CMake Error: The source directory "/home/ldb/pico/pico-examples/build/micropython/ports/rp2/build-RPI_PICO" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:54: recipe for target 'all' failed make: *** [all] Error 1 Снимок экрана от 2023-08-30 18-03-47

dmazzella commented 1 year ago

Are you on the MicroPython master?

cockerfly commented 1 year ago

I think yes)) Снимок экрана от 2023-08-30 18-37-31

dmazzella commented 1 year ago

Have you cloned a fresh micropython repo? have you initialized submodules?

git submodule update --init --depth 1

cockerfly commented 1 year ago

Have you cloned a fresh micropython repo? have you initialized submodules?

git submodule update --init --depth 1

Yes. I did everything according to the instructions on the main page of the repo. Specifically this command --> "git submodule update --init"

dmazzella commented 1 year ago

Have you tried a clean build without ucrypto?

Try first a clean build and if it succeded include the ucrypto module

cockerfly commented 1 year ago

Have you tried a clean build without ucrypto?

Try first a clean build and if it succeded include the ucrypto module

I'll try like this, thanks for help))

cockerfly commented 1 year ago

Have you tried a clean build without ucrypto?

Try first a clean build and if it succeded include the ucrypto module

The main cause of the error was ubuntu of the old version. When I installed 22.04, everything worked immediately. Thanks again for the tips and good luck! The topic can be closed)

dmazzella commented 1 year ago

glad you solved it, good luck to you