本项目提供一个基于 GNU Arm Embedded Toolchain 和 Makefile 的 APM32F103 编译示例。默认目标工程为 SysTick_TimeBase。
- MCU:APM32F103(Cortex-M3)
- 开发板宏:
APM32F103_MINI - 工具链前缀:
arm-none-eabi- - 构建工具:GNU Make
- 默认优化:
-Og - 默认开启调试信息
- 输出目录:
build
请先安装 GNU Arm Embedded Toolchain 和 GNU Make,并确保 arm-none-eabi-gcc 可在系统 PATH 中使用。
cd Makefile
make如果工具链未加入 PATH,可通过 GCC_PATH 指定工具链目录:
make GCC_PATH=/path/to/toolchain/bin清理构建文件:
make clean构建完成后,HEX、BIN、ELF 及映射文件将输出至 build 目录。
Board/:开发板支持文件Library/:APM32F10x 外设驱动与器件文件Source/:应用代码与中断处理Include/:应用头文件Makefile:编译配置build/:构建输出
更换 MCU 型号、链接脚本、启动文件或开发板后,请同步检查编译宏、内存布局、CPU 参数和源文件列表。
更多产品资料与技术支持请访问:www.geehy.com。
This project provides an APM32F103 build example based on the GNU Arm Embedded Toolchain and Make. The default target is SysTick_TimeBase.
- MCU: APM32F103 (Cortex-M3)
- Board macro:
APM32F103_MINI - Toolchain prefix:
arm-none-eabi- - Build tool: GNU Make
- Default optimization:
-Og - Debug information enabled by default
- Output directory:
build
Install the GNU Arm Embedded Toolchain and GNU Make, and ensure that arm-none-eabi-gcc is available in your PATH.
cd Makefile
makeIf the toolchain is not in PATH, specify its binary directory with GCC_PATH:
make GCC_PATH=/path/to/toolchain/binClean the build output:
make cleanThe HEX, BIN, ELF, and map files are generated in the build directory.
Board/: board support filesLibrary/: APM32F10x peripheral drivers and device filesSource/: application and interrupt source filesInclude/: application headersMakefile: build configurationbuild/: generated output
When changing the MCU, linker script, startup file, or board, review the build macros, memory layout, CPU options, and source-file list together.
For product information and technical support, visit www.geehy.com.