You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/11/03 21:17:32 UTC
[3/5] incubator-mynewt-core git commit: MYNEWT-418;
common functions to use from debug/download scripts
MYNEWT-418; common functions to use from debug/download scripts
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/513bab2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/513bab2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/513bab2f
Branch: refs/heads/develop
Commit: 513bab2f807cbdc9d05a0382c665a684e14b3967
Parents: ffe55aa
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Nov 3 14:01:34 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Nov 3 14:01:34 2016 -0700
----------------------------------------------------------------------
hw/scripts/common.sh | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/513bab2f/hw/scripts/common.sh
----------------------------------------------------------------------
diff --git a/hw/scripts/common.sh b/hw/scripts/common.sh
new file mode 100644
index 0000000..bca3fe3
--- /dev/null
+++ b/hw/scripts/common.sh
@@ -0,0 +1,31 @@
+# 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.
+#
+
+#
+# Which build artifact should be loaded to target
+#
+common_file_to_load () {
+ if [ "$MFG_IMAGE" ]; then
+ FILE_NAME=$BIN_BASENAME.bin
+ elif [ "$BOOT_LOADER" ]; then
+ FILE_NAME=$BIN_BASENAME.elf.bin
+ else
+ FILE_NAME=$BIN_BASENAME.img
+ fi
+}
+