No description
Find a file
Earle F. Philhower, III b2cef8d8d6 Adafruit Feather, overclocking, flash FS shims
Add support for Adafruit Feather RP2040 (8MB).  Identified with a unique
USB PID so it displays properly once programmed one time.  Moved LED to
pin 13 (per the website docs), but have no board to test.

Add over/underclocking menus, applied at boot.  Use at your own risk, as
usual.

Add shims to allocate flash space for a filesystem (but not implemented
yet).

Add a "generic" RP2040 board
2021-03-28 10:56:53 -07:00
ArduinoCore-API@2af4a9c721 Initial commit, basic sanity 2021-02-24 20:31:13 -08:00
assembly Initial commit, basic sanity 2021-02-24 20:31:13 -08:00
cores/rp2040 Adafruit Feather, overclocking, flash FS shims 2021-03-28 10:56:53 -07:00
docs Update index.md 2021-03-21 10:27:55 -07:00
lib Adafruit Feather, overclocking, flash FS shims 2021-03-28 10:56:53 -07:00
libraries Fix INPUT_PULLUP/DOWN, I2C 0-len probes, timeout 2021-03-27 19:50:31 -07:00
package Add missing wiring_private.h 2021-03-24 02:38:03 -07:00
pico-sdk@fc10a97c38 Update to pico-sdk v1.1.0 2021-03-24 08:00:08 -07:00
pico-sdk-lib Remove stdio hacks from libpico.a 2021-03-27 08:14:07 -07:00
pico_base/pico Remove hardcoded path 2021-03-12 21:34:35 -08:00
system Adjust directories for cleaner use w/Arduino 2021-03-17 08:33:51 -07:00
tools Adafruit Feather, overclocking, flash FS shims 2021-03-28 10:56:53 -07:00
variants Adafruit Feather, overclocking, flash FS shims 2021-03-28 10:56:53 -07:00
.gitignore Add support for loading with PicoProbe 2021-03-24 18:50:43 +02:00
.gitmodules Adjust directories for cleaner use w/Arduino 2021-03-17 08:33:51 -07:00
boards.txt Adafruit Feather, overclocking, flash FS shims 2021-03-28 10:56:53 -07:00
LICENSE Create LICENSE 2021-03-02 17:56:36 -08:00
package.json Add missing wiring_private.h 2021-03-24 02:38:03 -07:00
platform.txt Adafruit Feather, overclocking, flash FS shims 2021-03-28 10:56:53 -07:00
programmers.txt Initial commit, basic sanity 2021-02-24 20:31:13 -08:00
README.md Update README.md 2021-03-26 17:57:40 -07:00

Arduino-Pico Join the chat at https://gitter.im/arduino-pico/community

Raspberry Pi Pico Arduino core, for all RP2040 boards

This is a port of the RP2040 (Raspberry Pi Pico processor) to the Arduino ecosystem.

It uses a custom toolset with GCC 10.2 and Newlib 4.0.0, not depending on system-installed prerequisites. https://github.com/earlephilhower/pico-quick-toolchain

There is automated discovery of boards in bootloader mode, so they show up in the IDE, and the upload command works using the Microsoft UF2 tool (included).

Installing via Arduino Boards Manager

Windows Users: Please do not use the Windows Store version of the actual Arduino application because it has issues detecting attached Pico boards. Use the "Windows ZIP" or plain "Windows" executable (EXE) download direct from https://arduino.cc. and allow it to install any device drivers it suggests. Otherwise the Pico board may not be detected. Also, if trying out the 2.0 beta Arduino please install the release 1.8 version beforehand to ensure needed device drivers are present. (See #20 for more details.)

Open up the Arduino IDE and go to File->Preferences.

In the dialog that pops up, enter the following URL in the "Additional Boards Manager URLs" field:

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

image

Hit OK to close the dialog.

Go to Tools->Boards->Board Manager in the IDE

Type "pico" in the search box and select "Add":

image

Installing via GIT

To install via GIT (for latest and greatest versions):

mkdir -p ~/Arduino/hardware/pico
git clone https://github.com/earlephilhower/arduino-pico.git ~/Arduino/hardware/pico/rp2040
cd ~/Arduino/hardware/pico/rp2040
git submodule init
git submodule update
cd pico-sdk
git submodule init
git submodule update
cd ../tools
python3 ./get.py

Installing both Arduino and CMake

Tom's Hardware presented a very nice writeup on installing arduino-pico on both Windows and Linux, available at https://www.tomshardware.com/how-to/program-raspberry-pi-pico-with-arduino-ide

If you follow Les' step-by-step you will also have a fully functional CMake-based environment to build Pico apps on if you outgrow the Arduino ecosystem.

Uploading Sketches

To upload your first sketch, you will need to hold the BOOTSEL button down while plugging in the Pico to your computer. Then hit the upload button and the sketch should be transferred and start to run.

After the first upload, this should not be necessary as the arduino-pico core has auto-reset support. Select the appropriate serial port shown in the Arduino Tools->Port->Serial Port menu once (this setting will stick and does not need to be touched for multiple uploads). This selection allows the auto-reset tool to identify the proper device to reset. Them hit the upload button and your sketch should upload and run.

In some cases the Pico will encounter a hard hang and its USB port will not respond to the auto-reset request. Should this happen, just follow the initial procedure of holding the BOOTSEL button down while plugging in the Pico to enter the ROM bootloader.

Status of Port

Lots of things are working now!

  • digitalWrite/Read (basic sanity tested)
  • shiftIn/Out (tested using Nokia5110 https://github.com/ionpan/Nokia5110)
  • SPI (tested using SdFat 2.0 https://github.com/greiman/SdFat ... note that the Pico voltage regulator can't reliably supply enough power for a SD Card so use external power, and adjust the USE_SIMPLE_LITTLE_ENDIAN define in src/sdfat.h to 0)
  • analogWrite/PWM (tested using Fade.ino)
  • tone/noTone (using IRQ generated waveform)
  • Wire/I2C (tested using DS3231 https://github.com/rodan/ds3231)
  • EEPROM (tested examples)
  • USB Serial(ACM) w/automatic reboot-to-UF2 upload)
  • Hardware UART
  • Servo (basic waveform testing, disables/re-enables without any short pulses)
  • printf (i.e. debug) output over USB serial

The RP2040 PIO state machines (SMs) are used to generate jitter-free:

  • Servos
  • Tones

Todo

Some major features I want to add are:

  • Installable filesystem support (SD, LittleFS, etc.)
  • Updated debug infrastructure
  • I2S port from pico-extras

Tutorials from Across the Web

Here are some links to coverage and additional tutorials for using arduino-pico

Contributing

If you want to contribute or have bugfixes, drop me a note at earlephilhower@yahoo.com or open an issue/PR here.

-Earle F. Philhower, III earlephilhower@yahoo.com