Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Pi Pico / RP2040 Microcontrollers #148

Open
alijani1 opened this issue Jun 26, 2022 · 3 comments
Open

Support Pi Pico / RP2040 Microcontrollers #148

alijani1 opened this issue Jun 26, 2022 · 3 comments

Comments

@alijani1
Copy link

Does not seem the library support the RP2040 controllers like the Pi Pico.

@lexus2k
Copy link
Owner

lexus2k commented Oct 12, 2022

Hi
If you let me know some more details on what IDE you use for Pi Pico, what BSP is used, that would be very helpful

@RockaBen99
Copy link

I have also been trying to use this library with a Pico, using Mbed OS (tried with both version 2.5.2 and version 3.4.1). When attempting to upload through Arduino IDE 1.8.13 on Debian (specifically Raspbian) Linux, I get this error:

arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/benedict/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/benedict/.arduino15/packages -libraries /home/benedict/Arduino/libraries -fqbn=arduino:mbed_rp2040:pico -vid-pid=2E8A_00C0 -ide-version=10813 -build-path /tmp/arduino_build_482146 -warnings=none -build-cache /tmp/arduino_cache_934760 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs=runtime.tools.openocd.path=/home/benedict/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2 -prefs=runtime.tools.openocd-0.11.0-arduino2.path=/home/benedict/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2 -prefs=runtime.tools.bossac.path=/home/benedict/.arduino15/packages/arduino/tools/bossac/1.9.1-arduino2 -prefs=runtime.tools.bossac-1.9.1-arduino2.path=/home/benedict/.arduino15/packages/arduino/tools/bossac/1.9.1-arduino2 -prefs=runtime.tools.rp2040tools.path=/home/benedict/.arduino15/packages/arduino/tools/rp2040tools/1.0.2 -prefs=runtime.tools.rp2040tools-1.0.2.path=/home/benedict/.arduino15/packages/arduino/tools/rp2040tools/1.0.2 -prefs=runtime.tools.dfu-util.path=/home/benedict/.arduino15/packages/arduino/tools/dfu-util/0.10.0-arduino1 -prefs=runtime.tools.dfu-util-0.10.0-arduino1.path=/home/benedict/.arduino15/packages/arduino/tools/dfu-util/0.10.0-arduino1 -verbose /tmp/arduino_modified_sketch_181006/ssd1306_demo.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/benedict/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/benedict/.arduino15/packages -libraries /home/benedict/Arduino/libraries -fqbn=arduino:mbed_rp2040:pico -vid-pid=2E8A_00C0 -ide-version=10813 -build-path /tmp/arduino_build_482146 -warnings=none -build-cache /tmp/arduino_cache_934760 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs=runtime.tools.openocd.path=/home/benedict/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2 -prefs=runtime.tools.openocd-0.11.0-arduino2.path=/home/benedict/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2 -prefs=runtime.tools.bossac.path=/home/benedict/.arduino15/packages/arduino/tools/bossac/1.9.1-arduino2 -prefs=runtime.tools.bossac-1.9.1-arduino2.path=/home/benedict/.arduino15/packages/arduino/tools/bossac/1.9.1-arduino2 -prefs=runtime.tools.rp2040tools.path=/home/benedict/.arduino15/packages/arduino/tools/rp2040tools/1.0.2 -prefs=runtime.tools.rp2040tools-1.0.2.path=/home/benedict/.arduino15/packages/arduino/tools/rp2040tools/1.0.2 -prefs=runtime.tools.dfu-util.path=/home/benedict/.arduino15/packages/arduino/tools/dfu-util/0.10.0-arduino1 -prefs=runtime.tools.dfu-util-0.10.0-arduino1.path=/home/benedict/.arduino15/packages/arduino/tools/dfu-util/0.10.0-arduino1 -verbose /tmp/arduino_modified_sketch_181006/ssd1306_demo.ino
Using board 'pico' from platform in folder: /home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2
Using core 'arduino' from platform in folder: /home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2
Build options changed, rebuilding all
Detecting libraries used...
"/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/defines.txt" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/cxxflags.txt" -DARDUINO_ARCH_RP2040 -mcpu=cortex-m0plus -w -x c++ -E -CC -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_MBED_RP2040 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated-avr-comp" "-iprefix/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/includes.txt" "/tmp/arduino_build_482146/sketch/ssd1306_demo.ino.cpp" -o "/dev/null"
"/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/defines.txt" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/cxxflags.txt" -DARDUINO_ARCH_RP2040 -mcpu=cortex-m0plus -w -x c++ -E -CC -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_MBED_RP2040 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO" "-I/home/benedict/Arduino/libraries/ssd1306/src" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated-avr-comp" "-iprefix/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/includes.txt" "/tmp/arduino_build_482146/sketch/ssd1306_demo.ino.cpp" -o "/dev/null"
"/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/defines.txt" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/cxxflags.txt" -DARDUINO_ARCH_RP2040 -mcpu=cortex-m0plus -w -x c++ -E -CC -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_MBED_RP2040 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO" "-I/home/benedict/Arduino/libraries/ssd1306/src" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated-avr-comp" "-iprefix/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/includes.txt" "/tmp/arduino_build_482146/sketch/sova.cpp" -o "/dev/null"
"/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/defines.txt" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/cxxflags.txt" -DARDUINO_ARCH_RP2040 -mcpu=cortex-m0plus -w -x c++ -E -CC -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_MBED_RP2040 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO" "-I/home/benedict/Arduino/libraries/ssd1306/src" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated-avr-comp" "-iprefix/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/includes.txt" "/home/benedict/Arduino/libraries/ssd1306/src/intf/i2c/ssd1306_i2c.c" -o "/dev/null"
"/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/defines.txt" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/cxxflags.txt" -DARDUINO_ARCH_RP2040 -mcpu=cortex-m0plus -w -x c++ -E -CC -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_MBED_RP2040 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO" "-I/home/benedict/Arduino/libraries/ssd1306/src" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated-avr-comp" "-iprefix/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/includes.txt" "/home/benedict/Arduino/libraries/ssd1306/src/intf/i2c/ssd1306_i2c_embedded.c" -o "/dev/null"
"/home/benedict/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/defines.txt" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/cxxflags.txt" -DARDUINO_ARCH_RP2040 -mcpu=cortex-m0plus -w -x c++ -E -CC -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_MBED_RP2040 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO" "-I/home/benedict/Arduino/libraries/ssd1306/src" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated" "-I/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino/api/deprecated-avr-comp" "-iprefix/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/cores/arduino" "@/home/benedict/.arduino15/packages/arduino/hardware/mbed_rp2040/2.5.2/variants/RASPBERRY_PI_PICO/includes.txt" "/home/benedict/Arduino/libraries/ssd1306/src/intf/i2c/ssd1306_i2c_embedded.c" -o "/tmp/arduino_build_482146/preproc/ctags_target_for_gcc_minus_e.cpp"
/home/benedict/Arduino/libraries/ssd1306/src/intf/i2c/ssd1306_i2c_embedded.c:33:10: fatal error: util/delay_basic.h: No such file or directory
#include <util/delay_basic.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Using library ssd1306 at version 1.8.3 in folder: /home/benedict/Arduino/libraries/ssd1306
exit status 1
Error compiling for board Raspberry Pi Pico.

A similar error happened to someone attempting to use the SoftwareSerial library with the Arduino Nano RP2040 Connect: https://forum.arduino.cc/t/softwareserial-file-util-delay-basic-h-not-found/897597

@alijani1
Copy link
Author

alijani1 commented May 13, 2023

Hi If you let me know some more details on what IDE you use for Pi Pico, what BSP is used, that would be very helpful

Hi. I prefer PlatformIO with VS Code but Arduino IDE would also be fine.

In platformio.ini, my projects typically use the following but I prefer to change the last line :) :

[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower

upload_protocol = picotool
upload_port=D:

lib_archive = no

build_flags =
-D USE_TINYUSB

lib_deps =
https://github.com/adafruit/Adafruit_SSD1306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants