Git Product home page Git Product logo

mynewt-newt's Introduction

Newt

Apache Newt is a smart build and package management tool, designed for C and C++ applications in embedded contexts. Newt was developed as a part of the Apache Mynewt Operating System, more information on Apache Mynewt can be found at https://mynewt.apache.org/.

Features

Newt is a build system that can read a directory tree, build a dependency tree, and emit the right build artifacts. It then allows you to do the following:

  • Download built target to board
  • Generate full flash images
  • Download debug images to a target board using a debugger
  • Conditionally compile libraries & code based upon build settings
  • Generate and download manufacturing flash images

Newt is also a source management system that allows you to do the following:

  • Create reusable source distributions (called repos) from a collection of code.
  • Use third-party components with licenses that are not comptatible with the ASF (Apache Software Foundation) license
  • Upgrade repos

How it Works

When Newt sees a directory tree that contains a "project.yml" file, it recognizes it as the base directory of a project, and automatically builds a package tree. More information can be found in the "Newt Tool Manual" under Docs at https://mynewt.apache.org/.

Getting Started

To build Apache Newt, simply run the included build.sh script. For more information on building and installng Apache Newt, please read INSTALLING or the documentation on https://mynewt.apache.org/

Once you've installed newt, you can get started by creating a new project:

  $ newt new your_project

For more information, and a tutorial for getting started, please take a look at the Apache Mynewt documentation.

Contributing

Introduction

Anybody who works with Apache Mynewt can be a contributing member of the community that develops and deploys it. The process of releasing an operating system for microcontrollers is never done: and we welcome your contributions to that effort.

Pull Requests

Apache Mynewt welcomes pull request via Github. Discussions are done on Github, but depending on the topic, can also be relayed to the official Apache Mynewt developer mailing list [email protected].

Filing Bugs

Bugs can be filed as Github issues here. Where possible, please include a self-contained reproduction case!

Feature Requests

If you are suggesting a new feature, please email the developer list directly with a description of the feature or submit a Github issue.

Writing Tests

We love getting newt tests! Apache Mynewt is a huge undertaking, and improving code coverage is a win for every Apache Mynewt user.

Automated Newt tests are run in Travis. The test code can be found here.

Writing Documentation

Contributing to documentation (in addition to writing tests), is a great way to get involved with the Apache Mynewt project. The Newt documentation is found in /docs.

Getting Help

The best place to seek help is the Apache Mynewt slack channel

The Apache Mynewt developers mailing list is another good resource.

mynewt-newt's People

Contributors

aditihilbert avatar agross-korg avatar andrzej-kaczmarek avatar caspermeijn avatar ccollins476ad avatar cwanda avatar d3zd3z avatar davidzuhn avatar dwld avatar jocelynmass avatar justinmclean avatar kasjer avatar kkopyscinski avatar m-gorecki avatar manish-sudo avatar mkiiskila avatar mlaz avatar paulfdietrich avatar placrosse avatar simonratner avatar sjanc avatar spoonofpower avatar sterlinghughes avatar utzig avatar uwej711 avatar vikrant-proxy avatar vrahane avatar weekendsuperhero avatar wesley-wu avatar ynezz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mynewt-newt's Issues

Conflicting dependencies yields inconsistent dependency graph

syscfg.vals:
    FOO: 1

syscfg.vals.BAR:
    FOO: 1

These two syscfg.vals mappings are in conflict. The first enables FOO unconditionally; the second only enables FOO if bar is set. When newt encounters a conflict like this, it accepts the first override it sees and discards the others. Since these overrides are not processed in a consistent order, the result varies from build to build.

Newt should not allow such conflicting overrides. Initially, we can make newt emit a warning when it encounters this. Later, we can change it to an error.

Make it easier to pin a version to a specific tag

I'm trying to understand how the newt tool manages repository versions.

Here's my situation -- I don't want to depend on github/master, yet I don't
want to introduce gratuitous incompatibility.

So I would like to redefine the apache-mynewt-core repository to be my own
repository (either my own fork on github, or perhaps an internal github
server). That's an easy change to make in project.yml. No problem yet.

On my own fork, I like to keep master to be exactly the same as the
upstream master, although it may lag behind as I don't need to run a pull
constantly. So I'm keeping my own changes in a development branch.

I'd like to specify this in project.yml, but the 'vers' field has some
strict guidelines about what I can use, and it seems that I can only use
master branch, so "0-dev" is "0.0.0" is "master" according to
repository.yml.

I want to have everything I'm building in source control, for my Continuous
Integration engine if nothing else. At the moment, I have a patch to the
BAS service in mynewt-nimble that I wish to commit. I believe that it will
be in the official repository "soon" (for some definition of soon), but
that doesn't help the fact that I would like to check in (to my local
repositories my application that depends on this fix, which then entails
that I want to check in the fix too).

From what I'm reading so far, it would be nice if the newt tool were a
little less picky about the format of the 'vers' tag, or had an alternate
tag that would let me bypass 'vers' altogether and let be specify a branch
name directly (which would also alleviate the need to special case "0.0.0"
to being "master").

Or is there a capability to do what I'm looking for that I just can't find
(I don't speak fluent go, so perusing the source hasn't shown me anything
yet).

I agree - more flexibility here would be an improvement. I think you
have a good understanding of the system. Here is my summary of how it
currently works:

* The `project.yml` file consists of "repo specifiers."
* A repo specifier contains a single "version string."
* A version string has one of the following forms:
    * Normalized:  "#.#.#"
    * Floating:    "#[.#]-<stability>"

  where <stability> is "dev", "latest", etc.

Each Mynewt repo contains a `repository.yml` file in its master
branch.  The `repository.yml` file:
    * Maps floating version strings to normalized version strings.
    * Finally, maps normalized version strings to git commits
      (branch, tag, or hash).

I think this system works well for users who want to use official Mynewt
releases. However, it may not be the best for more adventurous users.

To solve your problem, I think you'll need to modify your repo's
repository.yml file such that "0.0.0" points to the specific commit
hash that you want to pin yourself to. For example:

repo.versions:
    "0.0.0": "815254f5166ef3954b214efdd37549814521c9d6"

For the future, I suggest we make the following changes to newt:

  1. Allow a repo specifier (in project.yml) to directly specify a git
    commit (branch, tag, or hash).

  2. Allow a repository.yml file to map a floating version number
    directly to a git commit, rather than requiring an intermediate
    normalized version.

Chris

pkg.cflags from a dependency might be required by dependent packages

When building mcuboot with RSA, the mbedtls package itself defines and is built with extra cflags (-DMBEDTLS_USER_CONFIG_FILE=...). While this builds mbedtls correctly other packages that only depend on include files from mbedtls don't seem to import those cflags.

My particular case is that I am trying to override mbedtls SW AES implementation with a HW one, in this case I defined MBEDTLS_AES_ALT and defined what I needed in aes_alt.h from my package (just follows mbedtls override method). But for bootutil to not fail building I have to add a similar pkg.cflags to its package as the one existing in mbedtls.

Not sure it's a bug or design decision, or maybe there's a more "correct" way of doing this. I also tried with a few older versions that still work with core master but had the same issues...

Unable to have same named packages in two separate repos

newt build is not taking repository when checking for package name

eg we have two samples
apache-mynewt-nimble/apps/btshell
apache-mynewt-core/apps/btshell

