Last active
May 21, 2024 09:41
-
-
Save farrrb/032dcb907a0787ede67173fe68f97915 to your computer and use it in GitHub Desktop.
C2000 Compiler Toolchain File for CMake (TMS320x2xxx Microcontroller)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# cl2000 - Toolchain File | |
# F. Zahn - 2018 | |
############################################################################### | |
#set this path according to your needs | |
set(CGT_TOOLCHAIN_DIR "C:/your/path/to/the/toolchain") | |
# set target system | |
set(CMAKE_SYSTEM_NAME Generic) | |
set(CMAKE_SYSTEM_VERSION 1) | |
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) | |
# toolchain paths | |
find_program(TI_GCC NAMES cl2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_CXX NAMES cl2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_AS NAMES cl2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_AR NAMES ar2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_OBJCOPY NAMES ofd2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_OBJDUMP NAMES hex2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_SIZE NAMES size2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
find_program(TI_LD NAMES cl2000 PATHS ${CGT_TOOLCHAIN_DIR}/bin NO_DEFAULT_PATH) | |
# set executables settings | |
set(CMAKE_C_COMPILER ${TI_GCC}) | |
set(CMAKE_CXX_COMPILER ${TI_CXX}) | |
set(AS ${TI_AS}) | |
set(AR ${TI_AR}) | |
set(OBJCOPY ${TI_OBJCOPY}) | |
set(OBJDUMP ${TI_OBJDUMP}) | |
set(SIZE ${TI_SIZE}) | |
set(LD ${TI_LD}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment