renesas / fsp

Flexible Software Package (FSP) for Renesas RA MCU Family
https://renesas.github.io/fsp/
Other
182 stars 81 forks source link

elf file location in cmake project #280

Closed liux-pro closed 5 months ago

liux-pro commented 1 year ago

I use RASC generate a cmake project for RA2E1, in file cmake/GeneratedCfg.cmake line 11.

SET(RASC_CMAKE_EXE_LINKER_FLAGS "-g -O0 -mcpu=cortex-m23 -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 fsp.ld -Xlinker --gc-sections -Wl,-Map,${PROJECT_NAME}.map --specs=nano.specs --specs=rdimon.specs -L ${CMAKE_CURRENT_SOURCE_DIR}/ -L ${CMAKE_CURRENT_SOURCE_DIR}/script  -o ${CMAKE_CURRENT_SOURCE_DIR}/build/CMakeFiles/${RASC_PROJECT_NAME}.elf.dir/${RASC_PROJECT_NAME}.elf")

The elf file is hard-coded to write to ${CMAKE_CURRENT_SOURCE_DIR}/build/...., this is not good.
If cmake build directory is build, it is fine. However cmake build directory can be set to anywhere, especially in some IDE, like Clion, which will not use build as the default build directory. In this case, people will not find elf file or face io write error.

renesas-andyb commented 11 months ago

Thank you for your feedback. I'll ask the RASC engineering team to look into improving this for a future RASC release.

renesas-brandon-hussey commented 5 months ago

This was fixed in e2 studio version 2023-10. RA FSP started using e2 studio 2023-10 with FSP v5.0.0.