EP-0175

From 52Pi Wiki
Jump to navigation Jump to search

RP2040 Plus

Description

RP2040 Plus is RP2040-based Development Board with Raspberry Pi Pico Pinout Compatibility! This development board is designed to provide an enhanced experience for users familiar with the Raspberry Pi Pico while offering additional features for convenience and flexibility.

Features

  • RP2040 Chip: The development board is powered by the RP2040 microcontroller, which is the same chip used in the Raspberry Pi Pico. It offers excellent performance and flexibility for a wide range of applications.
  • Pinout Compatibility: The board has the same pinout as the Raspberry Pi Pico, allowing you to seamlessly transition your projects from the Pico to this development board without any modifications.
  • Reset Button: An additional reset button is included on the board, providing a convenient way to reset the RP2040 chip without the need to physically disconnect and reconnect the power.
  • Boot Select Button: The board features a boot select button, allowing you to easily switch between different boot modes, such as USB mass storage, USB CDC serial, or custom boot modes.
  • Test LED:An onboard LED is connected to GP25, providing a visual indicator for testing and debugging purposes. You can control the LED directly through software to provide feedback or monitor specific conditions.
  • Flash Size Options: The development board offers two optional flash sizes for storage: 4MB and 8MB. This allows you to choose the capacity that best suits your project's requirements, providing ample space for storing your code, data, and other resources.
  • Expansion Options: The board provides additional pins and headers for connecting external components, sensors, or expansion boards. This allows for easy integration of peripherals and customization of your projects.
  • Breadboard-Friendly: The compact form factor and breadboard-friendly design make it easy to prototype and experiment with various circuits and components.
  • Open-Source: The development board is built with open-source principles in mind, allowing you to access the schematics, design files, and documentation. This enables you to modify and customize the board according to your specific needs.
  • Extensive Software Support: The RP2040 chip has a vibrant and active community, ensuring a wealth of software libraries, examples, and resources are available. You can leverage this support to accelerate your development process and bring your ideas to life quickly.

With its enhanced features, pinout compatibility, and flexibility, the RP2040-based Development Board is an excellent choice for both beginners and experienced users looking to build projects based on the Raspberry Pi Pico platform.

Specifications

  • Chipset: RP2040
  • Package Type, QFN56
  • PCB type: FR4
  • Keys: BOOT / RESET
  • Pin: Compatible with official PICO
  • Pitch: Compatible with official PICO, 2.54MM PITCH
  • Capacity of Flash size: 4MB/8MB/16MB [Optional]
  • Flash footprint: std

Gallery

Package Includes

  • 1 x RP2040 Plus dev board
  • 2 x 20Pin Pin header
  • 1 x 3Pin Debug Pin header

HowTo

  • Raspberry Pi Pico SDK

The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.

The SDK is designed to provide an API and programming environment that is familiar both to non-embedded C developers and embedded C developers alike. A single program runs on the device at a time and starts with a conventional main() method. Standard C/C++ libraries are supported along with C level libraries/APIs for accessing all of the RP2040's hardware include PIO (Programmable IO).

Additionally the SDK provides higher level libraries for dealing with timers, synchronization, USB (TinyUSB) and multi-core programming along with various utilities.

The SDK can be used to build anything from simple applications, to fully fledged runtime environments such as MicroPython, to low level software such as RP2040's on-chip bootrom itself. Additional libraries/APIs that are not yet ready for inclusion in the SDK can be found in pico-extras.

  • Documentation

See Getting Started with the Raspberry Pi Pico for information on how to setup your hardware, IDE/environment and for how to build and debug software for the Raspberry Pi Pico and other RP2040-based devices.

See Connecting to the Internet with Raspberry Pi Pico W to learn more about writing applications for your Raspberry Pi Pico W that connect to the internet.

See Raspberry Pi Pico C/C++ SDK to learn more about programming using the SDK, to explore more advanced features, and for complete PDF-based API documentation.

See Online Raspberry Pi Pico SDK API docs for HTML-based API documentation.

  • Example code

