GD32H7xx_CLion_工程模版.zip
大小:670.76KB
价格:50积分
下载量:0
评分:
5.0
上传者:weixin_43026921
更新日期:2025-09-22

GD32H7系列CLion工程模版

资源文件列表(大概)

文件名
大小
GD32H7xx_CLion_工程模版/
-
GD32H7xx_CLion_工程模版/CMakeLists.txt
2.75KB
__MACOSX/GD32H7xx_CLion_工程模版/._CMakeLists.txt
176B
GD32H7xx_CLion_工程模版/.DS_Store
12KB
__MACOSX/GD32H7xx_CLion_工程模版/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/
-
__MACOSX/GD32H7xx_CLion_工程模版/._Drivers
176B
GD32H7xx_CLion_工程模版/Core/
-
__MACOSX/GD32H7xx_CLion_工程模版/._Core
176B
GD32H7xx_CLion_工程模版/gd32h7xx.cfg
332B
__MACOSX/GD32H7xx_CLion_工程模版/._gd32h7xx.cfg
176B
GD32H7xx_CLion_工程模版/Middlewares/
-
__MACOSX/GD32H7xx_CLion_工程模版/._Middlewares
176B
GD32H7xx_CLion_工程模版/gd32h7xx_flash.ld
2.5KB
__MACOSX/GD32H7xx_CLion_工程模版/._gd32h7xx_flash.ld
176B
GD32H7xx_CLion_工程模版/Drivers/.DS_Store
10KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/
-
GD32H7xx_CLion_工程模版/Drivers/CMSIS/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/._CMSIS
176B
GD32H7xx_CLion_工程模版/Core/main.h
1.69KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._main.h
176B
GD32H7xx_CLion_工程模版/Core/.DS_Store
6KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Core/gd32h7xx_it.h
2.48KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._gd32h7xx_it.h
176B
GD32H7xx_CLion_工程模版/Core/systick.c
2.49KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._systick.c
176B
GD32H7xx_CLion_工程模版/Core/main.c
3.34KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._main.c
176B
GD32H7xx_CLion_工程模版/Core/gd32h7xx_libopt.h
3.04KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._gd32h7xx_libopt.h
176B
GD32H7xx_CLion_工程模版/Core/gd32h7xx_it.c
3.74KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._gd32h7xx_it.c
176B
GD32H7xx_CLion_工程模版/Core/systick.h
1.88KB
__MACOSX/GD32H7xx_CLion_工程模版/Core/._systick.h
176B
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/.DS_Store
10KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/
-
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/
-
GD32H7xx_CLion_工程模版/Drivers/CMSIS/.DS_Store
10KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/._Include
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/._GD
176B
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_dbg.h
13.5KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_rspdif.h
24.67KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_edout.h
5.61KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_exti.h
34.29KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_cpdm.h
5.75KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_rcu.h
195.05KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_lpdts.h
11.84KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_i2c.h
29.48KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_ipa.h
34.44KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_ospim.h
7.93KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_dci.h
16.73KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_exmc.h
55.81KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_syscfg.h
59.08KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_hau.h
14.23KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_rtc.h
57.6KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_hwsem.h
32.09KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_wwdgt.h
4.38KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_misc.h
12.86KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_spi.h
54.29KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_axiim.h
18.88KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_enet.h
144.09KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_usart.h
50.23KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_pmu.h
19.14KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_fmc.h
38.75KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_tmu.h
9.89KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_tli.h
25.36KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_ctc.h
11.23KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_ospi.h
66.21KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_can.h
123.94KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_fwdgt.h
6.84KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_trng.h
11.52KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_sdio.h
37.86KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_rameccmu.h
15.62KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_efuse.h
18.19KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_hpdf.h
61.23KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_crc.h
6.35KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_gpio.h
32.8KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_cmp.h
25.62KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_cau.h
19.57KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_fac.h
16.64KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_mdio.h
15.07KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_timer.h
113.29KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_trigsel.h
34.94KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_adc.h
52.15KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_mdma.h
48.25KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_rtdec.h
10.52KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_vref.h
4.38KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_dma.h
117.85KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_dac.h
20.6KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Include/gd32h7xx_sai.h
44.12KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_efuse.c
18.7KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_sdio.c
38.77KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_rameccmu.c
19.37KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_fwdgt.c
8.08KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_trng.c
11.47KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_cau_des.c
6.83KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_can.c
71.2KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_ospi.c
59.31KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_cmp.c
17.39KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_cau_aes.c
32.94KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_gpio.c
18.05KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_crc.c
8.94KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_hpdf.c
63.47KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_cau_tdes.c
7.47KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_dac.c
24.16KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_sai.c
31.49KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_dma.c
86.82KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_vref.c
4.36KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_adc.c
53.16KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_trigsel.c
37.67KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_timer.c
187.61KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_mdma.c
51.31KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_rtdec.c
14.46KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_cau.c
25.63KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_mdio.c
13.58KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_fac.c
22.02KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_i2c.c
32.49KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_rcu.c
104KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_lpdts.c
9.63KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_cpdm.c
11.45KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_exti.c
8.97KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_edout.c
7.82KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_rspdif.c
21.75KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_dbg.c
6.17KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_syscfg.c
28.62KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_hau.c
12.92KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_exmc.c
42.69KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_ospim.c
7.91KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_hau_sha_md5.c
15.33KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_dci.c
13.37KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_ipa.c
35.03KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_pmu.c
16.71KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_usart.c
53.46KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_enet.c
163.18KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_misc.c
10.8KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_wwdgt.c
4.21KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_hwsem.c
9.05KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_spi.c
51.11KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_rtc.c
45.73KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_ctc.c
12.77KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_fmc.c
69.85KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_tli.c
24.12KB
GD32H7xx_CLion_工程模版/Drivers/GD32H7xx_standard_peripheral/Source/gd32h7xx_tmu.c
7.09KB
GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/core_cm7.h
144.34KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/._core_cm7.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/cmsis_compiler.h
8.68KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/._cmsis_compiler.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/mpu_armv7.h
11.42KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/._mpu_armv7.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/cmsis_gcc.h
59.43KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/._cmsis_gcc.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/cmsis_version.h
1.64KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/Include/._cmsis_version.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/.DS_Store
8KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/._GD32H7xx
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/.DS_Store
10KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Include/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/._Include
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/._Source
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Include/gd32h7xx.h
33.45KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Include/._gd32h7xx.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Include/system_gd32h7xx.h
2.32KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Include/._system_gd32h7xx.h
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/.DS_Store
8KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/._.DS_Store
120B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/ARM/
-
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/._ARM
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/system_gd32h7xx.c
23.73KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/._system_gd32h7xx.c
176B
GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/ARM/startup_gd32h7xx.s
36.86KB
__MACOSX/GD32H7xx_CLion_工程模版/Drivers/CMSIS/GD/GD32H7xx/Source/ARM/._startup_gd32h7xx.s
176B

