Skip to content

Commit

Permalink
snapshot: Update mcumgr to commit 98e8f32 from upstream
Browse files Browse the repository at this point in the history
The commit applies changes that have appeared between last snapshot
update from upstream
 apache/mynewt-mcumgr: ae4659b
and current top on upstream:
 apache/mynewt-mcumgr: 98e8f32

Signed-off-by: Dominik Ermel <[email protected]>
  • Loading branch information
de-nordic authored and carlescufi committed Mar 13, 2020
1 parent 0a71499 commit 301892d
Show file tree
Hide file tree
Showing 22 changed files with 276 additions and 41 deletions.
14 changes: 14 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 17 additions & 0 deletions cborattr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
4 changes: 0 additions & 4 deletions cborattr/src/cborattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
17 changes: 17 additions & 0 deletions cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
17 changes: 17 additions & 0 deletions cmd/fs_mgmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
17 changes: 17 additions & 0 deletions cmd/img_mgmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
17 changes: 17 additions & 0 deletions cmd/log_mgmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 17 additions & 0 deletions cmd/os_mgmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 17 additions & 0 deletions cmd/stat_mgmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
17 changes: 17 additions & 0 deletions mgmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 0 additions & 9 deletions mgmt/src/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 4 additions & 2 deletions repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions samples/smp_svr/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down
17 changes: 15 additions & 2 deletions samples/smp_svr/zephyr/src/main.c
Original file line number Diff line number Diff line change
@@ -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 <assert.h>
Expand Down
17 changes: 17 additions & 0 deletions smp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
17 changes: 17 additions & 0 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
19 changes: 19 additions & 0 deletions util/src/mcumgr_util.c
Original file line number Diff line number Diff line change
@@ -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 <stdbool.h>
#include "util/mcumgr_util.h"

Expand Down
22 changes: 0 additions & 22 deletions version.yml

This file was deleted.

Loading

0 comments on commit 301892d

Please sign in to comment.