polhenarejos / pico-openpgp

OpenPGP CCID smart card for Raspberry Pico and ESP32
https://www.picokeys.com
GNU General Public License v3.0
78 stars 10 forks source link

CMake fails on pico_add_library #13

Closed sa2kaa closed 5 months ago

sa2kaa commented 5 months ago

Hi there CMake stops with this fault:

CMake Error at pico-keys-sdk/pico_keys_sdk_import.cmake:270 (pico_add_library): Unknown CMake command "pico_add_library". Call Stack (most recent call first): CMakeLists.txt:48 (include)

I checked out the repo with --recursive since it seemed to use submodules.

My RP2040 development environment seem to work for other examples although it might have be set up a year ago or so.

Uncorrelated; since the build failed I downloaded a prebuilt binary for a "pico". I then used https://www.picokeys.com to patch the firmware with some other VID/PID but when the board is connected the USB descriptor still identifies it as 0xFEFF:0xFCFD. The result is the same if I use patch_vidpid.sh. I guess needless to say but gpg does not recognize the key with the patched firmware.

polhenarejos commented 5 months ago

I'd need the entire log and the cmake command you use.

For the second topic, please open another issue for a better tracking.

Thanks.

sa2kaa commented 5 months ago

CMakeError.log CMakeOutput.log

cmake .. -DPICO_BOARD=pico -DUSB_VID=0x1234 -DUSB_PID=0x5678

PICO_SDK_PATH is set separately by using source:

export PICO_SDK_PATH="/home/olof/pico-pi/pico-sdk/"

polhenarejos commented 5 months ago

Log files are not so verbose. Paste stdout here of cmake command. pico_add_library is provided by Pico SDK so it might be not properly configured. Which branch/tag are you using?

sa2kaa commented 5 months ago

I made a new recursive checkout of the picopi-sdk and now building with VID/PID set by my choice. I appended the build result as reference. pico_openpgp.zip

sa2kaa commented 5 months ago

This issue can be closed now since it was problem with the picosdk on my machine.