freebsder 发表于 2024-12-17 17:22
链接加-lm试试
这个方法我已经试过了,但是不管事,而且据说是位置不对
# This file was automatically generated by RASC and should not be edited by the user.
# Use CMakeLists.txt to override the settings in this file
set(RASC_TARGET_DEVICE R7FA6M5BH)
set(RASC_TARGET_ARCH cortex-m33)
set(RASC_PROJECT_NAME FSP_DAC_EXT)
SET(RASC_TOOLCHAIN_NAME GCC)
SET(RASC_CMAKE_ASM_FLAGS "-mfloat-abi=hard;-mcpu=cortex-m33;-mfpu=fpv5-sp-d16;-Wunused;-Wuninitialized;-Wall;-Wextra;-Wmissing-declarations;-Wconversion;-Wpointer-arith;-Wshadow;-Wlogical-op;-Waggregate-return;-Wfloat-equal;-fmessage-length=0;-fsigned-char;-ffunction-sections;-fdata-sections;-mthumb;-x;assembler-with-cpp;-MMD;-MP")
SET(RASC_CMAKE_C_FLAGS "-mfloat-abi=hard;-mcpu=cortex-m33;-mfpu=fpv5-sp-d16;-Wunused;-Wuninitialized;-Wall;-Wextra;-Wmissing-declarations;-Wconversion;-Wpointer-arith;-Wshadow;-Wlogical-op;-Waggregate-return;-Wfloat-equal;-fmessage-length=0;-fsigned-char;-ffunction-sections;-fdata-sections;-mthumb;-std=c99;-MMD;-MP")
SET(RASC_CMAKE_CXX_FLAGS "-mfloat-abi=hard;-mcpu=cortex-m33;-mfpu=fpv5-sp-d16;-Wunused;-Wuninitialized;-Wall;-Wextra;-Wmissing-declarations;-Wconversion;-Wpointer-arith;-Wshadow;-Wlogical-op;-Waggregate-return;-Wfloat-equal;-fmessage-length=0;-fsigned-char;-ffunction-sections;-fdata-sections;-mthumb;-std=c++11;-MMD;-MP")
SET(RASC_CMAKE_EXE_LINKER_FLAGS "-mfloat-abi=hard;-mcpu=cortex-m33;-mfpu=fpv5-sp-d16;-Wunused;-Wuninitialized;-Wall;-Wextra;-Wmissing-declarations;-Wconversion;-Wpointer-arith;-Wshadow;-Wlogical-op;-Waggregate-return;-Wfloat-equal;-fmessage-length=0;-fsigned-char;-ffunction-sections;-fdata-sections;-mthumb;-T;script/fsp.ld;-Wl,--gc-sections;-Wl,-Map,${PROJECT_NAME}.map;--specs=nano.specs;-lm;-o;${CMAKE_BINARY_DIR}/${PROJECT_NAME}.elf")
SET(RASC_CMAKE_DEFINITIONS "_RA_CORE=CM33;_RA_ORDINAL=1;_RENESAS_RA_")
SET(RASC_ASM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/ra_gen/*.asm")
# ADD COMPILE FLAGS FOR GCC version >= 12.2
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.2)
list(INSERT RASC_CMAKE_C_FLAGS 0 "--param=min-pagesize=0;-Wno-format-truncation;-Wno-stringop-overflow")
list(INSERT RASC_CMAKE_CXX_FLAGS 0 "--param=min-pagesize=0;-Wno-format-truncation;-Wno-stringop-overflow")
endif()
SET(RASC_DEBUG_FLAGS "-g;-O2")
SET(RASC_RELEASE_FLAGS "-O2")
SET(RASC_MIN_SIZE_RELEASE_FLAGS "-Os")
SET(RASC_RELEASE_WITH_DEBUG_INFO "-g;-O2")
# Custom targets are defined below
include_guard()
# Create platform-specific command line for running Smart Configurator as a backgrounded
# process, which avoids blocking any calling IDEs
file(TO_NATIVE_PATH "${RASC_EXE_PATH}" RASC_EXE_NATIVE_PATH)
if(CMAKE_HOST_WIN32)
set(RASC_COMMAND start "" /b "${RASC_EXE_NATIVE_PATH}" configuration.xml)
else()
set(RASC_COMMAND sh -c \"${RASC_EXE_NATIVE_PATH} configuration.xml &\")
endif()
# Make target for opening the FSP Configuration in Smart Configurator
add_custom_target(rasc
COMMAND ${RASC_COMMAND}
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "FSP Smart Configurator"
)