Repository: incubator-incubator-mynewt-pkg-sdk Updated Branches: refs/heads/master [created] ee1a05e97
initial commit, based on contents of pkg type Project: http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/commit/ee1a05e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/tree/ee1a05e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/diff/ee1a05e9 Branch: refs/heads/master Commit: ee1a05e977e22c05186fe8f9033300c48c9df496 Parents: Author: Sterling Hughes <sterl...@apache.org> Authored: Tue Oct 11 12:24:41 2016 +0200 Committer: Sterling Hughes <sterl...@apache.org> Committed: Tue Oct 11 12:24:41 2016 +0200 ---------------------------------------------------------------------- .gitignore | 33 +++++++++++++++++++++++++++++++++ README.md | 12 ++++++++++++ include/your-path/your-file.h | 31 +++++++++++++++++++++++++++++++ pkg.yml | 26 ++++++++++++++++++++++++++ src/your-source.c | 18 ++++++++++++++++++ 5 files changed, 120 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/blob/ee1a05e9/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff4c547 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# +# 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. +# + +.app.db +.app +bin +obj +tags +.gdb_history +.gdb_out +.gdb_cmds +.gdbinit +*~ +.DS_Store +*.swp +*.swo + http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/blob/ee1a05e9/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md new file mode 100644 index 0000000..57d8245 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Sample Package Definition + +This is a basic definition of a sample Mynewt package. + +The source files are located in the src/ directory. + +Header files are located in include/ + +pkg.yml contains the base definition of the package. + +Any questions? Please refer to the documentation at +http://mynewt.apache.org/ or ask questions on d...@mynewt.apache.org http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/blob/ee1a05e9/include/your-path/your-file.h ---------------------------------------------------------------------- diff --git a/include/your-path/your-file.h b/include/your-path/your-file.h new file mode 100644 index 0000000..8716e48 --- /dev/null +++ b/include/your-path/your-file.h @@ -0,0 +1,31 @@ +/* + * This is a sample header file for your package. Feel free to delete this + * file, or rename it. + * + * Package include files are located under the <pkg>/include/<pkg-name> + * directory. When referencing include files in this directory, the + * include statement should be: + * + * #include "pkg-name/file-name.h" + * + * If you are referencing package includes from another package, you must + * list the package who's includes you are referencing as a dependency in + * the pkg.yml file. By adding the package as a dependency, newt will + * automatically add -I<pkg>/include to the CFLAGS when compiling your + * package. + * + * If you want to provide architecture specific header files, you can do + * this by putting it into the "arch/your-arch/pkg-name". For example, + * to have a header file that is overrode for Cortex-M4 architectures, you + * would put the file in the following location: + * + * * <your-pkg>/include/<your-pkg>/arch/cortex_m4/<your-pkg>/file-name.h + * + * And you can then include it with the following include statement: + * + * #include "pkg-name/file-name.h" + * + * And depending on what architecture is specified (usually controlled by + * BSP or MCU definition), the correct architecture directory will be + * included. + */ http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/blob/ee1a05e9/pkg.yml ---------------------------------------------------------------------- diff --git a/pkg.yml b/pkg.yml new file mode 100644 index 0000000..4e16759 --- /dev/null +++ b/pkg.yml @@ -0,0 +1,26 @@ +# +# 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. +# + +pkg.name: your-pkg-name +pkg.description: "Description of your package" +pkg.author: "You <y...@you.org>" +pkg.homepage: "http://your-url.org/" +pkg.keywords: + +pkg.deps: http://git-wip-us.apache.org/repos/asf/incubator-incubator-mynewt-pkg-sdk/blob/ee1a05e9/src/your-source.c ---------------------------------------------------------------------- diff --git a/src/your-source.c b/src/your-source.c new file mode 100644 index 0000000..2f8c1dc --- /dev/null +++ b/src/your-source.c @@ -0,0 +1,18 @@ +/** + * Depending on the type of package, there are different + * compilation rules for this directory. This comment applies + * to packages of type "pkg." For other types of packages, + * please view the documentation at http://mynewt.apache.org/. + * + * Put source files in this directory. All files that have a *.c + * ending are recursively compiled in the src/ directory and its + * descendants. The exception here is the arch/ directory, which + * is ignored in the default compilation. + * + * The arch/<your-arch>/ directories are manually added and + * recursively compiled for all files that end with either *.c + * or *.a. Any directories in arch/ that don't match the + * architecture being compiled are not compiled. + * + * Architecture is set by the BSP/MCU combination. + */