EasyManuals Logo

Raspberry Pi RP2040 User Manual

Raspberry Pi RP2040
77 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #48 background imageLoading...
Page #48 background image
10.1.1.2. Using pico-examples
The standard build system for the Pico environment is CMake. However Eclipse does not use CMake as it has its own
build system, so we need to convert the pico-examples CMake build to an Eclipse project.
At the same level as the
pico-examples folder, create a new folder, for example pico-examples-eclipse
Change directory to that folder
Set the path to the PICO_SDK_PATH
export PICO_SDK_PATH=<wherever>
On the command line enter:
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../pico-examples
This will create the Eclipse project files in our pico-examples-eclipse folder, using the source from the original CMake
tree.
You can now load your new project files into Eclipse using the
Open project From File System option in the File menu.
10.1.1.3. Building
Right click on the project in the project explorer, and select
Build. This will build all the examples.
10.1.1.4. OpenOCD
This example uses the OpenOCD system to communicate with the Raspberry Pi Pico. You will need to have provided the
2-wire debug connections from the host device to the Raspberry Pi Pico prior to running the code. On a Raspberry Pi this
can be done via GPIO connections, but on a laptop or desktop device, you will need to use extra hardware for this
connection. One way is to use a second Raspberry Pi Pico running Picoprobe, which is described in
Appendix A. More
instructions on the debug connections can be found in
Chapter 5.
Once OpenOCD is installed and the correct connection made, Eclipse needs to be set up to talk to OpenOCD when
programs are run. OpenOCD provides a GDB interface to Eclipse, and it is that interface that is used when debugging.
To set up the OpenOCD system, select
Preferences from the Window menu.
Click on
MCU arrow to expand the options and click on Global OpenOCD path.
For the executable, type in “openocd”. For the folder, select the location in the file system where you have cloned the
Pico OpenOCD fork from github.
Figure 22. Setting the
OCD executable name
and path in Eclipse.
Getting started with Raspberry Pi Pico
10.1. Using Eclipse 47

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Raspberry Pi RP2040 and is the answer not in the manual?

Raspberry Pi RP2040 Specifications

General IconGeneral
ProcessorDual-core Arm Cortex-M0+
Clock Speed133 MHz
SRAM264 KB
GPIO30
USBUSB 1.1 Host/Device
PWM16 channels
UART2
SPI2
I2C2
Temperature Range-20°C to +85°C
Operating Voltage1.8V to 3.3V
FlashExternal QSPI flash
I/O InterfacesSPI, I2C, UART, PWM
ADC4 × 12-bit ADC channels

Related product manuals