Skip to content

SiFli CodeKit

SiFli CodeKit is the VS Code extension for SiFli-SDK development. It provides guided actions for installing SDK tools, selecting a board, building an example, flashing firmware, and opening a serial console.

Use this path if you prefer an IDE workflow. If you want to understand the commands behind the buttons, use the manual SiFli-SDK guide.

This is the first-run guide. After hello_world works, use the canonical CodeKit tool reference for CodeKit's day-to-day role, reproducibility expectations, and failure boundaries.

What You'll Need

Hardware

  • An SF32 development board supported by SiFli-SDK.
  • A USB Type-C data cable connected to the board's USB-to-UART port.
  • A computer running Windows, macOS, or Linux.

Software

  • Visual Studio Code
  • The SiFli CodeKit extension.
  • Git, if CodeKit asks you to clone or import SiFli-SDK.

Official reference

Install CodeKit

  1. Open VS Code.
  2. Open Extensions.
  3. Search for SiFli-SDK-CodeKit.
  4. Install the extension.
  5. Reload VS Code if prompted.

To open SDK management, click the SiFli icon in the VS Code sidebar and choose SDK Manager. You can also open View > Command Palette (default shortcut F1) and run Manage SiFli SDK installation. The exact labels can vary with the extension version; see the official installation guide linked above.

Tip

If you cannot find the action you need, open the Command Palette and search for SiFli.

Install or Select SiFli-SDK

Use CodeKit's setup flow to install SiFli-SDK, or point it at an SDK copy you already cloned. For most users, choose a Release/Tag: it is a versioned, tested baseline. Choose a Branch when you need newer fixes or features and can accept that it may be less stable. The official guide describes release/vX.Y as a way to get the latest fixes and features for that release line without using the less-stable main branch. Its contents can still change over time.

If you are working from mainland China, the official guide recommends using Gitee as the SDK source and the SiFli domestic mirror for toolchain downloads.

If CodeKit asks for an SDK location, choose a short path without spaces, for example:

~/OpenSiFli/SiFli-SDK
C:\OpenSiFli\SiFli-SDK

CodeKit uses the SDK's own installer and environment scripts. The result should match the manual setup: compiler, Python environment, build tools, and flash tools are prepared together.

Open an Example

Start from the SDK's hello_world example:

example/get-started/hello_world/rtt/project

Open that project folder in VS Code. If CodeKit offers a project import wizard, choose the hello_world project and let it detect the SDK root.

Select the Board

Choose the board configuration that matches your hardware. For an SF32LB52-DevKit-LCD-class board, the common board name is:

sf32lb52-lcd_n16r8

If you use a different board, select the matching board name from CodeKit's list or from the SDK's supported board documentation. The board name controls memory layout, pins, flash settings, and default peripherals.

Build

Run CodeKit's Build action. A successful build creates a board-specific output folder such as:

build_sf32lb52-lcd_n16r8_hcpu

If the build fails immediately, check that CodeKit knows where SiFli-SDK is installed and that the SDK environment has finished installing.

Flash

Connect the board through the USB-to-UART port, then run CodeKit's Flash or Download action.

When prompted for a serial port:

  • On Windows, choose the matching COM port.
  • On macOS, choose the /dev/cu.* device rather than /dev/tty.*.
  • On Linux, choose the matching /dev/ttyUSB* or /dev/ttyACM* device.

If the download tool does not enter UART download mode, reset the board immediately before starting the transfer. If the problem persists, follow the board-specific flashing instructions.

Open the Serial Console

Use CodeKit's serial monitor, VS Code's serial tooling, or another terminal program. After reset, the console should show readable boot output and the hello_world example output.

If you see readable boot logs, the board and serial settings are correct. If the output is garbled, close other serial tools and confirm the baud rate used by the example.

Success Check

You are ready to move on when:

  • CodeKit recognizes the SDK location.
  • The selected board matches your hardware.
  • Build and flash actions complete.
  • The serial console shows hello_world output after reset.

Troubleshooting

Table: Troubleshooting
Symptom Check
No serial port appears Try a data cable, another USB port, or the board's USB-to-UART connector.
CodeKit cannot find the SDK Re-run the CodeKit setup flow and select the SiFli-SDK root folder.
Build cannot find tools Let CodeKit reinstall the toolchain, or run the SDK installer manually once.
Flash fails to start If the tool does not enter UART download mode, reset the board immediately before transfer. If the problem persists, follow the board-specific flashing instructions.
Serial output is unreadable Check baud rate and make sure only one serial monitor is open.

Where to Go Next

Keep the Setup Reproducible

Record the CodeKit and SDK versions, the selected release tag or branch, and the exact board target. If a menu or command label differs from this page, use the current official installation guide and the SDK's supported-boards list as the references for your installed versions.

Last updated: