On Sun, May 29, 2016 at 10:56:09AM -0700, Christopher Collins wrote: > The CMSIS-CORE files that Mynewt bundles fall into two categories: [...] > 2. Functional changes were made by ARM mbed before the BSD license > was added; the oldest revisions containing the BSD license text > are different from those in Mynewt. > > The files in category 2 are the ones causing issues for us now. Since > the versions of these files in Mynewt are not directly derived from > revisions containing the BSD license, I don't know what we can > reasonably claim.
Specifically, the following files in the mynewt core repo are problematic: libs/cmsis-core/src/cmsis_nvic.c hw/bsp/nrf51dk-16kbram/include/bsp/cmsis_nvic.h hw/bsp/nrf51dk/include/bsp/cmsis_nvic.h hw/bsp/nrf52pdk/include/bsp/cmsis_nvic.h hw/bsp/olimex_stm32-e407_devboard/include/bsp/cmsis_nvic.h The last four (the header files) are almost identical to one another, and for simplicity I am considering them a single file in this email. I'm attaching git diffs between the following two revisions: a: commit when BSD license text was added (mbed repo) b: first commit to the mynewt core repo. The Mynewt files are "b" in the attached diffs. That is, "+++" are changes added by Mynewt; "---" is removed by mbed. Thanks, Chris
diff --git a/5b8ab176:libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.h b/e08882916788cee7cb2540604f8f6ec166a1c654:hw/bsp/nrf52pdk/include/bsp/cmsis_nvic.h old mode 100644 new mode 100755 index e1fd1a3..78d0417 --- a/5b8ab176:libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.h +++ b/e08882916788cee7cb2540604f8f6ec166a1c654:hw/bsp/nrf52pdk/include/bsp/cmsis_nvic.h @@ -1,48 +1,40 @@ -/* mbed Microcontroller Library - * CMSIS-style functionality to support dynamic vectors - ******************************************************************************* - * Copyright (c) 2011 ARM Limited. All rights reserved. - * All rights reserved. +/** + * Copyright (c) 2015 Stack Inc. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form 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 STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* mbed Microcontroller Library - cmsis_nvic + * Copyright (c) 2009-2011 ARM Limited. All rights reserved. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. - ******************************************************************************* - */ + * CMSIS-style functionality to support dynamic vectors + */ #ifndef MBED_CMSIS_NVIC_H #define MBED_CMSIS_NVIC_H -#define NVIC_NUM_VECTORS (16 + 32) // CORE + MCU Peripherals -#define NVIC_USER_IRQ_OFFSET 16 +#include <stdint.h> -#include "nrf51822.h" -#include "cmsis.h" +#define NVIC_NUM_VECTORS (16 + 38) // CORE + MCU Peripherals +#define NVIC_USER_IRQ_OFFSET 16 +#include "nrf52xxx/nrf52.h" #ifdef __cplusplus extern "C" { #endif +void NVIC_Relocate(void); void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector); uint32_t NVIC_GetVector(IRQn_Type IRQn);
diff --git a/5b8ab176:libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC176X/cmsis_nvic.h b/e08882916788cee7cb2540604f8f6ec166a1c654:hw/bsp/nrf52pdk/include/bsp/cmsis_nvic.h old mode 100644 new mode 100755 index 5d62b7c..78d0417 --- a/5b8ab176:libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC176X/cmsis_nvic.h +++ b/e08882916788cee7cb2540604f8f6ec166a1c654:hw/bsp/nrf52pdk/include/bsp/cmsis_nvic.h @@ -1,46 +1,40 @@ -/* mbed Microcontroller Library - * CMSIS-style functionality to support dynamic vectors - ******************************************************************************* - * Copyright (c) 2011 ARM Limited. All rights reserved. - * All rights reserved. +/** + * Copyright (c) 2015 Stack Inc. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form 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 STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* mbed Microcontroller Library - cmsis_nvic + * Copyright (c) 2009-2011 ARM Limited. All rights reserved. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. - ******************************************************************************* - */ + * CMSIS-style functionality to support dynamic vectors + */ #ifndef MBED_CMSIS_NVIC_H #define MBED_CMSIS_NVIC_H -#include "cmsis.h" +#include <stdint.h> -#define NVIC_NUM_VECTORS (16 + 33) +#define NVIC_NUM_VECTORS (16 + 38) // CORE + MCU Peripherals #define NVIC_USER_IRQ_OFFSET 16 +#include "nrf52xxx/nrf52.h" + #ifdef __cplusplus extern "C" { #endif +void NVIC_Relocate(void); void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector); uint32_t NVIC_GetVector(IRQn_Type IRQn);