You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by "David G. Simmons" <sa...@mac.com> on 2017/01/12 14:54:15 UTC

newt target set bug

I created a JIRA Bug report on this (MYNEWT-543 <https://issues.apache.org/jira/browse/MYNEWT-543>) but here's the TL;DR

If you have anything already in your project's syscfg.yml and you use newt target set syscfg=SOME_VAL=0 it will wipe out your existing values already set in syscfg.yml

You may not notice this unless you have something like, say, SHELL_TASK: 1 set, and you then set a different syscfg value and rebuild, then wonder where your shell task went. One could spend a LOT of time trying to figure this out, or so I hear.

DSimmons-Pro:myproj dsimmons$ cat targets/air_q/syscfg.yml
### Package: targets/air_q

syscfg.vals:
    # Enable the shell task.
    SHELL_TASK: 1
    STATS_CLI: 1

    CONSOLE_TICKS: 1
    CONSOLE_PROMPT: 1
DSimmons-Pro:myproj dsimmons$ newt target set air_q  syscfg=OPENOCD_DEBUG=1
Target targets/air_q successfully set target.syscfg to OPENOCD_DEBUG=0
DSimmons-Pro:myproj dsimmons$ cat targets/air_q/syscfg.yml
### Package: targets/air_q

syscfg.vals:
    OPENOCD_DEBUG: 1
DSimmons-Pro:myproj dsimmons$

And suddenly you can load your project on an Arduino Primo, but your shell task has gone missing.

Best regards,
dg
--
David G. Simmons
(919) 534-5099
Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
/** Message digitally signed for security and authenticity.
* If you cannot read the PGP.sig attachment, please go to
 * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
 * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
**/
♺ This email uses 100% recycled electrons. Don't blow it by printing!

There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.