EasyManuals Logo
Home>Raspberry Pi>Microcontrollers>RP2040

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 #36 background imageLoading...
Page #36 background image
Build Options Description
Run Build Once the project has been created, build it. This will produce files ready for
download to the Raspberry Pi Pico.
Overwrite Project If a project already exists in the specified folder, overwrite it with the new
project. This will overwrite any changes you may have made.
IDE Options Description
Create VSCode Project As well as the CMake files, also create the appropriate Visual Studio Code
project files.
Debugger Select which Pico Debugger the VSCode debugging system will use. Defaults
to Serial Wire Debug.
8.3.1. Project generation from the command line
The script also provides the ability to create a project from the command line, e.g.
$ export PICO_SDK_PATH="/home/pi/pico/pico-sdk"
$ ./pico_project.py --feature spi --feature i2c --project vscode test
The
--feature options add the appropriate library code to the build, and also example code to show basic usage of the
feature. You can add multiple features, up to the memory limitation of the RP2040. You can use the
--list option of the
script to list all the available features. The example above adds support for the I2C and SPI interfaces.
Here passing the
--project option will mean that at .vscode/launch.json, .vscode/c_cpp_properties.json, and
.vscode/settings.json files are also created in addition to the CMake project files.
Once created you can build the project in the normal way from the command line,
$ cd test/build
$ cmake ..
$ make
or from Visual Studio code.
You can use the --help option to give a list of command line arguments, these will also be applied when using the
graphical mode.
Need more detail?
There should be enough here to show you how to get started, but you may find yourself wondering why
some of these files and incantations are needed. The
Raspberry Pi Pico C/C++ SDK book dives deeper
into how your project is actually built, and how the lines in our
CMakeLists.txt files here relate to the
structure of the SDK, if you find yourself wanting to know more at some future point.
Getting started with Raspberry Pi Pico
8.3. Automating project creation 35

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
BrandRaspberry Pi
ModelRP2040
CategoryMicrocontrollers
LanguageEnglish

Related product manuals