Skip to content

⚠️ 产品声明 / Product Disclaimer

非量产产品,仅供工程验证,不承诺符合 RoHS。 Non-mass-production product; for engineering verification only. RoHS compliance is not guaranteed.

1. Development Environment Setup ​

The "9Mod" MCP Verification Board uses STM32F103CBT6 as the main MCU, communicating with the Ai-WV01-32S-Kit development board via the emMCP library for MCP protocol interaction.

Install STM32CubeIDE ​

Download and install STM32CubeIDE (includes STM32CubeMX, ARM GCC toolchain, and debugger all in one):

STM32CubeIDE is ST's all-in-one development environment. After installation you can compile, flash, and debug with no additional toolchain configuration.

Install VSCode Extensions (optional) ​

If you prefer editing code in VSCode, install these extensions from the marketplace:

  • C/C++ — Code completion, navigation, syntax checking
  • Cortex-Debug — ST-Link debugging support
  • CMake — CMake syntax highlighting and integrated build

Get the Source Code ​

bash
git clone https://github.com/Ai-Thinker-Open/emMCP.git

Build the Firmware ​

bash
cd emMCP/example/9Mod_MCPBoard
mkdir -p build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/gcc-arm-none-eabi.cmake
make -j$(nproc)

After a successful build, the build/ directory will contain the 9Mod_MCPBoard.elf firmware file.

To produce a raw binary .bin file, run:

bash
arm-none-eabi-objcopy -O binary 9Mod_MCPBoard.elf 9Mod_MCPBoard.bin

Flash ​

Connect an ST-Link debugger to the SWD interface (PA13 SWDIO / PA14 SWCLK / GND). Flash via STM32CubeIDE or OpenOCD:

bash
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg \
        -c "program build/9Mod_MCPBoard.elf verify reset exit"

2. Reference Video ​


3. Peripheral Pin Quick Reference ​

Function ModuleSTM32 PinInterface
AI Module CommunicationPA2(TX) / PA3(RX)USART2 @ 115200
TTL Debug SerialPA9(TX) / PA10(RX)USART1 @ 1500000
OLED DisplayPA1(DC) / PA4(CS1) / PA5(CLK) / PA7(MOSI) / PB0(CS2)SPI
Radar Detection [Reserved]PA8GPIO Input
RelayPB5GPIO Output
WS2812 LED StripPA11TIM1_CH4 PWM+DMA
IR AC Control [Reserved]PB10(TX) / PB11(RX)USART3
Temp/Humidity + PD DecoyPB6(SDA) / PB7(SCL)I²C (shared bus: SHT30=0x44, CH224K=0x40)
User ButtonsPB4 / PB8GPIO Input
SWD Debug PortPA13(SWDIO) / PA14(SWDCLK)SWD

For full development documentation, refer to the emMCP Programming Guide and Quick Start Guide.

Released under the MIT License. Build Time 2026-09-30 17:31:25