Project Generation From The Command Line - Raspberry Pi RP2040 Getting Started

Table of Contents

Advertisement

Getting started with Raspberry Pi Pico
Build Options
Run Build
Overwrite Project
IDE Options
Create VSCode Project
Debugger

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
feature. You can add multiple features, up to the memory limitation of the RP2040. You can use the
script to list all the available features. The example above adds support for the I2C and SPI interfaces.
Here passing the
.vscode/settings.json
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
graphical mode.
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
into how your project is actually built, and how the lines in our
8.3. Automating project creation
Description
Once the project has been created, build it. This will produce files ready for
download to the Raspberry Pi Pico.
If a project already exists in the specified folder, overwrite it with the new
project. This will overwrite any changes you may have made.
Description
As well as the CMake files, also create the appropriate Visual Studio Code
project files.
Select which Pico Debugger the VSCode debugging system will use. Defaults
to Serial Wire Debug.
options add the appropriate library code to the build, and also example code to show basic usage of the
option will mean that at
--project
files are also created in addition to the CMake project files.
option to give a list of command line arguments, these will also be applied when using the
--help
structure of the SDK, if you find yourself wanting to know more at some future point.
.vscode/launch.json
Need more detail?
Raspberry Pi Pico C/C++ SDK
CMakeLists.txt
option of the
--list
,
.vscode/c_cpp_properties.json
book dives deeper
files here relate to the
, and
35

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Pico

Table of Contents

Save PDF