Closed locnnil closed 1 year ago
I solved this issue by cross-compiling MbedTLS myself and linking it against my generated .uf2 file, as I explained in this issue in the MbedTLS repository.
~seem to be having exact same issue. Is there a way to make it work with pico-sdk? (without compiling own MbedTLS?)~
For people who will google and find this (as I did)
In my case issue seemed to be trying to use it with pico_cyw43_arch_none
switching to pico_cyw43_arch_lwip_threadsafe_background
seems to have fixed the issue
Let's see if we can make it more obvious. And you should be able to use mbedtls without lwip?
@peterharperuk In most part I think that yes. Because, acording with my researches lwIP is a "open-source TCP/IP stack designed for embedded systems" right? But in my case I wish to use mbedtls
for radio ( RF
) aplications and not TCP/IP or other socket aplication, my goal was basically ensure a secure encrypted RF transmission.
Correct. I've only every used it with an IP stack but I'd expect it to be possible.
um a bit confused: yes we should be able to link against mbedtls without lwip, but why are you including both
pico_lwip_mbedtls
pico_mbedtls
?
if you don't want lwip, just use pico_mbedtls (no i haven't tried it, but your error above comes from trying to compile pico_lwip_mbedtls)
@kilograham What you said seems very logic, I agree with you, but when I just tried to add pico_mbedtls
at target_link_libraries
seems that the linker couldn't find the library:
[build] Scanning dependencies of target crypto_lock
[build] Consolidate compiler generated dependencies of target crypto_lock
[build] [ 20%] Linking CXX executable crypto_lock.elf
[build] /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: cannot find -lpico_mbedtls: No such file or directory
[build] collect2: error: ld returned 1 exit status
[build] gmake[2]: * [CMakeFiles/crypto_lock.dir/build.make:1449: crypto_lock.elf] Error 1
[build] gmake[1]: * [CMakeFiles/Makefile2:1491: CMakeFiles/crypto_lock.dir/all] Error 2
[build] gmake: * [Makefile:91: all] Error 2
[proc] The command: /usr/bin/cmake --build /home/lincoln/TFG/lock/build --config Debug --target all -j 6 -- exited with code: 2
[build] Build finished with exit code 2
I think this linking error is because I'm doing something wrong.
About my setup: I check in git log and I'm currently in the latest commit at master f396d05
I can't reproduce this. I seem to be able to use pico_medbtls on its own without any issue. It's possible we've fixed something while implementing other changes.
My example is here https://github.com/peterharperuk/pico-examples/tree/mbedtls_example If anyone can repro this, please reopen.
I'm trying to use Mbed-TLS library on Raspberry Pi Pico board. But after following the instructions in @peterharperuk commit (450a4d5) that fixes #894 I'm noting beeing able to compile my aplication when linking with
pico_lwip_mbedtls
andpico_mbedtls
.On my linking libraries I've selected:
If I remove
pico_mbedtls
andpico_lwip_mbedtls
it compiles fine.NOTE: I'm not using any functionality of mbedtls yet. I'm just trying to check if it works.
NOTE 2: My system infos:
EDIT: I'm using the last version of pico-sdk version 1.4.0, on commit 2e6142b.