change build project name and add some docs

This commit is contained in:
2024-09-21 12:37:15 +08:00
parent b7b439f611
commit 94d4ffa136
9 changed files with 39 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.28)
include(cmake/toolchain.cmake)
project(gd32e23_template)
project(gd32e23x_template)
enable_language(C)
enable_language(CXX)
@@ -10,7 +10,7 @@ enable_language(ASM)
# Use custom startup.S
set(TARGET_STARTUP_ASM ${CMAKE_SOURCE_DIR}/startup/startup_gd32e23x.S)
# Use custom linker script
set(TARGET_LD_SCRIPT ${CMAKE_SOURCE_DIR}/ld/gd_e230f4_gcc.ld)
set(TARGET_LD_SCRIPT ${CMAKE_SOURCE_DIR}/ld/gd32e23x_gcc.ld)
# Add GD SDK
add_subdirectory(sdk)
@@ -21,11 +21,11 @@ set(TARGET_C_SRC
${CMAKE_SOURCE_DIR}/src/wc_bldc_control.c
)
add_executable(gd32e23_template ${TARGET_C_SRC})
add_executable(gd32e23x_template ${TARGET_C_SRC})
target_link_libraries(gd32e23_template GD32E23X_SDK)
target_include_directories(gd32e23_template PUBLIC inc)
target_link_libraries(gd32e23x_template GD32E23X_SDK)
target_include_directories(gd32e23x_template PUBLIC inc)
# Generate .bin and .hex
generate_binary_file(gd32e23_template)
generate_hex_file(gd32e23_template)
generate_binary_file(gd32e23x_template)
generate_hex_file(gd32e23x_template)