Skip to content

Improved Raspberry Pi Pico support#468

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
LinuxJedi:RP2350
Nov 8, 2024
Merged

Improved Raspberry Pi Pico support#468
dgarske merged 1 commit intowolfSSL:masterfrom
LinuxJedi:RP2350

Conversation

@LinuxJedi
Copy link
Copy Markdown
Member

Fixes and improvements for RP2040 and added RP2350 support:

  • Made UART printf output optional
  • Made WiFi support optional
  • Added compile support for RP2350
  • Re-wrote README
  • Fixed compile issues

Requires wolfSSL/wolfssl#8153

@LinuxJedi
Copy link
Copy Markdown
Member Author

Addressed comments indicated in a Slack conversation.

Copy link
Copy Markdown
Member

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot get past this error with the blink:

[ 41%] Built target benchmark
[ 41%] Building C object CMakeFiles/Wifi.dir/src/blink.c.obj
/home/davidgarske/GitHub/wolfssl-examples/RPi-Pico/src/blink.c:23:10: fatal error: pico/cyw43_arch.h: No such file or directory
   23 | #include "pico/cyw43_arch.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/Wifi.dir/build.make:76: CMakeFiles/Wifi.dir/src/blink.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1840: CMakeFiles/Wifi.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Comment thread RPi-Pico/config/user_settings.h
Comment thread RPi-Pico/CMakeLists.txt
@dgarske dgarske removed their assignment Nov 7, 2024
@LinuxJedi LinuxJedi force-pushed the RP2350 branch 3 times, most recently from 5ca2521 to 0a86c2d Compare November 8, 2024 08:01
@LinuxJedi
Copy link
Copy Markdown
Member Author

LinuxJedi commented Nov 8, 2024

OK, lots of improvements in this morning's update:

  • Added the compile fixes we discussed
  • Fixed the issue you had with WiFi compiling (see below)
  • Added WiFi setup options to README and descriptions in CMake
  • Added a prerequisites section
  • Added a section for uploading to the Pico
  • Added a section for terminal output
  • Specified that you can use any PICO_BOARD and pointed to the list

WiFi compiling issues

So, USE_WIFI was on by default, but unless PICO_BOARD was set to a board that had a CYW43 chip, the include directories / linking were not setup for WiFi. Now:

  • USE_WIFI is now off by default
  • If you try to use USE_WIFI without a PICO_BOARD that has a CYW43, CMake will error with "You can only set USE_WIFI when a PICO_BOARD with wifi is used"

@LinuxJedi LinuxJedi requested a review from dgarske November 8, 2024 08:04
Fixes and improvements for RP2040 and added RP2350 support:

* Made UART `printf` output optional
* Made WiFi support optional
* Added compile support for RP2350
* Added compile support for RP2350 in RISC-V mode
* Re-wrote README
* Fixed compile issues
@LinuxJedi
Copy link
Copy Markdown
Member Author

Another push because I quickly added RISC-V mode for the RP2350 too.

Copy link
Copy Markdown
Member

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked amazing!
wolfCrypt test/bench both run and pass.
Tested on MacOS with Intel and Rpi5.
Ran on RP2040
Thank you

@dgarske dgarske merged commit 94e089e into wolfSSL:master Nov 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants