CMake project debugging C++ problem
I'm wondering with implementation of CMake into stm cube.
I tried default project executable and it works for C and I'm able to debug it.
But if I change it to C++ I'm unable to debug it. Program always jumps to this line:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
At first I separate the sources and asm file by
set (PROJECT_ASM_SOURCES
# LIST SOURCE FILES HERE
Startup/startup_stm32h745zitx.s
)
set (PROJECT_SOURCES
# LIST SOURCE FILES HERE
Sources/main.c
Sources/syscalls.c
Sources/sysmem.c
)
then I set c files to c++ by:
set_source_files_properties(${PROJECT_SOURCES} PROPERTIES LANGUAGE CXX)
and added these file to executable:
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES} ${PROJECT_ASM_SOURCES})
I used NUCLEO-H745ZI-Q board. I tried several compiler settings, linker, rename files to cpp, but with no success.