Pico C/C++ Windows Tutorial 2

From Waveshare Wiki
Jump to: navigation, search

New Projects

Get Automatic Project Creation Script

git clone [email protected]:raspberrypi/pico-project-generator.git

or

git clone https://github.com/raspberrypi/pico-project-generator.git
  • Note: The first command is to use the SSH channel protocol, the second is to use the HTTPS protocol, SSH needs to configure the public key (refer to the previous chapter) with account information, HTTPS can download open source projects anonymously, and internal projects need to log in to the account password, https is more convenient for us just cloning the project.

Create Projects

cd pico-project-generator
python ./pico_project.py --gui

If you have multiple python versions installed, you may need to use:

cd pico-project-generator
python3 ./pico_project.py --gui

C++ Windows Tutoria01.png
Create your own project according to your own needs, here we only create a helloworld project that uses UART output.
C++ Windows Tutoria02.png
Wait for the corresponding CMake file to be generated (it will not automatically exit here)
C++ Windows Tutoria03.png
In the project folder, shift+right-click to open the menu bar, and click Open by Code in the figure.
C++ Windows Tutoria04.png
At this time, the corresponding HelloWorld has been generated.
C++ Windows Tutoria05.png