资源内容介绍

GD32H7系列CLion工程模版
set(CMAKE_SYSTEM_NAME Generic)set(CMAKE_SYSTEM_VERSION 1)cmake_minimum_required(VERSION 3.19)# specify cross-compilers and toolsset(CMAKE_C_COMPILER arm-none-eabi-gcc)set(CMAKE_CXX_COMPILER arm-none-eabi-g++)set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)set(CMAKE_AR arm-none-eabi-ar)set(CMAKE_OBJCOPY arm-none-eabi-objcopy)set(CMAKE_OBJDUMP arm-none-eabi-objdump)set(SIZE arm-none-eabi-size)set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)# project settingsproject(gd32H7_gcc C CXX ASM)set(CMAKE_CXX_STANDARD 20)set(CMAKE_C_STANDARD 11)#Uncomment for hardware floating point#add_compile_definitions(ARM_MATH_CM4;ARM_MATH_MATRIX_CHECK;ARM_MATH_ROUNDING)#add_compile_options(-mfloat-abi=hard -mfpu=fpv4-sp-d16)#add_link_options(-mfloat-abi=hard -mfpu=fpv4-sp-d16)#Uncomment for software floating point#add_compile_options(-mfloat-abi=soft)add_compile_options(-mcpu=cortex-m7 -mthumb -mthumb-interwork)add_compile_options(-ffunction-sections -fdata-sections -fno-common -fmessage-length=0)# uncomment to mitigate c++17 absolute addresses warnings#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-register")# Enable assembler files preprocessingadd_compile_options($<$<COMPILE_LANGUAGE:ASM>:-x$<SEMICOLON>assembler-with-cpp>)if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") message(STATUS "Maximum optimization for speed") add_compile_options(-Ofast)elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") message(STATUS "Maximum optimization for speed, debug info included") add_compile_options(-Ofast -g)elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel") message(STATUS "Maximum optimization for size") add_compile_options(-Os)else () message(STATUS "Minimal optimization, debug info included") add_compile_options(-Og -g)endif ()#把头文件包含一下include_directories( Drivers/CMSIS/GD/GD32H7xx/Include Drivers/CMSIS/Include Drivers/GD32H7xx_standard_peripheral/Include Core )add_definitions(-DDEBUG -DGD32H7XX)file(GLOB_RECURSE SOURCES "Core/*.*" "Drivers/*.*")set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/gd32h7xx_flash.ld)add_link_options(-Wl,-gc-sections,--print-memory-usage,-Map=${PROJECT_BINARY_DIR}/${PROJECT_NAME}.map)add_link_options(-mcpu=cortex-m3 -mthumb -mthumb-interwork)add_link_options(-T ${LINKER_SCRIPT})add_executable(${PROJECT_NAME}.elf ${SOURCES} ${LINKER_SCRIPT})set(HEX_FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.hex)set(BIN_FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.bin)add_custom_command(TARGET ${PROJECT_NAME}.elf POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex $<TARGET_FILE:${PROJECT_NAME}.elf> ${HEX_FILE} COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}.elf> ${BIN_FILE} COMMENT "Building ${HEX_FILE}Building ${BIN_FILE}")

用户评论 (0)

发表评论

captcha