This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

License when reusing partial code from SDK examples

I have a little hobby project going on where I'm trying to make Nordic's old temperature broadcaster example work with the nRF52: github.com/.../

The project was originally released under the MIT license by Nordic, and I (and github.com/.../nrf51-ble-app-temp, which I also pulled some changes from) have kept the license as MIT.

Now I'd like to add support for fetching the battery value using SAADC, and was thinking to base my solution on the example in the ble_app_proximity example of nRF5 SDK 12.3.0, which has code for both nRF51 and nRF52. However, this example is released under the Nordic licence, which is a lot like MIT but not quite.

I wouldn't mind switching to the Nordic licence (after all, it's pretty close to the MIT license), but I'm not sure how well it would work when I have code from both Nordic and myself in the same file. The license requires that the disclaimer is kept, but the disclaimer seems to assume that the code in its entirety is written by Nordic. For example, the disclaimer starts with the following: "THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR". In this case, the software is also partially provided by me, so the disclaimer would both be misleading and incomplete; I also do not provide any warranties on the parts I wrote.

I considered working around this issue by keeping the ADC code in a separate file and keeping that under the Nordic license while the rest is MIT, but I'm worried future modifications will make the problem resurface later. What should I do?

I really wish the examples would just be plain MIT license, that would make it a lot easier to derive open-source projects from it. Considering how tied the code is to the way the SoftDevice and the hardware works, I doubt the extra requirements of the Nordic license are really necessary. Who would run this on a non-Nordic device?

For your reference, here is a copy of the Nordic license, taken from nRF5_SDK_12.3.0_d7731ad/examples/ble_peripheral/ble_app_proximity/main.c:

/**
 * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 * 
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 * 
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 * 
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 * 
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 */
Related