OSDN Git Service

First commitment for the BlackTank LPC1769.
[blacktank/blacktank.git] / ntshell.readme_en
1 ===============================================================
2  Natural Tiny Shell - A tiny shell for a small embedded system
3  Copyright(C) 2011 Shinichiro Nakamura
4 ===============================================================
5
6  Natural Tiny Shell (NT-Shell) is a tiny shell for a small
7  embedded system.
8
9 1. Special thanks
10
11  Mr.Paul Williams
12  - He created a draw of DEC compatible state machine parser.
13
14  Mr.Joshua Haberman
15  - He implemented the state machine parser with C language.
16    And it has great interface. It's really simple and smart!
17
18 2. The background
19
20  Today, There are so many great MPUs.
21  And the developper can design a small embedded system with it.
22  It's really great things and I never imagine 20 years ago.
23
24  There is a way to debug a embedded system using UART interface.
25  It is same as UNIX terminal interfaces.
26
27  The developper can be control a embedded system with it.
28
29 3. The basic concepts
30
31  * Small :)
32  * Simple :)
33  * Compatible with VT100 :)
34  * No need any C runtime library :)
35
36 4. Features
37
38  CTRL+A : Head
39  CTRL+E : Tail
40  CTRL+F : Cursor right
41  CTRL+B : Cursor left
42  CTRL+C : Cancel
43  CTRL+P : History(Prev)
44  CTRL+N : History(Next)
45  TAB    : Suggestion
46
47 5. The structure
48
49  NT-Shell are consists from 5 modules.
50
51  * Top interface module
52     ntshell.c
53     ntshell.h
54  * Utility
55     ntopt.c
56     ntopt.h
57     ntlibc.c
58     ntlibc.h
59  * VT100 parser
60     vtparse.c
61     vtparse.h
62     vtparse_table.c
63     vtparse_table.h
64  * Text editor
65     text_editor.c
66     text_editor.h
67  * Text history
68     text_history.c
69     text_history.h
70
71 6. Porting guide
72
73  The NT-Shell interface is really simple.
74  It need 2 I/O interfaces for UART and a callback interface
75  for getting a user request.
76
77  void ntshell(
78         int (*func_read)(char *buf, int cnt),
79         int (*func_write)(const char *buf, int cnt),
80         int (*func_cb)(const char *text));
81
82  6-1. func_read
83
84   func_read is a interface for reading user key inputs.
85   It's blocking interface.
86
87  6-2. func_write
88
89   func_write is a interface for writing shell outputs.
90   It's blocking interface.
91
92  6-3. func_cb
93
94   func_cb is a callback interface for user request to your system.
95
96 7. The license
97
98  * vtparse and vtparse_table are in the public domain.
99  * ntshell, ntopt, ntlibc, text_editor, text_history are in the MIT license.
100
101  ===============================================================
102  The MIT license for Natural Tiny Shell (NT-Shell)
103  ===============================================================
104  Copyright (c) 2010-2011 Shinichiro Nakamura
105
106  Permission is hereby granted, free of charge, to any person
107  obtaining a copy of this software and associated documentation
108  files (the "Software"), to deal in the Software without
109  restriction, including without limitation the rights to use,
110  copy, modify, merge, publish, distribute, sublicense, and/or
111  sell copies of the Software, and to permit persons to whom the
112  Software is furnished to do so, subject to the following
113  conditions:
114
115  The above copyright notice and this permission notice shall be
116  included in all copies or substantial portions of the Software.
117
118  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
119  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
120  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
121  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
122  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
123  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
124  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
125  OTHER DEALINGS IN THE SOFTWARE.
126  ===============================================================
127
128  So you can use this software in non-commercial or commercial products.
129  But there aren't any warranty.
130
131  Please do NOT remove copyright texts, if you redistribute this package.
132
133 8. References
134
135  * A parser for DEC's ANSI-compatible video terminal
136    http://vt100.net/emu/dec_ansi_parser
137
138 9. Version
139
140  * 2011/03/01   Version 0.0.1    Initial version.
141  * 2011/03/02   Version 0.0.2    Added a utility module.
142  * 2011/03/04   Version 0.0.3    Buf fixed.
143  * 2011/04/30   Version 0.0.4    Changed an implementation of the vtparse table.
144                                  Added ntopt.
145                                  Added ntlibc.
146  * 2011/05/16   Version 0.0.5    Added input suggestion features.
147                                  Changed the interface of the ntshell.
148  * 2011/05/22   Version 0.0.6    Added cursor head and tail feautures.
149  * 2011/09/22   Version 0.0.7    Updated ntopt interface.