DEV Community

Cover image for VSCode Plugin User Guide
QuecPython
QuecPython

Posted on

VSCode Plugin User Guide

To facilitate developers using VSCode for QuecPython development, the QuecPython team has introduced a VSCode plugin called QuecPython.


The plugin currently supports the following features:

• Firmware flashing

• REPL command interaction

• File transfer

• Filesystem directory tree

• Run specific script files

It currently all QuecPython series modules.

Plugin Installation

  1. Click on the Extensions icon in the primary sidebar .

  2. Type QuecPython in the plugin search box.

  3. Find the QuecPython plugin in the search list, click the install button to complete the plugin installation.

Plugin Usage Guide

Before you start, make sure you have downloaded the appropriate QuecPython firmware package for your module. Click here to view how to download firmware packages.

The following steps are demonstrated based on the U-235 development board.

Firmware Flashing

  1. Access the Firmware Flashing Interface on the Primary Sidebar

There are two methods:

– Click on the QuecPython plugin icon on the primary sidebar .

– Use the shortcut Ctrl+Shift+P to open the command palette, type > QuecPython in it, and select QuecPython: Focus on Firmware Manager View from the options, as shown below:

The firmware flashing interface on the primary sidebar is shown in the following image:

  1. Select Firmware

Click the Select Firmware button on the firmware flashing interface, and choose the firmware package for the U-235 development board module.

The path to the firmware package will be displayed on the interface:

  1. Flash Firmware

i. Click the Flash button on the firmware flashing interface.

ii. In the pop-up confirmation window, click the Yes button

Now you can see the firmware flashing progress bar in the lower right corner of the VSCode interface:

When the progress bar shows Flashing Firmware: 8/8 100%, the firmware flashing is complete, and the module will restart.

REPL Command Interaction

Before starting the REPL command interaction for QuecPython, it is necessary to flash the firmware that supports QuecPython functionality.

  1. Find the command to connect to the terminal in the command palette

Use the shortcut Ctrl+Shift+P to open the command palette. Enter > QuecPython in the palette and select QuecPython: Connect to COM Port from the options, as shown below:

  1. connect to Terminal

Follow the instructions in the image below:

  1. Once the operation is completed, the module will be connected to the terminal in VSCode.

At the same time, the terminal window will pop up with the content as shown in the image below:

  1. REPL Command Interaction

After pressing Enter in the terminal, you will see the QuecPython command prompt >>>.

Enter the following code in the terminal:

print("Hello, QuecPython!")

After pressing Enter, you can see the execution result as shown in the following image:

Now, we have completed the simplest QuecPython REPL interaction.

File Transfer

The edited script file test.py needs to be imported into the module’s file system to run.

  1. In the editor page of the file to be transferred (i.e., test.py), right-click the mouse.

  2. Click on the QPY: Download File command to start file transfer.

During the file transfer process, a pop-up window appears in the bottom right corner of the VSCode interface, as shown below:

File System Directory Tree

  1. After the file transfer is complete, click on the Explorer button on the primary sidebar.

  2. Once the Explorer interface is open, look at the bottom and find QPY: FILE SYSTEM (USR). It shows the directory tree of the module’s file system /usr.

The imported file test.py is shown in the following image:

Run Script File

  1. Select the script file test.py in the directory tree.

  2. Right-click on the script file test.py and choose Run Script to execute the script file.

In the terminal window, you can see the script periodically outputting the string "Hello, QuecPython!".

Package Manager

  1. From QuecPython menu -> Quick Access -> Quectel -> Projects + Components

  1. List of Projects + Components will show in the panel

Top comments (0)