See pico-examples for example code you can build.

Getting the latest SDK code

The master branch of pico-sdk on GitHub contains the latest stable release of the SDK. If you need or want to test upcoming features, you can try the develop branch instead.

Quick-start your own project

These instructions are extremely terse, and Linux-based only. For detailed steps, instructions for other platforms, and just in general, we recommend you see Raspberry Pi Pico C/C++ SDK

  • 1. Install CMake (at least version 3.13), and GCC cross compiler
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
  • 2. Set up your project to point to use the Raspberry Pi Pico SDK
  • 3. Either by cloning the SDK locally (most common) :
git clone  https://github.com/raspberrypi/pico-sdk
  • 4. Copy pico_sdk_import.cmake from the SDK into your project directory
  • 5. Set PICO_SDK_PATH to the SDK location in your environment, or pass it (-DPICO_SDK_PATH=) to cmake later.
  • 6. Setup a CMakeLists.txt like:
cmake_minimum_required(VERSION 3.13)

# initialize the SDK based on PICO_SDK_PATH
# note: this must happen before project()
include(pico_sdk_import.cmake)

project(my_project)

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()

# rest of your project

Or with the Raspberry Pi Pico SDK as a submodule :

Clone the SDK as a submodule called pico-sdk

Setup a CMakeLists.txt like:

cmake_minimum_required(VERSION 3.13)

# initialize pico-sdk from submodule
# note: this must happen before project()
include(pico-sdk/pico_sdk_init.cmake)

project(my_project)

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()

# rest of your project

Or with automatic download from GitHub :

Copy pico_sdk_import.cmake from the SDK into your project directory

Setup a CMakeLists.txt like:

cmake_minimum_required(VERSION 3.13)

# initialize pico-sdk from GIT
# (note this can come from environment, CMake cache etc)
set(PICO_SDK_FETCH_FROM_GIT on)

# pico_sdk_import.cmake is a single file copied from this SDK
# note: this must happen before project()
include(pico_sdk_import.cmake)

project(my_project)

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()

# rest of your project

Or by cloning the SDK locally, but without copying pico_sdk_import.cmake:

git clone this Raspberry Pi Pico SDK repository

Setup a CMakeLists.txt like:

cmake_minimum_required(VERSION 3.13)

# initialize the SDK directly
include(/path/to/pico-sdk/pico_sdk_init.cmake)

project(my_project)

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()

# rest of your project

Write your code (see pico-examples or the Raspberry Pi Pico C/C++ SDK documentation for more information)

About the simplest you can do is a single source file (e.g. hello_world.c)

#include <stdio.h>
#include "pico/stdlib.h"

int main() {
    setup_default_uart();
    printf("Hello, world!\n");
    return 0;
}
<pre>
And add the following to your CMakeLists.txt:

add_executable(hello_world
    hello_world.c
)
  1. Add pico_stdlib library which aggregates commonly used features
target_link_libraries(hello_world pico_stdlib)

# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(hello_world)

Note this example uses the default UART for stdout; if you want to use the default USB see the hello-usb example.

Setup a CMake build directory. For example, if not using an IDE:

$ mkdir build
$ cd build
$ cmake ..

When building for a board other than the Raspberry Pi Pico, you should pass -DPICO_BOARD=board_name to the cmake command above, e.g. cmake -DPICO_BOARD=pico_w .. to configure the SDK and build options accordingly for that particular board.

Doing so sets up various compiler defines (e.g. default pin numbers for UART and other hardware) and in certain cases also enables the use of additional libraries (e.g. wireless support when building for PICO_BOARD=pico_w) which cannot be built without a board which provides the requisite functionality.

For a list of boards defined in the SDK itself, look in this directory which has a header for each named board.

Make your target from the build directory you created.

$ make hello_world

You now have hello_world.elf to load via a debugger, or hello_world.uf2 that can be installed and run on your Raspberry Pi Pico via drag and drop.

SDK Download

Keywords

  • RP2040 Plus, RP2040 dev board.