ไธญๆ / English
This repository is a porting project of the AriesSDK software based on the Phoenix PY32F002B core board, providing a complete software framework, including BootLoader and Application examples. It supports multiple toolchains, enabling developers to quickly achieve embedded project development, debugging, and deployment.
Document Structure
Features
- An overview of the core functionalities and supported features of this project.
Getting Started
Instructions for installation and usage in various development modes.
Covers three development methods: Keil MDK, VSCode+EIDE Plugin, and xmake+ARM-GCC.
Project Structure
Build and Flash
Development and Debugging
Resources and Support
Contribution Guide
1. Features
This project provides the following core functionalities:
1.1 AriesSDK Support
- Provides I2C interface porting for the AriesSDK, allowing quick adaptation for the Phoenix core board.
- Supports multiple peripheral communication protocols, enabling developers to extend their peripheral functionalities.
1.2 BootLoader Example
- Firmware Upgrade: Supports quick firmware upgrades using the TechSync tool.
- Remote Log Debugging: Provides real-time access to device runtime states for quick issue identification.
1.3 Application Example
- Includes rich peripheral examples, such as GPIO, I2C, USB-CDC, and more, covering common embedded development needs.
- Example codes are clearly structured for developers to quickly get started.
1.4 Multi-Toolchain Support
- Keil MDK: Supports ARMCC compiler, suitable for traditional embedded development workflows.
- VSCode + EIDE Plugin: A lightweight development mode that integrates task management and automated builds.
- xmake + ARM-GCC: A cross-platform build toolchain that supports fast compilation and easy integration with other toolchains.
2. Getting Started
2.1 Download Code and Initialize
Clone this repository and initialize the submodules using the following commands:
git clone https://gitee.com/WeCanSTU/Phoenix-AriesSDK.git
cd Phoenix-AriesSDK
git submodule update --init --recursive
2.2 Development Methods Overview
Method 1: Keil MDK Development Mode
Install Keil MDK
Open the Keil project file
Compile and Flash
Method 2: VSCode + EIDE Plugin Development Mode
Install prerequisites
- Keil MDK: As mentioned above, ensure it is installed.
- TechSync Tool: Install the TechSync tool to manage firmware flashing and log debugging.
- VSCode: Download VSCode and install the EIDE (Embedded IDE For VSCode) plugin.
Open the EIDE project
Compile and Flash Firmware
Method 3: xmake + ARM-GCC Development Mode
Install the toolchain
Download and install the ARM GNU Toolchain. Version 10.3 or newer is recommended.
Install the build tool xmake by running the following command:
curl -fsSL https://xmake.io/shget.text | bash
Use VSCode Built-in Tasks
The .vscode/tasks.json
configuration file contains pre-configured tasks that developers can use to compile and flash the project via the task panel (see Build and Flash for details).
3. Project Structure
Below is the explanation of the core project directories:
.
โโโ PY32F002B # Phoenix core board-related projects
โ โโโ App # Application project directory
โ โ โโโ .eide # EIDE project configuration
โ โ โโโ User # User code
โ โโโ Boot # BootLoader project directory
โ โ โโโ User # User code
โ โโโ Port # Ported code directory
โโโ resource # Other related resources
โโโ Sdk # SDK and driver support
โโโ AriesSDK # AriesSDK code
โโโ Py32f002b # PY32F002B platform support files
โโโ Documentation # Documentation resources
โโโ Drivers # Drivers
โโโ Packs # Toolchain packages
โโโ Projects # Example projects
Below is the translation of the provided content into English:
4. Build and Flash
This section provides detailed instructions on how to use the xmake + ARM-GCC environment to compile the project and flash firmware via the VSCode task panel or command line.
Compilation and Flash Tasks
We provide a tasks.json
configuration file for VSCode, which includes commonly used compilation and flash tasks. Below is a detailed description of these tasks and how to use them.
Main Task Descriptions
Build-PY32F002B-APP
- Description: Compiles the
App
project (application layer).
- Tool: Built using the
xmake
build tool.
- Configuration Path:
PY32F002B/App
Rebuild-PY32F002B-APP
Description: Cleans and recompiles the App
project (application layer).
Tool: Built using the xmake
build tool.
Configuration Path: PY32F002B/App
Download-PY32F002B-APP
Description: Downloads the compiled App
firmware to the device.
Tool: Uses xmake
and Lua scripts to flash the firmware.
Configuration Path: PY32F002B/App
Build-PY32F002B-BOOT-HAL
Description: Compiles the BootLoader
project (boot program).
Tool: Built using the xmake
build tool.
Configuration Path: PY32F002B/Boot
Rebuild-PY32F002B-BOOT-HAL
Description: Cleans and recompiles the BootLoader
project.
Tool: Built using the xmake
build tool.
Configuration Path: PY32F002B/Boot
Download-PY32F002B-BOOT
Steps to Use
1. Open VSCode
Ensure the .vscode/tasks.json
file exists and is correctly configured.
2. Open the Task Panel
Navigate in the VSCode menu:
Terminal > Run Task
, and select the task you want to execute, such as:
- Build-PY32F002B-APP: Compile the
App
project.
- Download-PY32F002B-BOOT: Flash the
BootLoader
firmware.
3. Run Tasks with Hotkeys
For default tasks (e.g., Build-PY32F002B-APP
), you can run them directly using the following hotkey:
Ctrl + Shift + B
4. Manual Commands (Optional)
If you need to execute tasks manually, refer to the following commands:
5. Development and Debugging
The compiled firmware is located in the output
folder.
Use TechSync and tsc-cli tools to remotely monitor device logs in real-time.
tsc-cli serial monitor -f -d
6. Resources and Support
7. Contribution Guide
We welcome developers to submit Issues or Pull Requests to contribute code or provide improvement suggestions!