Arduino announced that its IDE will now support Raspberry Pi RP2040 chips using the Arduino Mbed core. This means that programmers will no longer have to use the unofficial board plugins in the Arduino IDE to program their Raspberry Pi Pico. In the initial launch of the Raspberry Pi Pico, the only way to set up and program the device in C was via the VS code toolchain. However, this method was very complicated and time-consuming. So, as an alternative, GitHub user Earle F Philhower created his own Arduino-Pico port for all RP2040 boards, successfully integrating the Pico in the Arduino ecosystem.
It used the bare Raspberry Pi Pico SDK and a custom GCC 10.2/Newlib 4.0 toolchain. The Raspberry Pi Pico finally had support inside the Arduino IDE thanks to Earle’s port. This made setting up and programming the Pico much easier. The port supported features such as pulse width modulation (PWM) and programmable input/output (PIO) state machine control for jitter-free servo control. However, there were still a few shortcomings in the port. For example, it did not support installable file systems or I2S. Additionally, Earle planned on updating the debug infrastructure. Finally, Arduino’s official support is now available as a prelude to their release of the Nano RP2040 connect.
What is in this new Arduino Core?
Arduino IDE uses a Mbed OS-based core since it was first adapted for the Nano 33 BLE and Nano 33 BLE sense. Mbed is a platform and OS for internet-connected devices based on 32 bit ARM Cortex-M Microcontrollers. As Mbed shares its drivers and libraries with the Arduino Core, it is easy to support new Arduino boards with IoT capabilities, such as the Nano RP2040 connect. Arduino has provided 2 cores this time. One is for the Nano RP2040 Connect, and the other is for RP2040-based boards such as Raspberry Pi Pico. The cores can be accessed through the Boards Manager. It is possible to install cores from there.
Although there are a few drawbacks of using the official RP2040 core for Raspberry Pi Pico. Few libraries are not compatible with the Pico and will throw an error message for complex scripts. Furthermore, the Raspberry Pi Pico compiler for the Arduino IDE is not as efficient as the one used for Arduino boards since similar code on Raspberry Pi Pico takes up a lot more space than code on an Arduino Mega. To run this core on Arduino IDE 2.0, the 1.8 version of the IDE must be installed beforehand to get all the device drivers.
Arduino took their time to introduce support for the RP2040 chips in their IDE, but it ensures that this core is a stable and comprehensive release. The current version is still rough around the edges but it’,s still better than the unofficial Arduino-Pico core. This is good for anyone who wants to start working on a Pico immediately or for hobbyists who wish to write their own simple code. Sources for the pictures and technical details are on Arduino’s official blog post. For more information on Earle’s Arduino-Pico port, please visit his Github page.
Harsh Pawar is a student of Mechanical Engineering. Specializes in the Mechatronics domain. Alongside this, He’s an avid runner and an auto enthusiast