[ 
https://issues.apache.org/jira/browse/MYNEWT-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886077#comment-15886077
 ] 

David G. Simmons commented on MYNEWT-543:
-----------------------------------------

Most of the other newt target set commands are binary in nature. The bsp= is 
either this value or that value, but it's not going to have multiple values. 
Likewise for the app=, etc. The ONLY one (that I am aware of) that can take a 
list is the syscfg values. So, if it is *only* editable via newt target set 
then the newt target set string gets *very* long quickly. Example, for my air_q 
demo app:
# newt target set air_q 
syscfg:OPENOCD_DEBUG=1,SHELL_TASK=1,STATS_CLI=1,CONSOLE_TICKS=0,CONSOLE_PROMPT=1,UART_0_PIN_TX=23,UART_PIN_0_RX=24,CONFIG_NEWTMGR=1
 

And if I want to, say, simply turn the console prompt off, I have to enter that 
entire string again, minus the CONSOLE_PROMPT part. 

Since we strongly discourage the editing of package-level syscfg.yml files, a 
suer that wants to override settings for a number of packages may very well 
have a large number of app-specific syscfg settings to enter. Massive `newt 
target set` command strings invite typos and frustration, IMO. 

> setting sys cfg values via newt erases old settings
> ---------------------------------------------------
>
>                 Key: MYNEWT-543
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-543
>             Project: Mynewt
>          Issue Type: Bug
>          Components: Newt
>    Affects Versions: v1_0_0_beta1
>         Environment: Mac OS X
>            Reporter: David G. Simmons
>            Assignee: Wanda Chiu
>            Priority: Minor
>             Fix For: v1_0_0_rel
>
>
> DSimmons-Pro:myproj dsimmons$ cat targets/air_q/syscfg.yml
> \### Package: targets/air_q
> syscfg.vals:
>     OPENOCD_DEBUG: 1
>     \# 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=0
> 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: 0
> DSimmons-Pro:myproj dsimmons$



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to