and then target

[janc@ix mynewt]$ newt target show btshell
targets/btshell
    app=@apache-mynewt-core/apps/btshell
    bsp=@apache-mynewt-core/hw/bsp/nrf52840pdk

It is not possible to build this:
[janc@ix mynewt]$ newt build btshell
Building target targets/btshell
Error: Two app packages in build: apps/btshell, apps/btshell

I think newt should be able to distinguish packages with same name but from different repos. Especially now that we have nimble in separate repo (and more to come).

newt target cmake <target> generates incorrect files for cmake on Windows

When newt is executed on Windows like this:
newt target cmake my_target
it generates files that have Windows style separator \ in paths of properties ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY and RUNTIME_OUTPUT_DIRECTORY.

cmake does not handle this correctly it works if paths backslashes are replaced with slashes.
paths like C:/msys64/home/... work fine while C:\msys64\home\... do not.

Newt should not install repo versions it can't deal with

I have an installation of newt 1.3.0 on my system. On newt install it happily proceeded to download a repository of 1.4.0, only to complain later it can't deal with that and I would have to update newt - which I could maybe do, but which is often unwanted in the middle of a project.

Not able to build newt example project on OS X

Hey newt-team,

I am trying to run the example project https://mynewt.apache.org/v1_5_0/tutorials/blinky/arduino_zero.html but I have some problems building it.

I followed the instructions from the arduino_zero tutorial.
After creating the target I run newt upgrade I get the following versions.

  upgrade apache-mynewt-core (1.7.0 --> 1.8.0)
  upgrade apache-mynewt-mcumgr (0.0.0 --> 0.1.0)
  upgrade apache-mynewt-nimble (1.2.0 --> 1.3.0)
  upgrade mcuboot (0.0.0 --> 1.5.0)
  install mynewt_arduino_zero (1.8.0)

my project.yml looks like :

project.repositories:
    - apache-mynewt-core
    - mynewt_arduino_zero

# Use github's distribution mechanism for core ASF libraries.
# This provides mirroring automatically for us.
#
repository.apache-mynewt-core:
    type: github
    vers: 1-latest
    user: apache
    repo: mynewt-core


repository.mynewt_arduino_zero:
    type: github
    vers: 1-latest
    user: runtimeco
    repo: mynewt_arduino_zero

But I am always failing to build the target. The output looks like:

Error: repos/apache-mynewt-core/kernel/os/src/os_mempool.c: In function 'os_memblock_from':
repos/apache-mynewt-core/kernel/os/src/os_mempool.c:308:5: error: implicit declaration of function 'static_assert' [-Werror=implicit-function-declaration]
     static_assert(sizeof block_addr == sizeof baddr32,
     ^
cc1: all warnings being treated as errors

I am using OS X (10.15.4 Catalina) with the following gcc (gcc --version)

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Newt version:

Apache Newt
   Version: 1.7.0
  Git Hash: 80bcba7
Build Date: 2019-08-06_13:20

I tested different newt versions (latest 1.7, 1.8 ..) and I changed the git versions in the project.yml. But I was not able to build the example. What am I doing wrong? Any help would be appreciated :)

BTW, newt looks really like an awesome project!

Thanks,
Nils

UPDATE: ----------------------------------------------------------------------------------------

I updated gcc to 9.3

gcc (Homebrew GCC 9.3.0_1) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And also updated newt :

Apache Newt 1.9.0-dev / b86d086-dirty / 2020-05-04_22:24

But I still get the same error message :/

Question on how to follow mynewt development process the right way.

Hi,

I want to use Mynewt and nimble an a project using a custom created board powered by an NRF52832 chip. I have some questions in order to follow the your development process.

I started testing Mynewt by creating an example project for the nrf52 DK. The core and nimble repos are downloaded to my app. I have some questions on carry on.

  • What is the correct way to create a bsp for my own board? I think I should copy an example bsp and change the values to fit my board (add pwm, set io's ...), correct?
  • How to maintain my project? newt downloads the a specific version to my repo, should I apply changes to this repo? I normally fork projects form Github, crate my own branch and apply changes to it in order to update to latest master when required. But I do not really understand how to correctly develop code for newt/nimble.

Sorry for the nooby questions, I hope I did not miss anything in the documentations but I want to follow the development flow correctly.

Best regards,
Nils

"Invalid version string" error from 'newt install' is borederline useless

I have no idea what the problem is (except that, somehow, "master" is an invalid version), nor where the problem is emanating from.

At a minimum, it should show which repository is causing the problem. Ideally it should also show how it derived that version and from which vers keys it was obtained.

CMake always requires C++ compiler

I found a minor bug in the CMake generation. When configuring the CMake project, it requires a C++ compiler to be present even if the project doesn't use it. I solved is by doing sudo dnf install arm-none-eabi-gcc-cs-c++.

I got the following error message:

CMake Error at CMakeLists.txt:9 (project):
  The CMAKE_CXX_COMPILER:

    arm-none-eabi-g++

  is not a full path and was not found in the PATH.

semver reporting in image list is not consistent

create-image split-microbit 0 and create-image split-microbit 0.0.0.0 both report 0.0.0

but create-image split-microbit 0.0.0.1 reports 0.0.0.1

create-image split-microbit 1 reports 1.0.0

In my mind this should always report four zeros.

Jacobs-Air:chippd3 jacobrosenthal$ newt build split-microbit && newt create-image split-microbit 0 && newt load split-microbit 0
Building target targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
Target successfully built: targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.img
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.img
Loading app image into slot 2
Loading loader image into slot 1
Jacobs-Air:chippd3 jacobrosenthal$ newtmgr -c nimble_bleprph image list
Images:
slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: e5a1b2038053bccac9aa3b4c297df3871328f9d5232b566fcc27d102d938e385
slot=1
version: 0.0.0
bootable: false
flags: 
hash: 33a5c44375b3859cdbe764036ea4548cef48979ca737c0a15d99e0be6a84a7a9
Split status: matching (2)

 

Jacobs-Air:chippd3 jacobrosenthal$ newt build split-microbit && newt create-image split-microbit 0.0.0.1 && newt load split-microbit 0.0.0.1
Building target targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
Target successfully built: targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.img
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.img
Loading app image into slot 2
Loading loader image into slot 1
Jacobs-Air:chippd3 jacobrosenthal$ newtmgr -c nimble_bleprph image list
Images:
slot=0
version: 0.0.0.1
bootable: true
flags: active confirmed
hash: 5a257c2d07c8ff5dcab386bd2ba694320e317a8ac47dc74795c94d3b797d533a
slot=1
version: 0.0.0.1
bootable: false
flags: 
hash: 9e1390f93063be6774623dc7b74c57446f8b7ce8123a35a7a2257e361e1abea9
Split status: matching (2)
Jacobs-Air:chippd3 jacobrosenthal$ newt build split-microbit && newt create-image split-microbit 0.0.0.0 && newt load split-microbit 0.0.0.0
Building target targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
Target successfully built: targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.img
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.img
Loading app image into slot 2
Loading loader image into slot 1
Jacobs-Air:chippd3 jacobrosenthal$ newtmgr -c nimble_bleprph image list
Images:
slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: e5a1b2038053bccac9aa3b4c297df3871328f9d5232b566fcc27d102d938e385
slot=1
version: 0.0.0
bootable: false
flags: 
hash: 33a5c44375b3859cdbe764036ea4548cef48979ca737c0a15d99e0be6a84a7a9
Split status: matching (2)

 

Jacobs-Air:chippd3 jacobrosenthal$ newt build split-microbit && newt create-image split-microbit 1 && newt load split-microbit 1
Building target targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
Target successfully built: targets/split-microbit
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-app.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit_tmp.elf
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-app.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysinit-loader.c
Compiling bin/targets/split-microbit/generated/src/split-microbit-sysflash.c
Archiving split-microbit-sysinit-loader.a
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph_tmp.elf
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.elf
Generating ROM elf 
Linking /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.elf
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/loader/apps/bleprph/bleprph.img
App image succesfully generated: /Users/jacobrosenthal/Downloads/chippd3/bin/targets/split-microbit/app/apps/blesplit/blesplit.img
Loading app image into slot 2
Loading loader image into slot 1
Jacobs-Air:chippd3 jacobrosenthal$ newtmgr -c nimble_bleprph image list
Images:
slot=0
version: 1.0.0
bootable: true
flags: active confirmed
hash: 6ee411e06979a31b5553970075fb6b4b67a06d2001c2f27227f8939e5af153d3
slot=1
version: 1.0.0
bootable: false
flags: 
hash: 3019d4dfe4088c90e197b795f450fb33fd43a571414b25ab9119ff03b7f5e889
Split status: matching (2)
Jacobs-Air:chippd3 jacobrosenthal$

newt should automatically generate documentation for project's

Including project dependencies. With the move to sphinx + rest documentation, we should allow newt to automatically check for correct dependencies (e.g. sphinx) and then go through a given project, and generate the documentation either just for that project, or that project and all installed dependencies.

Test package lflags ignored by `newt test`

If you add the following to a test package:pkg.lflags:- "-foo"and then test the package withย newt test, the flag does not get passed to gcc during linking.Newt currently only reads lflags from the following package types:targetappbspcompilerAt the very least, the test package's lflags should be used when a unit test is linked via newt test. Alternatively, it may make more sense to gather the lflags from all constituent packages during the link phase.

Crash when git repo in`project.yml` is missing `url` field

The following project.yml:

project.name: "my_project"

repository.apache-mynewt-core:
    type: git
    vers: 0.0.0

Produces the following crash on newt upgrade:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x1216b43]

