Skip to content

Commit ef7fb27

Browse files
committed
Relicense to BSD 3-Clause; add a README.
This brings the license into parity with CMake itself.
1 parent 372c67f commit ef7fb27

File tree

4 files changed

+124
-30
lines changed

4 files changed

+124
-30
lines changed

COPYING.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CMake-Microchip - CMake support for the Microchip embedded toolchain
2+
Copyright 2016 Sam Hanes
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
This software is provided by the copyright holders and contributors "as
19+
is" and any express or implied warranties, including, but not limited
20+
to, the implied warranties of merchantability and fitness for a
21+
particular purpose are disclaimed. In no event shall the copyright
22+
holder or contributors be liable for any direct, indirect, incidental,
23+
special, exemplary, or consequential damages (including, but not limited
24+
to, procurement of substitute goods or services; loss of use, data, or
25+
profits; or business interruption) however caused and on any theory of
26+
liability, whether in contract, strict liability, or tort (including
27+
negligence or otherwise) arising in any way out of the use of this
28+
software, even if advised of the possibility of such damage.

Modules/FindMStack.cmake

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,37 @@
44
#
55
# Finds the M-Stack USB stack for Microchip PIC MCUs.
66
#
7+
# ########## COPYRIGHT NOTICE ##########
8+
# CMake-Microchip - CMake support for the Microchip embedded toolchain
79
# Copyright 2016 Sam Hanes
810
#
9-
# Permission is hereby granted, free of charge, to any person obtaining a copy
10-
# of this software and associated documentation files (the "Software"), to deal
11-
# in the Software without restriction, including without limitation the rights
12-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13-
# copies of the Software, and to permit persons to whom the Software is
14-
# furnished to do so, subject to the following conditions:
11+
# Redistribution and use in source and binary forms, with or without
12+
# modification, are permitted provided that the following conditions
13+
# are met:
1514
#
16-
# The above copyright notice and this permission notice shall be included in
17-
# all copies or substantial portions of the Software.
15+
# 1. Redistributions of source code must retain the above copyright
16+
# notice, this list of conditions and the following disclaimer.
1817
#
19-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25-
# SOFTWARE.
18+
# 2. Redistributions in binary form must reproduce the above copyright
19+
# notice, this list of conditions and the following disclaimer in the
20+
# documentation and/or other materials provided with the distribution.
21+
#
22+
# 3. Neither the name of the copyright holder nor the names of its
23+
# contributors may be used to endorse or promote products derived from
24+
# this software without specific prior written permission.
25+
#
26+
# This software is provided by the copyright holders and contributors
27+
# "as is" and any express or implied warranties, including, but not
28+
# limited to, the implied warranties of merchantability and fitness for
29+
# a particular purpose are disclaimed. In no event shall the copyright
30+
# holder or contributors be liable for any direct, indirect, incidental,
31+
# special, exemplary, or consequential damages (including, but not
32+
# limited to, procurement of substitute goods or services; loss of use,
33+
# data, or profits; or business interruption) however caused and on any
34+
# theory of liability, whether in contract, strict liability, or tort
35+
# (including negligence or otherwise) arising in any way out of the use
36+
# of this software, even if advised of the possibility of such damage.
37+
# ########## END COPYRIGHT NOTICE ##########
2638

2739

2840
set(MStack_ROOT external/m-stack

README.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#################################
2+
CMake for the Microchip Toolchain
3+
#################################
4+
5+
This project provides toolchains and other support modules to enable
6+
using `CMake`_ with the `Microchip compilers`_, although presently only
7+
XC16 is supported.
8+
9+
.. _CMake: https://cmake.org/
10+
.. _Microchip compilers: http://www.microchip.com/mplab/compilers
11+
12+
Usage
13+
=====
14+
15+
First, you need to somehow get a copy of this project as a subdirectory
16+
of your project named ``external/cmake-microchip``. If you use git, the
17+
easiest way is to add a submodule::
18+
19+
git submodule add git://github.com/Elemecca/cmake-microchip.git external/cmake-microchip
20+
21+
Then add this snippet at the very top of your ``CMakeLists.txt``::
22+
23+
# make the Microchip support modules available
24+
list(APPEND CMAKE_MODULE_PATH
25+
"${CMAKE_CURRENT_SOURCE_DIR}/external/cmake-microchip/Modules"
26+
)
27+
28+
# set up the Microchip cross toolchain
29+
set(CMAKE_TOOLCHAIN_FILE
30+
external/cmake-microchip/Toolchains/xc16.cmake
31+
)
32+
33+
The target MCU is set by the ``CMAKE_SYSTEM_PROCESSOR`` variable. It can
34+
be set on the CMake command line like so::
35+
36+
cmake -DCMAKE_SYSTEM_PROCESSOR=PIC24FJ256GB004 .
37+
38+
Copying
39+
=======
40+
41+
This project is provided under the same BSD 3-Clause license as
42+
CMake itself. See ``COPYING.txt`` for details.

Toolchains/xc16.cmake

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
# CMake toolchain for the Microchip XC16 compiler
22
# http://www.microchip.com/mplab/compilers
33
#
4+
# ########## COPYRIGHT NOTICE ##########
5+
# CMake-Microchip - CMake support for the Microchip embedded toolchain
46
# Copyright 2016 Sam Hanes
57
#
6-
# Permission is hereby granted, free of charge, to any person obtaining a copy
7-
# of this software and associated documentation files (the "Software"), to deal
8-
# in the Software without restriction, including without limitation the rights
9-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
# copies of the Software, and to permit persons to whom the Software is
11-
# furnished to do so, subject to the following conditions:
8+
# Redistribution and use in source and binary forms, with or without
9+
# modification, are permitted provided that the following conditions
10+
# are met:
1211
#
13-
# The above copyright notice and this permission notice shall be included in
14-
# all copies or substantial portions of the Software.
12+
# 1. Redistributions of source code must retain the above copyright
13+
# notice, this list of conditions and the following disclaimer.
1514
#
16-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
# SOFTWARE.
15+
# 2. Redistributions in binary form must reproduce the above copyright
16+
# notice, this list of conditions and the following disclaimer in the
17+
# documentation and/or other materials provided with the distribution.
18+
#
19+
# 3. Neither the name of the copyright holder nor the names of its
20+
# contributors may be used to endorse or promote products derived from
21+
# this software without specific prior written permission.
22+
#
23+
# This software is provided by the copyright holders and contributors
24+
# "as is" and any express or implied warranties, including, but not
25+
# limited to, the implied warranties of merchantability and fitness for
26+
# a particular purpose are disclaimed. In no event shall the copyright
27+
# holder or contributors be liable for any direct, indirect, incidental,
28+
# special, exemplary, or consequential damages (including, but not
29+
# limited to, procurement of substitute goods or services; loss of use,
30+
# data, or profits; or business interruption) however caused and on any
31+
# theory of liability, whether in contract, strict liability, or tort
32+
# (including negligence or otherwise) arising in any way out of the use
33+
# of this software, even if advised of the possibility of such damage.
34+
# ########## END COPYRIGHT NOTICE ##########
2335

2436
# set the CMake platform
2537
# Generic is correct for embedded systems without an OS

0 commit comments

Comments
 (0)