STM32f103zet6 对应的cfg文件配置
时间: 2023-12-14 14:36:03 浏览: 220
对于STM32F103ZET6芯片,以下是一个基本的cfg文件配置:
```
# Board/Target
board = stm32f1discovery
# MCU
mcu = stm32f103zet6
# Crystal frequency
hse_freq = 8000000
# Output format
output_format = ihex
# Optimization level
optimize = -O2
# C Standard
std = gnu11
# Stack size
stack_size = 2048
# Heap size
heap_size = 2048
# Linker script
ldscript = ld/stm32f103xe.ld
# Libraries to include
lib_dir = lib
# Source files
source_dir = src
# Include directories
include_dir = inc
# Define macros
macros = -DUSE_HAL_DRIVER -DSTM32F103xE
# Compiler flags
cflags = -Wall -Werror -Wextra -Wpedantic -Wno-unused-variable -Wno-unused-parameter -Wno-unused-function -Wno-unused-but-set-variable -Wno-pedantic-ms-format -Wno-format-security
# Linker flags
ldflags = -specs=nano.specs -specs=nosys.specs -Wl,-Map=$(BUILD_DIR)/$(OUTPUT).map
# Libraries to link
libs = -lm -lc -lnosys -larm_cortexM3l_math
# Flash programming utility
flash = st-flash
# Flash programming utility flags
flash_flags = write $(BUILD_DIR)/$(OUTPUT).bin 0x8000000
# Debugging utility
debug_tool = st-util
# Debugging utility flags
debug_flags = -p 4242
# GDB executable
gdb = arm-none-eabi-gdb
# GDB init script
gdb_init = gdbinit
# GDB flags
gdb_flags = -x $(GDB_INIT) -ex 'target remote :4242'
```
这只是一个基本的配置文件,可能需要根据您的具体应用程序的需求进行调整。您可能需要根据您的硬件配置和编译器版本进行一些更改。
阅读全文