goroutine 1 [running]:
mynewt.apache.org/newt/newt/repo.(*Repo).CommitDepMap(...)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/repo/repo.go:74
mynewt.apache.org/newt/newt/project.(*Project).loadRepoDeps.func1(0x0, 0xc00008d120, 0x2, 0x2, 0x160, 0x137da20)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:411 +0x53
mynewt.apache.org/newt/newt/project.(*Project).loadRepoDeps(0xc00015a300, 0xc000091500, 0xc0000a314b, 0x12)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:441 +0x164
mynewt.apache.org/newt/newt/project.(*Project).loadConfig(0xc00015a300, 0x1b, 0xc000012064)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:561 +0x745
mynewt.apache.org/newt/newt/project.(*Project).Init(0xc00015a300, 0xc000012064, 0x1b, 0x27, 0x1339280)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:605 +0xbe
mynewt.apache.org/newt/newt/project.NewProject(0xc000012064, 0x1b, 0xc000012064, 0x1b, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:151 +0x58
mynewt.apache.org/newt/newt/project.LoadProject(0xc000012064, 0x1b, 0x0, 0x13c6249, 0xc000012064)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:752 +0x7d
mynewt.apache.org/newt/newt/project.initProject(0xc000012064, 0x1b, 0x0, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:90 +0x39
mynewt.apache.org/newt/newt/project.initialize(0x1122c37, 0xc0000b4c80)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:108 +0x56
mynewt.apache.org/newt/newt/project.TryGetProject(0x9, 0x9, 0x8)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/project/project.go:116 +0x22
mynewt.apache.org/newt/newt/cli.TryGetProject(0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/cli/util.go:208 +0x26
mynewt.apache.org/newt/newt/cli.installRunCmd(0xc000162f00, 0x1670a00, 0x0, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/cli/project_cmds.go:106 +0x26
mynewt.apache.org/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc000162f00, 0x1670a00, 0x0, 0x0, 0xc000162f00, 0x1670a00)
        /Users/ccollins/go/src/mynewt.apache.org/newt/vendor/github.com/spf13/cobra/command.go:766 +0x2cc
mynewt.apache.org/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0000d2500, 0xc00016c000, 0xc00016c780, 0xc00016c500)
        /Users/ccollins/go/src/mynewt.apache.org/newt/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
mynewt.apache.org/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc0000d2500, 0xc000115f38, 0x100e19d)
        /Users/ccollins/go/src/mynewt.apache.org/newt/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/newt.go:173 +0x171

cmake build failing for NRF targets

newt target show nrf52dk_defapp
targets/nrf52dk_defapp
app=apps/defapp
bsp=@apache-mynewt-core/hw/bsp/nrf52dk
build_profile=optimized

i do:
newt target cmake nrf52dk_defapp

Then make, and I get the following errors:

Scanning dependencies of target hw_mcu_nordic
[ 75%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/prs/nrfx_prs.c.obj
[ 75%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_adc.c.obj
[ 76%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_clock.c.obj
[ 76%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_comp.c.obj
[ 77%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_gpiote.c.obj
[ 77%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_i2s.c.obj
[ 78%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_lpcomp.c.obj
[ 78%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_pdm.c.obj
[ 79%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_power.c.obj
[ 79%] Building C object CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_power_clock.c.obj
In file included from /Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/include/nrfx_glue.h:35:0,
from /Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/nrfx.h:37,
from /Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_power_clock.c:32:
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/hal/nrf_power.h: In function 'nrf_power_rampower_mask_on':
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/hal/nrf_power.h:981:25: error: implicit declaration of function 'ARRAY_SIZE' [-Werror=implicit-function-declaration]
NRFX_ASSERT(block < ARRAY_SIZE(NRF_POWER->RAM));
^
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/libc/baselibc/include/assert.h:34:21: note: in definition of macro 'assert'
#define assert(x) ((x) ? (void)0 :
^
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/hal/nrf_power.h:981:5: note: in expansion of macro 'NRFX_ASSERT'
NRFX_ASSERT(block < ARRAY_SIZE(NRF_POWER->RAM));
^
In file included from /Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/nrfx.h:37:0,
from /Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_power_clock.c:32:
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/include/nrfx_power_clock.h: In function 'nrfx_power_clock_irq_init':
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/include/nrfx_glue.h:87:42: error: implicit declaration of function 'NVIC_GetEnableIRQ' [-Werror=implicit-function-declaration]
#define NRFX_IRQ_IS_ENABLED(irq_number) (NVIC_GetEnableIRQ(irq_number) == 1);
^
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/include/nrfx_power_clock.h:59:10: note: in expansion of macro 'NRFX_IRQ_IS_ENABLED'
if (!NRFX_IRQ_IS_ENABLED(POWER_CLOCK_IRQn))
^
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/include/nrfx_glue.h:87:77: error: expected ')' before ';' token
#define NRFX_IRQ_IS_ENABLED(irq_number) (NVIC_GetEnableIRQ(irq_number) == 1);
^
/Users/sterling/dev/mynewt/defproj/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/include/nrfx_power_clock.h:59:10: note: in expansion of macro 'NRFX_IRQ_IS_ENABLED'
if (!NRFX_IRQ_IS_ENABLED(POWER_CLOCK_IRQn))
^
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/hw_mcu_nordic.dir/repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_power_clock.c.obj] Error 1
make[1]: *** [CMakeFiles/hw_mcu_nordic.dir/all] Error 2
make: *** [all] Error 2

Error during execution of build.sh

Running shell script causes error

./build.sh: 30: ./build.sh: go: not found
* Error: could not extract go version (version string: )

basically it cannot extract version number from go version command although this returns normal output, i.e.:

go version go1.14.1 linux/amd64

Missing cxxflags

Currently it's impossible to pass c++ compiler flags properly to compiler, because the build system only recognizes cflags:

	case COMPILER_TYPE_CPP:
		cmdName = c.cppPath
		flags = c.cflagsStrings()

Hence passing -std=c++14 cannot be done through build tools. Doing a hook like below works, and then setting it as compiler.path.cpp.DARWIN.OVERWRITE: "/opt/m/project/hack-g++"

cat `pwd`/hack-g++
#!/bin/sh
/usr/local//Cellar/ccache/3.3.4_1/libexec/g++-7 -std=c++14 "$@"

Allow to specify who can set syscfg value

It could be useful to restrict where syscfg value can be set. Trying to override value by package which is not allowed should emit an error.

For example:

  • @apache-mynewt-core/hw/mcu/nordic/nrf52xxx package defines MCU_NRF52832 and MCU_NRF52840 values which shall be only set by BSP (as it does not make sense to override them elsewhere)
  • @apache-mynewt-nimble/nimble/controller package defines BLE_DEVICE which shall not be overriden by other packages since this is used to determine configuration

Proposal:
Add allowoverride attribute to value which can be set to any (default), bsp or none to restrict who can set syscfg value (as explained above). Not sure if other package types (app, target, unittest) make sense here or combinations of these...

newt upgrade throws error

Running newt upgrade -v results in the following error:

Error: Error updating "mcuboot": error: The following untracked working tree files would be overwritten by checkout:
	ext/mbedtls/include/mbedtls/asn1.h
	ext/mbedtls/include/mbedtls/bignum.h
	ext/mbedtls/include/mbedtls/check_config.h
	ext/mbedtls/include/mbedtls/config.h
	ext/mbedtls/include/mbedtls/ecdsa.h
	ext/mbedtls/include/mbedtls/ecp.h
	ext/mbedtls/include/mbedtls/md.h
	ext/mbedtls/include/mbedtls/oid.h
	ext/mbedtls/include/mbedtls/pk.h
	ext/mbedtls/include/mbedtls/platform.h
	ext/mbedtls/include/mbedtls/platform_util.h
	ext/mbedtls/include/mbedtls/threading.h
Please move or remove them before you switch branches.
Aborting

I am following the create project documentation here : https://mynewt.apache.org/latest/get_started/project_create.html

I am running an Ubuntu 18.04 natively in a MacBook Pro 13''

newt install error

Hi,
After cloning mynewt-dw1000-apps;
As per given in Readme, while doing newt install, I am getting following error

Admin@ZWPL-COM2 MINGW64 /e/Projects/RealTimeLocation- RTL/nRF/GitCodes/mynewt-dw1000-apps-master/mynewt-dw1000-apps (master)
$ newt install
Downloading repository mynewt-core (commit: master) from https://github.com/apache/mynewt-core.git
Downloading repository mynewt-dw1000-core (commit: master) from https://github.com/decawave/mynewt-dw1000-core.git
Downloading repository mynewt-timescale-lib (commit: master) from https://github.com/decawave/mynewt-timescale-lib.git
Error: cannot normalize version "0-dev" for repo "mynewt-dw1000-core"; no mapping to numeric version

Kindly , suggest whats going wrong over here.

Newt - Cannot specify multiple-argument cflags

For example:

pkg.cflags:
- '-include /usr/local/extra-includes'
The entire item, including the space, gets passed to gcc as a single argument. We need a way to specify multiple arguments for a single flag.

Add unit tests when generating 'PACKAGE_TYPE_LIB'

Unit tests are not only helpful to promote code quality, they are also useful documentation for packages, and are generally up to date with any API changes.

As such, would it make sense to include unit tests by default in any new package created with newt pkg new (assuming the default PACKAGE_TYPE_LIB package type)?

This inclusion may push people to create more unit tests, and if they aren't desired it's simply a matter of deleting the appropriate sub-directory.

`newt test` exclude option does not accept fully-qualified package names

newt test accepts an --exclude or -e switch. The argument to this switch is a comma-separated list of packages to exclude from the test set.

The bug is that these package names must not include their repo name. The tests are only properly excluded if the repo name is missing.

E.g.,

newt test all -e fs/fcb

properly excludes the fs/fcb test, but

newt test all -e @apache-mynewt-core/fs/fcb

excludes nothing; the fcb test still runs.

`newt target amend` does not work

dd96417 broke newt target amend command:

andk@t480s:~/devel/mynewt$ newt target amend blehci syscfg=BLE_LL_CFG_FEAT_LE_2M_PHY=1:BLE_LL_CFG_FEAT_CODED_PHY=1
Amended syscfg for Target targets/blehci successfully
andk@t480s:~/devel/mynewt$ newt target show blehci
targets/blehci
    app=@apache-mynewt-nimble/apps/blehci
    bsp=@apache-mynewt-core/hw/bsp/fanstel-ev-bt840
    build_profile=debug
andk@t480s:~/devel/mynewt$ cat targets/blehci/syscfg.yml 
syscfg.vals: "map[BLE_LL_CFG_FEAT_LE_2M_PHY:1 BLE_LL_CFG_FEAT_CODED_PHY:1]"

Seems like new settings to write are passed to KvToYaml as map[string]string which is not the same as map[interface{}]interface{} so it is handled by default case and just converted to string representation of map. I have no idea how to fix this properly though...

Circular dependencies may cause extraneous packages to get pulled into build

During dependency resolution, newt adds packages to the builds as dependencies are discovered. Less commonly, newt also removes packages from the build when a dependency is nullified. When a syscfg setting's value changes, dependencies conditional on the setting may be nullified. For example:

Package A

# pkg.yml
pkg.deps.!FOO:
    - pkgb

Target

# syscfg.yml
syscfg.vals:
    FOO: 1

Initially, the FOO setting is unknown, so it defaults to 0. When package A is being processed, the conditional dependency on package B is considered valid, and B is added to the build. When the target is processed, it is discovered that FOO is actually 1, so A's dependency on B is nullified, and B must be removed from the build (assuming no other packages depend on B).

Newt handles the above case without issue. The issue is illustrated below:

Package B

# pkg.yml
pkg.deps:
    - pkgc

Package C

# pkg.yml
pkg.deps:
    - pkgb

B and C depend on each other. When B is initially pulled into the build, this also pulls in C, since B depends on C. When B is later removed from the build, C should also get removed (again, assuming no other packages depend on C).

The bug is: in this example, neither B nor C actually gets removed from the build. Newt uses references counting to determine when a package can be removed. When a package is found to have no dependents (a reference count of 0), newt removes it. Due to the circular dependency between B and C, neither package's reference count ever reaches 0.

Newt gets removed by Trend Micro

The pre-built version of Mynewt Newt gets automatically removed by the Trend micro Antivirus software on Windows because of "Unauthorized file encryption".

This seems to happen when running the new install command, but I suspect other commands will trigger it as well. newt --help does not.

Not a lot of information is given by Trend Micro on why the behavior is considered "Unauthorized file encryption":
Capture

The "details" link just points to a generic search on their site: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/search/unauthorized%20file%20encryption

Environment:

Windows 10 Pro Version 1909
Newt 1.7.0
Trend Micro Virus pattern 15.609.00
Virus scan engine 11.000.1006
Agent version 6.7.1206/14.2.116

Error: Error updating when running newt install

I've just installed newt following the Getting Started guide for Linux .
My OS is Ubuntu 16.04 LTS on Windows 10 through WSL.

$ cd ~/Documents/nRF/projects # ~/Documents is a symbolic link to the Windows FileSystem
$ newt new newt-test
Downloading project skeleton from apache/mynewt-blinky...
Installing skeleton in newt-test...
Project newt-test successfully created.
$ cd newt-test
$ newt install
Error: Error updating

The error message isn't exactly detailed so I rm'd newt-test and created a new project and tried to install again with the verbose (-v) option.

$ newt install -v
[apache-mynewt-core]:
Downloading repository description
Downloading repository mynewt-core (branch: master; commit: master) at https://github.com/apache/mynewt-core.git
Cloning into '/tmp/newt-repo878420741'...
remote: Counting objects: 83159, done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 83159 (delta 20), reused 53 (delta 20), pack-reused 83086
Receiving objects: 100% (83159/83159), 147.09 MiB | 2.40 MiB/s, done.
Resolving deltas: 100% (51097/51097), done.
Checking out files: 100% (4541/4541), done.
Will checkout branch master
Fetching new remote branches/tags
Download successful!
Stashing local changes
Will create new branch mynewt_1_3_0_tag from tag tags/mynewt_1_3_0_tag
Will create new branch mynewt_1_3_0_tag from tag tags/mynewt_1_3_0_tag
Error: Error updating

Not quite sure what's causing this, i've enabled debug logging (-l "DEBUG") and the issue stems from git while it's doing a stash.

# ...
2018/03/29 13:54:38.923 [DEBUG] /usr/bin/git stash
2018/03/29 13:55:27.680 [DEBUG] o=Saved working directory and index state WIP on master: 941eee7cd Merge pull request #970 from wes3/loralog

2018/03/29 13:55:27.682 [DEBUG] /usr/bin/git tag --list
2018/03/29 13:55:27.743 [DEBUG] o=mynewt_0_8_0_b1_tag
mynewt_0_8_0_b2_rc2_tag
mynewt_0_8_0_b2_rc3_tag
mynewt_0_8_0_b2_tag
mynewt_0_8_0_rc1_tag
mynewt_0_8_0_tag
mynewt_0_9_0_rc1_tag
mynewt_0_9_0_rc3_tag
mynewt_0_9_0_tag
mynewt_1_0_0_b1_rc1_tag
mynewt_1_0_0_b1_rc2_tag
mynewt_1_0_0_b1_tag
mynewt_1_0_0_b2_rc1_tag
mynewt_1_0_0_b2_tag
mynewt_1_0_0_rc1_tag
mynewt_1_0_0_tag
mynewt_1_1_0_rc1_tag
mynewt_1_1_0_rc2_tag
mynewt_1_1_0_tag
mynewt_1_2_0_rc1_tag
mynewt_1_2_0_tag
mynewt_1_3_0_rc1_tag
mynewt_1_3_0_rc2_tag
mynewt_1_3_0_rc3_tag
mynewt_1_3_0_tag
pre_sterly_refactor

2018/03/29 13:55:27.744 [DEBUG] /usr/bin/git show-ref --verify --quiet refs/heads/mynewt_1_3_0_tag
2018/03/29 13:55:27.799 [DEBUG] o=
2018/03/29 13:55:27.799 [DEBUG] err=exit status 1
2018/03/29 13:55:27.801 [DEBUG] /usr/bin/git checkout tags/mynewt_1_3_0_tag -b mynewt_1_3_0_tag
2018/03/29 13:55:28.745 [DEBUG] o=error: Your local changes to the following files would be overwritten by checkout:
	.gitignore
	.mailmap
	.rat-excludes
	LICENSE
	README.md
	apps/blecent/pkg.yml
	apps/blecent/src/peer.c
	apps/blecsc/README.md
	apps/blecsc/pkg.yml
	apps/blecsc/src/blecsc_sens.h
	apps/blecsc/src/gatt_svr.c
	apps/blecsc/src/main.c
	apps/blecsc/syscfg.yml
	apps/blemesh/syscfg.yml
	apps/blemesh_shell/pkg.yml
	apps/blemesh_shell/syscfg.yml
	apps/bleprph/pkg.yml
	apps/blesplit/pkg.yml
	apps/bletiny/src/bletiny.h
	apps/bletiny/src/misc.c
	apps/boot/pkg.yml
	apps/bsncent/src/peer.c
	apps/btshell/pkg.yml
	apps/btshell/src/btshell.h
	apps/btshell/src/cmd.c
	apps/btshell/src/cmd_gatt.c
	apps/btshell/src/cmd_gatt.h
	apps/btshell/src/cmd_l2cap.c
	apps/btshell/src/cmd_l2cap.h
	apps/btshell/src/misc.c
	apps/lora_app_shell/src/las_cmd.c
	apps/lora_app_shell/src/main.c
	apps/loraping/pkg.yml
	apps/loraping/src/main.c
	apps/loraping/syscfg.yml
	apps/pwm_test/pkg.yml
	apps/spitest/syscfg.yml
	boot/boot_serial/src/boot_serial.c
	boot/boot_serial/src/boot_uart.c
	boot/boot_serial/syscfg.yml
	compiler/arc/compiler.yml
	compiler/arc/pkg.yml
	compiler/arm-none-eabi-m3/compiler.yml
	compiler/arm-none-eabi-m3/pkg.yml
	compiler/arm-none-eabi-m3/syscfg.yml
	compiler/sim/compiler.yml
	docs/.gitignore
	docs/Makefile
	docs/README.rst
	docs/conf.py
	docs/doxygen.xml
	docs/index.rst
	docs/network/ble/ble_hs/ble_att.rst
	docs/network/ble/ble_hs/ble_gap.rst
	docs/network/ble/ble_hs/ble_gattc.rst
	docs/network/ble/ble_hs/ble_gatts.rst
	docs/network/ble/ble_hs/ble_hs.rst
	docs/network/ble/ble_hs/ble_hs_id.rst
	docs/network/ble/ble_hs/ble_hs_return_codes.rst
	docs/network/ble/ble_intro.rst
	docs/network/ble/ble_sec.rst
	docs/network/ble/ble_setup/ble_addr.rst
	docs/network/ble/ble_setup/ble_lp_clock.rst
	docs/network/ble/ble_setup/ble_setup_intro.rst
	docs/network/ble/ble_setup/ble_sync_cb.rst
	docs/network/ble/btshell/btshell_GAP.rst
	docs/network/ble/btshell/btshell_GATT.rst
	docs/network/ble/btshell/btshell_advdata.rst
	docs/network/ble/btshell/btshell_api.rst
	docs/network/ble/mesh/index.rst
	docs/network/ble/mesh/mesh_lightning_model.jpg
	docs/network/ble/mesh/mesh_topology.jpg
	docs/network/ble/mesh/sample.rst
	docs/os/core_os/callout/callout.rst
	docs/os/core_os/context_switch/context_switch.rst
	docs/os/core_os/cputime/os_cputime.rst
	docs/os/core_os/event_queue/event_queue.rst
	docs/os/core_os/heap/heap.rst
	docs/os/core_os/mbuf/mbuf.rst
	docs/os/core_os/memory_pool/memory_pool.rst
	docs/os/core_os/mutex/mutex.rst
	docs/os/core_os/mynewt_os.rst
	docs/os/core_os/porting/port_bsp.rst
	docs/os/core_os/porting/port_cpu.rst
	docs/os/core_os/porting/port_mcu.rst
	docs/os/core_os/porting/port_os.rst
	docs/os/core_os/sanity/sanity.rst
	docs/os/core_os/semaphore/semaphore.rst
	docs/os/core_os/task/task.rst
	docs/os/core_os/time/os_time.rst
	docs/os/modules/config/config.rst
	docs/os/modules/console/console.rst
	docs/os/modules/devmgmt/device-mgmt.png
	docs/os/modules/elua/lua_init.rst
	docs/os/modules/elua/lua_main.rst
	docs/os/modules/hal/hal.rst
	docs/os/modules/hal/hal_bsp/hal_bsp.rst
	docs/os/modules/hal/hal_flash/hal_flash.rst
	docs/os/modules/hal/hal_gpio/hal_gpio.rst
	docs/os/modules/hal/hal_i2c/hal_i2c.rst
	docs/os/modules/hal/hal_os_tick/hal_os_tick.rst
	docs/os/modules/hal/hal_spi/hal_spi.rst
	docs/os/modules/hal/hal_system/hal_sys.rst
	docs/os/modules/hal/hal_timer/hal_timer.rst
	docs/os/modules/hal/hal_uart/hal_uart.rst
	docs/os/modules/hal/hal_watchdog/hal_watchdog.rst
	docs/os/modules/imgmgr/imgmgr_module_init.rst
	docs/os/modules/imgmgr/imgr_ver_parse.rst
	docs/os/modules/imgmgr/imgr_ver_str.rst
	docs/os/modules/json/json_encode_object_entry.rst
	docs/os/modules/json/json_encode_object_finish.rst
	docs/os/modules/json/json_encode_object_key.rst
	docs/os/modules/json/json_encode_object_start.rst
	docs/os/modules/json/json_read_object.rst
	docs/os/modules/logs/logs.rst
	docs/os/modules/sensor_framework/sensor_api.rst
	docs/os/modules/sensor_framework/sensor_create.rst
	docs/os/modules/sensor_framework/sensor_driver.rst
	docs/os/modules/sensor_framework/sensor_framewor
Aborting
# ...

Since ~/Documents is actually a symbolic link to the Windows filesystem where all permissions are forced to 0777, my guess is that git stash is unhappy with the file's permissions not matching the git working tree. So I attempted running newt install again on a new project under the Linux filesystem and it succeeded.

So my issue is, are we able to tell git to ignore the file permissions when stashing/checking out a branch?

MingW/Windows path issue causes newt load to fail

I'm following the Blinky tutorial on STM32F4-Discovery at https://mynewt.apache.org/latest/tutorials/blinky/blinky_stm32f4disc.html. While following the tutorial on MinGW/Windows, the newt load command ("newt load stm32f4disc_boot") fails as shown below:

Loading bootloader
Load command: C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery/stm32f4discovery_download.cmd C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery bin\targets\stm32f4disc_boot\app\apps\boot\boot
Environment:
* BOOT_LOADER=1
* FEATURES=BASELIBC_PRESENT BOOT_LOADER CONSOLE_UART_BAUD CONSOLE_UART_DEV CONSOLE_UART_FLOW_CONTROL FLASH_MAP_MAX_AREAS HAL_FLASH_VERIFY_BUF_SZ MBEDTLS_AES_C MBEDTLS_BASE64_C MBEDTLS_ECP_DP_SECP224R1 MBEDTLS_ENTROPY_C MBEDTLS_PKCS1_V15 MBEDTLS_PKCS1_V21 MCU_FLASH_MIN_WRITE_SIZE MCU_STM32F4 MSYS_1_BLOCK_SIZE OS_CPUTIME_FREQ OS_CTX_SW_STACK_GUARD OS_IDLE_TICKLESS_MS_MAX OS_IDLE_TICKLESS_MS_MIN OS_MAIN_STACK_SIZE OS_MAIN_TASK_PRIO OS_SYSVIEW_TRACE_CALLOUT OS_SYSVIEW_TRACE_EVENTQ OS_SYSVIEW_TRACE_MUTEX OS_SYSVIEW_TRACE_SEM SANITY_INTERVAL STM32_HAL_I2C_HAS_CLOCKSPEED STM32_HAL_UART_HAS_SR UART_0 WATCHDOG_INTERVAL
* FLASH_OFFSET=0x8000000
* IMAGE_SLOT=0
* CORE_PATH=C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core
* BSP_PATH=C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery
* BIN_BASENAME=bin\targets\stm32f4disc_boot\app\apps\boot\boot
Error:
Downloading bin\targets\stm32f4disc_boot\app\apps\boot\boot.elf.bin to 0x8000000
Open On-Chip Debugger 0.10.0 (2018-07-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2-1.cfg is deprecated, please switch to interface/stlink.cfg
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 2.901302
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000188 msp: 0x10010000
auto erase enabled
Error: couldn't open bin        argetsstm32f4disc_bootppppoooot.elf.bin



load - Load application image on to the board for <target-name>

Usage:
  newt load <target-name> [flags]

Flags:
      --extrajtagcmd string   Extra commands to send to JTAG software

Global Flags:
  -h, --help              Help for newt commands
  -j, --jobs int          Number of concurrent build jobs (default 8)
  -l, --loglevel string   Log level (default "WARN")
  -o, --outfile string    Filename to tee output to
  -q, --quiet             Be quiet; only display error output
  -s, --silent            Be silent; don't output anything
  -v, --verbose           Enable verbose output when executing commands

This appears to be an issue with the '\' path separator used in $BIN_BASENAME. As a dirty work-around, I modified common_file_to_load() in common.sh to replace '\' characters with '/' :

common_file_to_load () {
    BIN_BASENAME=$(echo $BIN_BASENAME | sed "s/\\\\/\\//g")
    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
}

With this change, the bootloader loads successfully:

$ newt load -v stm32f4disc_boot
Loading bootloader
Load command: C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery/stm32f4discovery_download.cmd C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery bin\targets\stm32f4disc_boot\app\apps\boot\boot
Environment:
* BOOT_LOADER=1
* FEATURES=BASELIBC_PRESENT BOOT_LOADER CONSOLE_UART_BAUD CONSOLE_UART_DEV CONSOLE_UART_FLOW_CONTROL FLASH_MAP_MAX_AREAS HAL_FLASH_VERIFY_BUF_SZ MBEDTLS_AES_C MBEDTLS_BASE64_C MBEDTLS_ECP_DP_SECP224R1 MBEDTLS_ENTROPY_C MBEDTLS_PKCS1_V15 MBEDTLS_PKCS1_V21 MCU_FLASH_MIN_WRITE_SIZE MCU_STM32F4 MSYS_1_BLOCK_SIZE OS_CPUTIME_FREQ OS_CTX_SW_STACK_GUARD OS_IDLE_TICKLESS_MS_MAX OS_IDLE_TICKLESS_MS_MIN OS_MAIN_STACK_SIZE OS_MAIN_TASK_PRIO OS_SYSVIEW_TRACE_CALLOUT OS_SYSVIEW_TRACE_EVENTQ OS_SYSVIEW_TRACE_MUTEX OS_SYSVIEW_TRACE_SEM SANITY_INTERVAL STM32_HAL_I2C_HAS_CLOCKSPEED STM32_HAL_UART_HAS_SR UART_0 WATCHDOG_INTERVAL
* FLASH_OFFSET=0x8000000
* IMAGE_SLOT=0
* CORE_PATH=C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core
* BSP_PATH=C:/msys64/home/mmoss/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery
* BIN_BASENAME=bin\targets\stm32f4disc_boot\app\apps\boot\boot
Successfully loaded image.

The ultimate fix probably would be to use '/' path separators in $BIN_BASENAME when running under MinGW.

Linking order not preserved in `pkg.lflags`

When specifying additional libraries to be linked with pkg.lflags, the order of the libraries is not preserved. Instead, flags seem to be sorted in alphabetical order.

This is a problem when symbols in one of the libraries are defined in another, e.g. the following fails to link:

nm liba.a

00000001 T foo

nm libb.a

00000001 U foo

cat pkg.yml:

pkg.lflags:
  - "-lb"
  - "-la"

Normally, foo from libb will be added to the undefined list, and then matched to foo in liba once it is encountered. However newt actually executes gcc ... -la -lb, which strips the unused foo from liba before processing libb and results in an undefined reference to foo.

A workaround is to rename or symlink the libraries into the order you wish them to be linked ๐Ÿคฎ

native install instructions for Linux installs old version, doesn't upgrade, gives errors

In following the instructions to native install newt on Ubuntu, following the instructions results in an install of newt version 1.7.0, which is out of date. In creating a test project and running newt upgrade, newt then complains that the installed newt version doesn't match the project repo that was downloaded, and fails. The install instructions also seem to suggest that running newt upgrade would upgrade the newt tool itself, but that doesn't seem to happen, so this seems to hit a wall.

Can someone quickly look into those install instructions and see if there is an error somewhere, or is there some other issue with Linux installation?

I'm attempting to install on a fresh Ubuntu 20.04 VM, following all of the instructions line by line, including adding i386 compilers and such.

Build failing with cryptic messages when there is a space in the path to the project

Had prior experience with MyNewt. Spent a few hours bothered people on slack about my failing build. I the end there was a problem with a space in the path.

Would get an error like this:

Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
Error: cc1: note: obsolete option -I- used, please use -iquote instead
repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c:24:15: error: missing binary operator before token "("
 #if MYNEWT_VAL(BOOTUTIL_SIGN_EC256)

When trying to build the bootloader. That is a gcc error.

It should either detect the space and fail letting you know that that is the problem or escape the spaces.

[Windows] Command line length exceeded for split images

When building a split image in Windows, newt will likely fail witha message similar to the following:

Error: fork/exec C:\Program Files (x86)\GNU Tools ARM Embedded\7.0 2017q4\bin\arm-none-eabi-objcopy.exe: The filename or extension is too long.

It seems Windows 7+ limits the command line length to 32767 characters [1]. The objcopy command that elicited the above error is 80819 characters long, well in excess of the maximum.

Normally, the objcopy command isn't so massive. However, for split images, target is a split image, newt needs to specify which symbols go in which image (loader or app). Newt does this by explicitly specifying each symbol to keep usingthe -K <symbol> syntax.

[1] https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553

Newt should use Go modules

Now that Go has official module support (and by September, GOPATH will be deprecated), Newt should be made so that it can build using modules. This would eliminate the need for build.sh as with modules, it would be possible to just cd to newt and type go build.

I few things that seem to need changes:

  • Create go.mod files in the appropriate places.
  • Fix spelling of Sirupsen -> sirupsen in any import statements. With modules, this will have to match the github user's name.
  • Fixing up any necessary dependencies.
  • Redoing the vendoring. Go modules support vendoring, although it is much less necessary, it can still be done.

Make newt 'rc-aware'

This would allow newt to look for rc tags (with proper info/warning message) when specified release tag is not in repo.

This would make release process simpler and less confusing when multiple release candidates are happening (currently we need to move tags while doing so which is confusing for users who downloaded repo in between of release candidates...)

Unable to build a "split target"

Trying to build a split target setup following the Mynewt documentation,
I've configured the following targets:
Loader:
targets/thingy-loader
app=@apache-mynewt-core/apps/bleprph
bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
build_profile=optimized
syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0

Application:

targets/split-app
app=@apache-mynewt-core/apps/splitty
bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
build_profile=optimized
loader=@apache-mynewt-core/apps/bleprph
syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0

The loader target builds properly but I get the following error when building the application:

Error: Two app packages in build: apps/bleprph, apps/splitty

So, either a newt tool bug or an outdated documention ?

BTW, I didn't find any explanation in the documentation to build a monolithic (One large image; upgrade not supported) application.

Thanks.

Relative path for cmake src and headers

First, I love the target cmake ability, works with Clion, and changing targets is fast and easy now.

However.... There is one small improvement which would make life better.

The generated CMakeLists.txt has full path, and 'i think' this is what causes Clion to not recognize the files in the project tree, instead it lists them at the root level (flat). When I search, it finds both full-path and relative path file for example.

maybe some relative path option might help.

This is a feature improvement request, not a bug.

Customize command for running test binaries

It is useful to specify a custom executor script for running tests as part of the newt test command. This could be specified as a key in pkg.yml for unittest packages, analogous to bsp.downloadscript and bsp.debugscript which exist for bsp packages.

This script will be executed by newt test with the (relative) path to the test binary as a parameter, in place of the binary itself. The default should be to exec the binary directly, as it is now.

See: https://github.com/apache/mynewt-newt/blob/master/newt/builder/selftest.go#L151

Motivation

WSL on Win10, as well as macOS Catalina, are exclusively 64-bit and are not able to run the test ELFs. While both of these systems are capable of building the unit tests with crosstools, running the resulting binary requires a VM/container with a 32-bit-capable OS. May also be useful for non-WSL Windows environments.

Workaround

Run newt test to build the test package, which will fail with an ELF format error.

$ newt test test_pkg
Testing package test_pkg
...
Executing test: bin/targets/unittest/test_pkg/app/test_pkg/test_pkg.elf
Test failure (test_pkg):
fork/exec bin/targets/unittest/test_pkg/app/test_pkg/test_pkg.elf: exec format error
Error: Test failure(s):
Passed tests: []
Failed tests: [test_pkg]

Then manually execute the built binary in a supported environment:

docker run -e NEWT_USER=$(id -u) -e NEWT_GROUP=$(id -g) -e NEWT_HOST=$(uname) \
    --rm --privileged -v "$(pwd):/workspace" -w /workspace \
    mynewt/newt:latest \
    bin/targets/unittest/test_pkg/app/test_pkg/test_pkg.elf

Merge syscfg.yml sections with the same name

Would be nice if newt could merge multiple sections with the same name in single .yml file instead of just using last one, especially syscfg.defs and syscfg.vals. This could be useful in large configurations for BSPs or apps where many different features are (re)defined so splitting these settings into groups would improve readability.

For example, I'd like to have clean up syscfg.yml a bit and do something like this:

# configure pins
syscfg.vals:
    PIN1: 1
    PIN2: 2
syscfg.vals.FEATURE_1:
    PIN7: 7
    PIN8: 8

# configure some other settings
syscfg.vals:
   FOO: 'bar'

Currently it seems that 2nd syscfg.vals overwrites everything defined in 1st syscfg.vals (and the same for syscfg.defs)

Build failures for conditional dependency lists

Newt fails to build some targets when one or more packages has a conditional dependency list. I will describe the problem in more detail, but first, here is one way to replicate the issue:

Replicate Steps

(this requires the apache-mynewt-core and mcuboot repos)

  1. Create the following target:
    app=@mcuboot/boot/mynewt
    bsp=@apache-mynewt-core/hw/bsp/nrf52dk
    build_profile=optimized
    syscfg=BOOT_SERIAL=1
  1. Modify repos/mcuboot/boot/mynewt.pkg.yml as follows:
diff --git a/boot/mynewt/pkg.yml b/boot/mynewt/pkg.yml
index a005522..936f7dc 100644
--- a/boot/mynewt/pkg.yml
+++ b/boot/mynewt/pkg.yml
@@ -32,7 +32,10 @@ pkg.deps:
     - "@mcuboot/boot/mynewt/mcuboot_config"
     - "@mcuboot/boot/bootutil"
     - "@apache-mynewt-core/kernel/os"
-    - "@apache-mynewt-core/sys/console/minimal"
+
+pkg.deps.'!BOOT_SERIAL':
+    - "@apache-mynewt-core/sys/console/stub"

 pkg.deps.BOOT_SERIAL:
     - "@mcuboot/boot/boot_serial"
+    - "@apache-mynewt-core/sys/console/minimal"

(i.e., only depend on the minimal console if BOOT_SERIAL is enabled; otherwise, depend on the stub console. This is how the package would be defined if it weren't for this newt bug, as console/minimal adds extra code size that isn't needed)

  1. Build the target.

This yields the following output:

Building target targets/nrf52dk_boot
* Warning: setting CONSOLE_UART_DEV redefined (pkg1=sys/console/minimal pkg2=sys/console/stub)
* Warning: setting CONSOLE_UART_BAUD redefined (pkg1=sys/console/minimal pkg2=sys/console/stub)
* Warning: setting CONSOLE_UART_FLOW_CONTROL redefined (pkg1=sys/console/minimal pkg2=sys/console/stub)
* Warning: setting CONSOLE_UART_BAUD redefined (pkg1=sys/console/minimal pkg2=sys/console/stub)
* Warning: setting CONSOLE_UART_FLOW_CONTROL redefined (pkg1=sys/console/minimal pkg2=sys/console/stub)
* Warning: setting CONSOLE_UART_DEV redefined (pkg1=sys/console/minimal pkg2=sys/console/stub)
Error: Package not found sys/console/stub; required by kernel/os

These warnings and the error are incorrect. Only one console package should be included in the build (console/minimal since our target defines BOOT_SERIAL), so the settings should not be getting redefined. Furthermore, kernel/os should not be looking for console/stub; its CONSOLE API requirement should be satisfied by console/minimal instead.

Explanation

This problem arises because newt resolves API requirements at the same time that it resolves package dependencies and calculates syscfg state. When package resolution first begins, the BOOT_SERIAL setting is undefined, since the target's syscfg.yml file hasn't been processed yet. Consequently, the boot loader app depends on console/stub, not console/minimal. When newt processes the kernel/os package, it resolves the CONSOLE API requirement by adding a hard dependency to the only suitable package in the system: console/stub.

Later, when the target's syscfg.yml file is processed, newt determines that console/minimal should be pulled in, and console/stub should be removed from the resolution state. However, two problems have already occurred: 1) kernel/os already has a dependency on console/stub, and 2) console/stub's settings are still in syscfg, so when console/minimal's syscfg is read, newt reports redefinition errors for the identically named settings.

newt test does not work with Mac OS X Catalina

ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libm.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libm.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture i386:
  "_cfmakeraw", referenced from:
      _uart_dev_set_attr in @apache-mynewt-core_hw_mcu_native.a(native_uart_cfg.o)
  "_cfsetispeed", referenced from:
      _uart_dev_set_attr in @apache-mynewt-core_hw_mcu_native.a(native_uart_cfg.o)
  "_isalnum", referenced from:
      _uart_log_data in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
  "___snprintf_chk", referenced from:
      _uart_pty in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
      _uart_log_data in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
  "_isdigit", referenced from:
      _uart_hal_init in @apache-mynewt-core_hw_drivers_uart_uart_hal.a(uart_hal.o)
  "_sigaction", referenced from:
      _sim_signals_init in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
  "_setitimer", referenced from:
      _sim_tick_idle in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
  "_tcgetattr", referenced from:
      _uart_pty_set_attr in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
  "_sigprocmask", referenced from:
      _sim_save_sr in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
      _sim_restore_sr in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
      _sim_in_critical in @apache-mynewt-core_kernel_sim.a(sim_sched_sig.o)
  "_memcmp", referenced from:
      _addrcmp in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
  "_if_nametoindex", referenced from:
      _native_sock_itf_getnext in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
      _native_sock_itf_addr in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
      _native_sock_itf_addr_getnext in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
  "_freeifaddrs", referenced from:
      _native_sock_itf_getnext in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
      _native_sock_itf_addr in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
      _native_sock_itf_addr_getnext in @apache-mynewt-core_net_ip_native_sockets.a(native_itf.o)
  "_open$UNIX2003", referenced from:
      _flash_native_file_open in @apache-mynewt-core_hw_mcu_native.a(hal_flash.o)
      _uart_open_dev in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
      _uart_open_log in @apache-mynewt-core_hw_mcu_native.a(hal_uart.o)
  "_kill$UNIX2003", referenced from:

speed up newt install

newt install could download only 'shallow' git copy of repos containing only selected tag/branch

Remove outdated information from README

The current README file contains manifestly out-of-date information, such as:

  • "We do not merge pull requests directly on Github, all PRs will be pulled and pushed through https://git.apache.org/." [No longer true, looking at the commit history.]
  • "Bugs can be filed on the Apache Mynewt Bug Tracker." [No longer true, there's nothing much in the JIRA instance, versus many issues here at GitHub.]
  • "Feature requests should also be filed on the Apache Mynewt Bug Tracker." [As the previous.]

Allow override of `build_profile` setting per-package.

E.g., if the user wants to debug a the "nimble/host" package on constrained hardware, they might do the following:

  1. Set target.build_profile to optimized.
  2. In net/nimble/host/pkg.yml, set pkg.build_profile to debug.

Currently, there is no way to override the build profile in an individual package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.