set(ARMCC_TOOLCHAIN_PATH "C:/Keil_v5/ARM/ARMCC/bin")
find_program(ARMCC_COMPILER armcc PATHS ${ARMCC_TOOLCHAIN_PATH})
set(CMAKE_C_COMPILER "${ARMCC_COMPILER}")
set(CMAKE_CXX_COMPILER "${ARMCC_COMPILER}")
find_program(CMAKE_AR armar PATHS ${ARMCC_TOOLCHAIN_PATH})
find_program(CMAKE_LINKER armlink PATHS ${ARMCC_TOOLCHAIN_PATH})
find_program(ARMCC_FROMELF fromelf PATHS ${ARMCC_TOOLCHAIN_PATH})
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
if(NOT EXISTS "${ARMCC_FROMELF}")
    message(STATUS ${ARMCC_FROMELF})
    message(FATAL_ERROR "ARMCC toolchain is not found, please set ARMCC_TOOLCHAIN_PATH variable correctly")
endif()
