[Raspberry Pi Pico Review] IDE Selection and Debugging
[Copy link]
This post was last edited by UBTWO on 2021-4-25 16:54
Raspberry Pi Pico provides two programming language development environments: C/C++ and MicroPython.
"Life is short, I'll learn Python." If you want to master the Raspberry Pi in the shortest time, then the latter is the obvious choice.
IDE selection
The IDE recommended by Raspberry Pi and MicroPython is Thonny (I like VScode anyway)
Use VS CODE
The interface is really ugly, but it is very friendly to ESP32 and ESP8266, and can flash micropython firmware with one click (I think)
Because I am used to using vscode - it is free, small in size and highly extensible.
So I use the rtthread vscode plugin to develop the Raspberry Pi Pico
For usage tutorials, search for this plugin in vscode and you will find a link in the comments. The rtthread official website also has usage tutorials.
from machine import Pin
import time
LED = Pin(25,Pin.OUT)
if __name__ == '__main__':
while True:
LED.value(0)
time.sleep(1)
LED.value(1)
time.sleep(1)
After installing the plug-in, click the first step to connect the serial port, then click the second step to see the LED light on the pico flashing
If you want to solidify the program in pico, right-click the project in the workspace and select the first file to download to the device
Using the Raspberry Pi Pico
Download RT-Thread Studio
You can download the latest version of Studio in RT-Thread Club .
As a development tool software, RT-Thread Studio requires a process from understanding to familiarity, and from familiarity to proficient application. Especially for users who have not used eclipse-based development tool software before, it is recommended to first familiarize yourself with the basic usage of the software and the main function entrances, and then try to develop a project. If you encounter problems, you can first refer to the relevant documents , video tutorials and FAQs. If you can't find a solution, you can post in the Studio forum and Studio support staff will help solve the problem.
Download Pico SDK
- Click SDK Manager:
- Download the latest Pico board support package:
Create a Pico project
- Create RT-Thead project:
- Select Pico Development Board:
- Click Finish to complete the project creation.
Compile and download
- Click the build button to compile the project:
- Press the BOOTSEL button on the development board and insert the USB cable and serial cable:
- Open the serial port debugging assistant in Studio:
- Open the directory where the compiled rtthread-pico.uf2 file is located:
- Download the uf2 file to the Pico development board:
- After the download is successful, the LED light of the Pico development board will flash:
- Interact with Pico through the Studio serial port tool and experience running RT-Thread on the Pico development board:
|