diff --git a/.rat-excludes b/.rat-excludes new file mode 100644 index 0000000..21533c3 --- /dev/null +++ b/.rat-excludes @@ -0,0 +1,14 @@ +# Can't easily add license to rat-excludes file. +.rat-excludes + +# Non-source files +README-mynewt.md +README-zephyr.md +README.md +README.rst +protocol.md +smp-bluetooth.md +smp-console.md +prj.conf +prj_tiny.conf +sample.yaml diff --git a/CMakeLists.txt b/CMakeLists.txt index 76cc084..f22638e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + if(CONFIG_MCUMGR) zephyr_interface_library_named(MCUMGR) diff --git a/README.md b/README.md index 2738389..887f686 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # mcumgr -This is mcumgr, version 0.0.1 +This is mcumgr, version 0.1.0 mcumgr is a management library for 32-bit MCUs. The goal of mcumgr is to define a common management infrastructure with pluggable transport and encoding diff --git a/cborattr/CMakeLists.txt b/cborattr/CMakeLists.txt index bcaf40f..7d1a6b6 100644 --- a/cborattr/CMakeLists.txt +++ b/cborattr/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/cborattr/src/cborattr.c b/cborattr/src/cborattr.c index 395c2ec..31131b7 100644 --- a/cborattr/src/cborattr.c +++ b/cborattr/src/cborattr.c @@ -400,11 +400,7 @@ cbor_read_flat_attrs(const uint8_t *data, int len, CborError err; cbor_buf_reader_init(&reader, data, len); -#ifdef __ZEPHYR__ - err = cbor_parser_cust_reader_init(&reader.r, 0, &parser, &value); -#else err = cbor_parser_init(&reader.r, 0, &parser, &value); -#endif if (err != CborNoError) { return -1; } diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt index a9d5968..ef71865 100644 --- a/cmd/CMakeLists.txt +++ b/cmd/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + add_subdirectory_ifdef(CONFIG_MCUMGR_CMD_FS_MGMT fs_mgmt) add_subdirectory_ifdef(CONFIG_MCUMGR_CMD_IMG_MGMT img_mgmt) add_subdirectory_ifdef(CONFIG_MCUMGR_CMD_LOG_MGMT log_mgmt) diff --git a/cmd/fs_mgmt/CMakeLists.txt b/cmd/fs_mgmt/CMakeLists.txt index c0cbcf2..c09a9a5 100644 --- a/cmd/fs_mgmt/CMakeLists.txt +++ b/cmd/fs_mgmt/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/cmd/img_mgmt/CMakeLists.txt b/cmd/img_mgmt/CMakeLists.txt index 3c54e05..b12275a 100644 --- a/cmd/img_mgmt/CMakeLists.txt +++ b/cmd/img_mgmt/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/cmd/log_mgmt/CMakeLists.txt b/cmd/log_mgmt/CMakeLists.txt index eeb4e40..2f90df9 100644 --- a/cmd/log_mgmt/CMakeLists.txt +++ b/cmd/log_mgmt/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + if(CONFIG_MCUMGR) target_include_directories(MCUMGR INTERFACE include diff --git a/cmd/os_mgmt/CMakeLists.txt b/cmd/os_mgmt/CMakeLists.txt index cfab5b2..26b4f4c 100644 --- a/cmd/os_mgmt/CMakeLists.txt +++ b/cmd/os_mgmt/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c b/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c index 37f3d17..b650259 100644 --- a/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c +++ b/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c @@ -67,7 +67,7 @@ os_mgmt_impl_task_info(int idx, struct os_mgmt_task_info *out_info) out_info->oti_prio = thread->base.prio; out_info->oti_taskid = idx; out_info->oti_state = thread->base.thread_state; -#ifdef THREAD_STACK_INFO +#ifdef CONFIG_THREAD_STACK_INFO out_info->oti_stksize = thread->stack_info.size / 4; #endif diff --git a/cmd/stat_mgmt/CMakeLists.txt b/cmd/stat_mgmt/CMakeLists.txt index 8b18945..2e46ba4 100644 --- a/cmd/stat_mgmt/CMakeLists.txt +++ b/cmd/stat_mgmt/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/mgmt/CMakeLists.txt b/mgmt/CMakeLists.txt index a3a0792..20e055a 100644 --- a/mgmt/CMakeLists.txt +++ b/mgmt/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include port/zephyr/include diff --git a/mgmt/src/mgmt.c b/mgmt/src/mgmt.c index ba366a7..08343bb 100644 --- a/mgmt/src/mgmt.c +++ b/mgmt/src/mgmt.c @@ -157,21 +157,12 @@ mgmt_ctxt_init(struct mgmt_ctxt *ctxt, struct mgmt_streamer *streamer) { int rc; -#ifdef __ZEPHYR__ - rc = cbor_parser_cust_reader_init(streamer->reader, 0, &ctxt->parser, - &ctxt->it); -#else rc = cbor_parser_init(streamer->reader, 0, &ctxt->parser, &ctxt->it); -#endif if (rc != CborNoError) { return mgmt_err_from_cbor(rc); } -#ifdef __ZEPHYR__ - cbor_encoder_cust_writer_init(&ctxt->encoder, streamer->writer, 0); -#else cbor_encoder_init(&ctxt->encoder, streamer->writer, 0); -#endif return 0; } diff --git a/repository.yml b/repository.yml index 908f4f2..43006fc 100644 --- a/repository.yml +++ b/repository.yml @@ -20,6 +20,8 @@ repo.name: apache-mynewt-mcumgr repo.versions: "0.0.0": "master" + "0.1.0": "mcumgr_0_1_0_tag" - "0-latest": "0.0.0" - "0-dev": "0.0.0" + + "0-dev": "0.0.0" # master + "0-latest": "0.1.0" # latest release diff --git a/samples/smp_svr/zephyr/CMakeLists.txt b/samples/smp_svr/zephyr/CMakeLists.txt index 562ead4..c3fe721 100644 --- a/samples/smp_svr/zephyr/CMakeLists.txt +++ b/samples/smp_svr/zephyr/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + cmake_minimum_required(VERSION 3.13.1) # Top-level CMakeLists.txt for the skeleton application. # diff --git a/samples/smp_svr/zephyr/src/main.c b/samples/smp_svr/zephyr/src/main.c index b3023ea..6937a5b 100644 --- a/samples/smp_svr/zephyr/src/main.c +++ b/samples/smp_svr/zephyr/src/main.c @@ -1,7 +1,20 @@ /* - * Copyright (c) 2012-2014 Wind River Systems, Inc. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 * - * SPDX-License-Identifier: Apache-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. */ #include diff --git a/smp/CMakeLists.txt b/smp/CMakeLists.txt index 35f8864..969f4eb 100644 --- a/smp/CMakeLists.txt +++ b/smp/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index 2ed5135..2c6c460 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. + target_include_directories(MCUMGR INTERFACE include ) diff --git a/util/src/mcumgr_util.c b/util/src/mcumgr_util.c index 42bf31e..baed038 100644 --- a/util/src/mcumgr_util.c +++ b/util/src/mcumgr_util.c @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * 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. + */ + #include #include "util/mcumgr_util.h" diff --git a/version.yml b/version.yml deleted file mode 100644 index 13e5152..0000000 --- a/version.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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 -# -# 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. -# - -# Newt uses this file to determine the version of a checked out repo. -# This should always be 0.0.0 in the master branch. -repo.version: 0.0.0 diff --git a/zephyr/module.yml b/zephyr/module.yml index eb317c3..38f695a 100644 --- a/zephyr/module.yml +++ b/zephyr/module.yml @@ -1,2 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# 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. +# + build: cmake: .