Development Features

SDK Menuconfig

Click the Menuconfig button to open the SDK configuration interface. Two modes are provided. You can switch between them with Mode in Optional Plugin Settings (Menuconfig). The visual editor is the default.

Menuconfig Editor (visual editor)

  1. Select the target chip.

  2. Set Mode to editor (default) and click the Menuconfig button to open the visual configuration editor in a VS Code WebView panel.

  3. Browse, search and modify configuration items in the editor, with what-you-see-is-what-you-get editing.

  4. After finishing the configuration, click Save, and the changes are written to the SDK configuration file.

Classic Menuconfig

  1. Select the target chip.

  2. Set Mode to classic and click the Menuconfig button to open the ncurses-based graphical configuration interface in a terminal. SDK v1.1 supports only this mode.

  3. For more information on SDK configuration, refer to Configure SDK (menuconfig) .

  4. After finishing the SDK configuration, you must save and exit the configuration interface correctly. If you do not save and exit correctly, other functions will not work properly afterward. A notification appears in the bottom-right corner to remind you.

Save Project Configuration (prj.conf)

Save the current menuconfig configuration as prj.conf for version control and reuse of project configurations.

  1. Select the target chip, and finish and save the SDK configuration through Menuconfig first.

  2. Click Advanced → Save Project Configuration.

  3. The extension opens the Ameba terminal and runs the save command automatically:

    • SDK v1.2 and later: prj.conf is saved in the project directory (the SDK root directory for SDK Root projects, the project root directory for external projects).

    • SDK v1.1: prj.conf is saved in the project directory (the <ic>_gcc_project directory for SDK Root projects, the project root directory for external projects).

  4. Check the terminal for the command result.

Note

This command can also be invoked from the Command Palette with Ameba: Save Project Configuration.

Project Compilation

  1. Select the target chip.

  2. Click the Build button to compile the project.

    • SDK Root project: If an application example has been selected in the dropdown menu, the specified example is compiled; if None is selected, the base project configuration is compiled.

    • External project: The project is compiled directly, without example arguments.

  3. The compilation process displays detailed progress and log information in real time.

Project Clean

The extension provides two ways to clean a project:

Clean (incremental clean)

  1. Select the target chip.

  2. Click the Clean button to clean the build output of the current project (the build directory only).

  3. The cleanup process displays detailed progress and log information in real time.

Full Clean (deep clean)

  1. Select the target chip.

  2. Click Advanced → Full Clean to deep-clean the project (including the build and menuconfig directories).

  3. This is suitable when you need a completely fresh build, or when build errors appear after switching chips.

  4. The cleanup process displays detailed progress and log information in real time.

Firmware Flashing

  1. Select the target chip and target serial port.

  2. Set the flashing parameters as described in Optional Plugin Settings (Flash).

    • Selectable baud rates: 115200 / 500000 / 1000000 / 1500000 / 2000000 (default) / 3000000 / 4000000

    • To erase the entire chip before flashing, enable the Erase Chip option (this takes much longer).

  3. Click the Flash button to start the firmware flashing process. Before flashing, the following checks are performed:

    • Layout validity check: whether each partition address is 4K-aligned, whether the start address is smaller than the end address, and whether adjacent partitions overlap.

    • If a check fails, the Flash Layout Information is opened automatically in the editor and an error notice appears, so you can check it easily.

  4. Flashing is based on the SDK configuration and the Flash Layout Information .

  5. Real-time flashing progress and detailed logs are provided.

Serial Monitor

  1. Select the target serial port.

  2. Set the monitoring parameters as described in Optional Plugin Settings (Monitor).

  3. Click the Monitor button to open the integrated serial monitor. It automatically selects the baud rate according to the chip model (115200 bps for AmebaD, 1500000 bps for other models) and connects to the serial port.

  4. Display and receive serial data in real time.

  5. Sending AT commands through the serial port is supported, with auto-completion based on the supported ATCMD List using the Tab key.

  6. A history function is supported: press the ↑ key to quickly view and select previously sent commands.

Code Navigation

The extension supports two code navigation methods, clangd and C/C++ (cpptools), providing go to definition, find references, hover tips, code completion and more.

Item

clangd

C/C++ (cpptools)

Required extension

llvm-vs-code-extensions.vscode-clangd

ms-vscode.cpptools

Index source

compile_commands.json

.vscode/c_cpp_properties.json

Prerequisite for first use

Run Build once to generate the index file

Usable as soon as the configuration is generated

Extras

Background indexing, static diagnostics (clang-tidy)

Also reads compile_commands.json (if already generated)

How to choose:

When the extension generates the .vscode configuration (new / import external project, Set Root SDK Path, Setup Wizard), it chooses automatically based on the extensions currently installed:

  • clangd extension installed: The clangd configuration is written and the cpptools IntelliSense is turned off, so clangd provides code navigation.

  • clangd extension not installed: The cpptools IntelliSense is kept, so the C/C++ extension provides code navigation.

Note

  • If the clangd extension is installed after the configuration was generated, run Ameba: Set Root SDK Path again to regenerate the configuration before it switches to clangd.

  • Both methods require you to install the corresponding extension yourself from the VS Code Marketplace. The extension does not install it automatically.

clangd navigation:

  1. Install the clangd extension.

  2. When the .vscode configuration is generated, the extension writes the clangd arguments (pointing to the compilation database directory) and a .clangd file in the project root directory. The latter filters out compiler options specific to ARM cross-compilation. An existing .clangd is not overwritten.

  3. Run Build once to compile the project. When it finishes, compile_commands.json is generated in the build_<chip model>/build/ directory.

  4. clangd builds the index in the background. Once indexing finishes, code navigation works normally.

After you switch the target chip, the extension automatically updates the compilation database path used by clangd and restarts clangd. You need to rebuild once to generate the new chip’s compile_commands.json. Until the first build finishes, clangd has no index data and code navigation is unavailable.

C/C++ (cpptools) navigation:

  1. Install the C/C++ extension.

  2. When the .vscode configuration is generated, the extension writes a configuration named ameba-rtos to .vscode/c_cpp_properties.json, containing the compiler path, the header search paths and the compile_commands.json path. Other existing configurations are not overwritten.

  3. It can be used as soon as the configuration is generated. After you run Build to generate compile_commands.json, cpptools also reads that file.

Ameba Terminal

The extension provides a dedicated terminal with the SDK environment pre-activated, so you can run SDK script commands such as build and flash directly in the terminal.

How to open: Command panel Advanced → Open Ameba Terminal, or press Ctrl+Shift+P and enter Ameba: Open Ameba Terminal.

  • SDK Root project: The terminal working directory is the SDK root directory, and the SDK environment is activated automatically.

  • External project: The terminal working directory is the project root directory, and the environment of the associated SDK is activated automatically.

  • If the dedicated Ameba terminal already exists and is healthy, it is reused; if it is abnormal, it is recreated automatically.

Online Documentation

Click the Docs button to open the default browser and navigate to the official Realtek Ameba website.