added description for trying shell commands
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/ff92b537 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/ff92b537 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/ff92b537 Branch: refs/heads/asf-site Commit: ff92b53742446a691210133204536436bf150d32 Parents: 3355bd0 Author: aditihilbert <ad...@runtime.io> Authored: Wed Dec 23 13:54:21 2015 -0800 Committer: aditihilbert <ad...@runtime.io> Committed: Wed Dec 23 13:54:21 2015 -0800 ---------------------------------------------------------------------- docs/modules/console.md | 2 +- docs/modules/shell.md | 79 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 78 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ff92b537/docs/modules/console.md ---------------------------------------------------------------------- diff --git a/docs/modules/console.md b/docs/modules/console.md index 4e0bd73..b5c4780 100644 --- a/docs/modules/console.md +++ b/docs/modules/console.md @@ -1,7 +1,7 @@ # Console -The console is an operating system window where users interact with system programs of the operating system or a console application by entering text input (typically from a keyboard) and reading text output (typically on the computer terminal). The text written on the console brings some information and is a sequence of characters sent by the OS or programs running on the OS. +The console is an operating system window where users interact with system programs of the operating system or a console application by entering text input (typically from a keyboard) and reading text output (typically on the computer terminal or monitor). The text written on the console brings some information and is a sequence of characters sent by the OS or programs running on the OS. Support is currently available for console access via the serial port on the hardware board. http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ff92b537/docs/modules/shell.md ---------------------------------------------------------------------- diff --git a/docs/modules/shell.md b/docs/modules/shell.md index 1b2928a..f3e7076 100644 --- a/docs/modules/shell.md +++ b/docs/modules/shell.md @@ -1,11 +1,86 @@ # Shell -Insert synopsis here +The shell is the program which puts up a prompt for a command, processes commands, and returns output. Interacting with the console of a device is done using a shell program. ## Description -Describe module here, special features, how pieces fit together etc. +A few commands to the console interface are currently available in the shell - `tasks`, `log`, and `stat stat`. A $ prompt sign will be coming soon! + +Create a sim target to check out these commands available in shell. + +``` +user@~/dev/larva$ newt target create blinky_sim +Creating target blinky_sim +Target blinky_sim successfully created! +user@~/dev/larva$ newt target set blinky_sim name=blinky_sim +Target blinky_sim successfully set name to blinky_sim +user@~/dev/larva$ newt target set blinky_sim arch=sim +Target blinky_sim successfully set arch to sim +user@~/dev/larva$ newt target set blinky_sim project=blinky +Target blinky_sim successfully set project to blinky +user@~/dev/larva$ newt target set blinky_sim bsp=hw/bsp/native +Target blinky_sim successfully set bsp to hw/bsp/native +user@~/dev/larva$ newt target set blinky_sim compiler_def=sim +Target blinky_sim successfully set compiler_def to sim +user@~/dev/larva$ newt target set blinky_sim compiler_def=debug +Target blinky_sim successfully set compiler_def to debug +user@~/dev/larva$ newt target set blinky_sim compiler=sim +Target blinky_sim successfully set compiler to sim +user@~/dev/larva$ newt target show +blinky_sim + arch: sim + bsp: hw/bsp/native + compiler: sim + compiler_def: debug + name: blinky_sim + project: blinky +user@~/dev/larva$ newt target build blinky_sim +Building target blinky_sim (project = blinky) +Compiling case.c +Compiling suite.c +Compiling testutil.c +.. +.. +Building project blinky +Linking blinky.elf +Successfully run! + +user@~/dev/larva$ ./project/blinky/bin/blinky_sim/blinky.elf +uart0 at /dev/ttys005 + +``` + +Open up a new terminal to run minicom, a text-based serial port control and terminal emulation program. Set device name to the serial port of the target. + +``` +user@~$ minicom -D /dev/ttys005 +Welcome to minicom 2.7 + +OPTIONS: +Compiled on Nov 24 2015, 16:14:21. +Port /dev/ttys005, 11:32:17 + +Press Meta-Z for help on special keys + +log +174578:[0] bla +174578:[0] bab + +tasks +217809:6 tasks: +217809: shell (prio: 3, nw: 0, flags: 0x0, ssize: 0, cswcnt: 59, tot_run_time: 0ms) +217840: idle (prio: 255, nw: 0, flags: 0x0, ssize: 0, cswcnt: 18763, tot_run_time: 217809ms) +217878: uart_poller (prio: 0, nw: 217819, flags: 0x0, ssize: 0, cswcnt: 18667, tot_run_time: 0ms) +217923: task1 (prio: 1, nw: 218710, flags: 0x0, ssize: 0, cswcnt: 218, tot_run_time: 0ms) +217953: os_sanity (prio: 254, nw: 218710, flags: 0x0, ssize: 0, cswcnt: 218, tot_run_time: 0ms) +218010: task2 (prio: 2, nw: 217709, flags: 0x3, ssize: 0, cswcnt: 218, tot_run_time: 0ms) + +stat stat +229881:s0: 1 + +``` + ## Data structures