Skip to content

Commit 548deec

Browse files
committed
Start project with basic CMake toolchain.
0 parents  commit 548deec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Toolchains/xc16.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
set(CMAKE_SYSTEM_NAME Generic)
3+
set(CMAKE_SYSTEM_PROCESSOR PIC24FJ256GB106)
4+
5+
set(XC16_PATH /opt/microchip/xc16/v1.25)
6+
set(CMAKE_C_COMPILER ${XC16_PATH}/bin/xc16-gcc)
7+
set(XC16_BIN2HEX ${XC16_PATH}/bin/xc16-bin2hex)
8+
9+
# ensure that only the cross toolchain is searched for
10+
# libraries, include files, and other similar things
11+
set(CMAKE_FIND_ROOT_PATH ${XC16_PATH})
12+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
13+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
14+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
15+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

0 commit comments

Comments
 (0)