I’m working on a project for the Raspberry Pi Pico (ARM Cortex-M0+) using the RELIC cryptographic library. I’m facing a linking error during the build process, and I could use some help resolving the undefined references. Additionally, I would like to know if the RELIC library is compatible with the ARMv6 bare metal architecture and if anyone has successfully used it on this architecture. Below are the details:
Environment:
Toolchain: arm-none-eabi-gcc
Platform: Raspberry Pi Pico (ARM Cortex-M0+)
Architecture: ARMv6 bare metal
I have ensured the RELIC library was configured with -DBENCH=0 to disable benchmarking and verified that the necessary files are included and paths are correct in the CMakeLists.txt.
Issues:
1/ Undefined Reference to lzcnt32_gcc_arm
relic_arch_arm.c:(.text+0x18): undefined reference to ‘lzcnt32_gcc_arm’
2/Undefined Reference to clock_gettime
relic_bench.c:(.text+0x4c): undefined reference to ‘clock_gettime’
3/Undefined Reference to ep_mul_reg_glv
relic_ep_mul.c:(.text+0x734): undefined reference to ‘ep_mul_reg_glv’
Questions:
1/ How can I resolve the undefined reference to lzcnt32_gcc_arm? Is there a missing implementation or an alternative function I should use?
2/ How do I handle the clock_gettime references in an embedded environment like the Raspberry Pi Pico, where POSIX functions might not be available?
3/ Is the RELIC library even compatible with the ARMv6 bare metal architecture and has anyone successfully used it on ARM Cortex-M0+ (Raspberry Pi Pico) or similar ARMv6 architectures in a bare metal environment?