1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
|
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
config NSH_LIBRARY
bool "NSH Library"
default n
---help---
Build the NSH support library. This is used, for example, by
examples/nsh in order to implement the full NuttShell (NSH).
if NSH_LIBRARY
menu "Command Line Configuration"
choice
prompt "Command Line Editor"
default NSH_READLINE if DEFAULT_SMALL
default NSH_CLE if !DEFAULT_SMALL
config NSH_READLINE
bool "Minimal readline()"
select SYSTEM_READLINE
---help---
Selects the minimal implementation of readline(). This minimal
implementation provides on backspace for command line editing.
config NSH_CLE
bool "Command Line Editor"
select SYSTEM_CLE
---help---
Selects the more extensive, EMACS-like command line editor.
Select this option only if (1) you don't mind a modest increase
in the FLASH footprint, and (2) you work with a terminal that
supports extensive VT100 editing commands.
Selecting this option will add probably 1.5-2KB to the FLASH
footprint.
endchoice
config NSH_LINELEN
int "Max command line length"
default 64 if DEFAULT_SMALL
default 80 if !DEFAULT_SMALL
---help---
The maximum length of one command line and of one output line.
Default: 64/80
config NSH_DISABLE_SEMICOLON
bool "Disable multiple commands per line"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
---help---
By default, you can enter multiple NSH commands on a line with each
command separated by a semicolon. You can disable this feature to
save a little memory on FLASH challenged platforms.
config NSH_CMDPARMS
bool "Enable commands as parameters"
default n if DEFAULT_SMALL
default y if !DEFAULT_SMALL
depends on !DISABLE_MOUNTPOINT
---help---
If selected, then the output from commands, from file applications, and
from NSH built-in commands can be used as arguments to other
commands. The entity to be executed is identified by enclosing the
command line in back quotes. For example,
set FOO `myprogram $BAR`
Will execute the program named myprogram passing it the value of the
environment variable BAR. The value of the environment variable FOO
is then set output of myprogram on stdout.
Because this feature commits significant resources, it is disabled by
default.
config NSH_MAXARGUMENTS
int "Maximum number of command arguments"
default 6
---help---
The maximum number of NSH command arguments.
Default: 6
config NSH_ARGCAT
bool "Concatenation of argument strings"
default n if DEFAULT_SMALL
default y if !DEFAULT_SMALL
---help---
Support concatenation of strings with environment variables or command
output. For example:
set FOO XYZ
set BAR 123
set FOOBAR ABC_${FOO}_${BAR}
would set the environment variable FOO to XYZ, BAR to 123 and FOOBAR
to ABC_XYZ_123. If NSH_ARGCAT is not selected, then a slightly small
FLASH footprint results but then also only simple environment
variables like $FOO can be used on the command line.
config NSH_NESTDEPTH
int "Maximum command nesting"
default 3
---help---
The maximum number of nested if-then[-else]-fi sequences that
are permissable. Default: 3
config NSH_DISABLEBG
bool "Disable background commands"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for background
commands. This setting disables the 'nice' command prefix and
the '&' command suffix. This would only be set on systems
where a minimal footprint is a necessity and background command
execution is not.
endmenu # Command Line Configuration
config NSH_BUILTIN_APPS
bool "Enable built-in applications"
default n
depends on BUILTIN
---help---
Support external registered, "built-in" applications that can be
executed from the NSH command line (see apps/README.txt for
more information). This options requires support for builtin
applications (BUILTIN).
config NSH_FILE_APPS
bool "Enable execution of program files"
default n
depends on LIBC_EXECFUNCS
---help---
Support execution of program files residing within a file
system. This options requires support for the posix_spawn()
interface (LIBC_EXECFUNCS).
menu "Disable Individual commands"
config NSH_DISABLE_ADDROUTE
bool "Disable addroute"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_BASE64DEC
bool "Disable base64dec"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_BASE64
config NSH_DISABLE_BASE64ENC
bool "Disable base64enc"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_BASE64
config NSH_DISABLE_CAT
bool "Disable cat"
default n
config NSH_DISABLE_CD
bool "Disable cd"
default n
config NSH_DISABLE_CP
bool "Disable cp"
default n
config NSH_DISABLE_CMP
bool "Disable cmp"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_DD
bool "Disable dd"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_DF
bool "Disable df"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_DELROUTE
bool "Disable delroute"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_ECHO
bool "Disable echo"
default n
config NSH_DISABLE_EXEC
bool "Disable exec"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_EXIT
bool "Disable exit"
default y if DEFAULT_SMALL && !NSH_TELNET
default n if !DEFAULT_SMALL || NSH_TELNET
config NSH_DISABLE_FREE
bool "Disable free"
default n
config NSH_DISABLE_GET
bool "Disable get"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_HELP
bool "Disable help"
default n
config NSH_DISABLE_HEXDUMP
bool "Disable hexdump"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_IFCONFIG
bool "Disable ifconfig"
default n
config NSH_DISABLE_KILL
bool "Disable kill"
default n
config NSH_DISABLE_LOSETUP
bool "Disable losetup"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_LS
bool "Disable ls"
default n
config NSH_DISABLE_MB
bool "Disable mb"
default n
config NSH_DISABLE_MD5
bool "Disable md5"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_HASH_MD5
config NSH_DISABLE_MKDIR
bool "Disable mkdir"
default n
config NSH_DISABLE_MKFATFS
bool "Disable mkfatfs"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on FS_FAT
config NSH_DISABLE_MKFIFO
bool "Disable mkfifo"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_MKRD
bool "Disable mkrd"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_MH
bool "Disable mh"
default n
config NSH_DISABLE_MOUNT
bool "Disable mount"
default n
config NSH_DISABLE_MW
bool "Disable mw"
default n
config NSH_DISABLE_NSFMOUNT
bool "Disable nfsmount"
default n
depends on NFS
config NSH_DISABLE_PS
bool "Disable ps"
default n
depends on !BUILD_PROTECTED && !BUILD_KERNEL
config NSH_DISABLE_PING
bool "Disable ping"
default n
depends on NET_ICMP
config NSH_DISABLE_PUT
bool "Disable put"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_PWD
bool "Disable pwd"
default n
config NSH_DISABLE_RM
bool "Disable rm"
default n
config NSH_DISABLE_RMDIR
bool "Disable rmdir"
default n
config NSH_DISABLE_SET
bool "Disable set"
default n
config NSH_DISABLE_SH
bool "Disable sh"
default n
config NSH_DISABLE_SLEEP
bool "Disable sleep"
default n
config NSH_DISABLE_TEST
bool "Disable test"
default n
config NSH_DISABLE_UMOUNT
bool "Disable umount"
default n
config NSH_DISABLE_UNSET
bool "Disable unset"
default n
config NSH_DISABLE_URLDECODE
bool "Disable urldecode"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_URLCODE
config NSH_DISABLE_URLENCODE
bool "Disable urlencode"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_URLCODE
config NSH_DISABLE_USLEEP
bool "Disable usleep"
default n
config NSH_DISABLE_WGET
bool "Disable wget"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
config NSH_DISABLE_XD
bool "Disable xd"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
endmenu
menu "Configure Command Options"
config NSH_CMDOPT_DF_H
bool "df: Enable [-h] man-readable format"
default n if DEFAULT_SMALL
default y if !DEFAULT_SMALL
depends on !NSH_DISABLE_DF
config NSH_CODECS_BUFSIZE
int "File buffer size used by CODEC commands"
default 128
config NSH_CMDOPT_HEXDUMP
bool "hexdump: Enable 'skip' and 'count' parameters"
default n if DEFAULT_SMALL
default y if !DEFAULT_SMALL
depends on !NSH_DISABLE_HEXDUMP
config NSH_PROC_MOUNTPOINT
string "procfs mountpoint"
default "/proc"
depends on FS_PROCFS
endmenu
config NSH_FILEIOSIZE
int "NSH I/O buffer size"
default 512 if DEFAULT_SMALL
default 1024 if !DEFAULT_SMALL
---help---
Size of a static I/O buffer used for file access (ignored if
there is no filesystem). Default is 512/1024.
config NSH_STRERROR
bool "Use strerror()"
default n
depends on LIBC_STRERROR
---help---
strerror(errno) makes more readable output but strerror() is
very large and will not be used unless this setting is 'y'
This setting depends upon the strerror() having been enabled
with LIBC_STRERROR.
menu "Scripting Support"
config NSH_DISABLESCRIPT
bool "Disable script support"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for scripting. This
setting disables the 'sh', 'test', and '[' commands and the
if-then[-else]-fi construct. This would only be set on systems
where a minimal footprint is a necessity and scripting is not.
if !NSH_DISABLESCRIPT
config NSH_DISABLE_ITEF
bool "Disable if-then-else-fi"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for if-then-else-fi
sequences in scripts. This would only be set on systems where
some minimal scripting is required but if-then-else-fi is not.
config NSH_DISABLE_LOOPS
bool "Disable loops"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for while-do-done and
until-do-done sequences in scripts. This would only be set on
systems where some minimal scripting is required but looping
is not.
endif # !NSH_DISABLESCRIPT
config NSH_MMCSDMINOR
int "MMC/SD minor device number"
default 0
---help---
If the architecture supports an MMC/SD slot and if the NSH
architecture specific logic is present, this option will provide
the MMC/SD minor number, i.e., the MMC/SD block driver will
be registered as /dev/mmcsdN where N is the minor number.
Default is zero.
config NSH_ROMFSETC
bool "Support ROMFS start-up script"
default n
depends on FS_ROMFS
---help---
Mount a ROMFS filesystem at /etc and provide a startup script
at /etc/init.d/rcS. The default startup script will mount
a FAT FS RAMDISK at /tmp but the logic is easily extensible.
if NSH_ROMFSETC
config NSH_ROMFSRC
bool "Support ROMFS login script"
default n
---help---
The ROMFS start-up script will be executed excactly once. For
simple, persistence consoles (like a serial console). But with
other other kinds of consoles, there may be multiple, transient
sessions (such as Telnet and USB consoles). In these cases, you
may need another script that is executed at the beginning of each
session. Selecting this option enables support for such a login
script
config NSH_ROMFSMOUNTPT
string "ROMFS mount point"
default "/etc"
---help---
The default mountpoint for the ROMFS volume is /etc, but that
can be changed with this setting. This must be a absolute path
beginning with '/'.
config NSH_INITSCRIPT
string "Relative path to startup script"
default "init.d/rcS"
---help---
This is the relative path to the startup script within the mountpoint.
The default is init.d/rcS. This is a relative path and must not
start with '/'.
config NSH_RCSCRIPT
string "Relative path to login script"
default ".nshrc"
depends on NSH_ROMFSRC
---help---
This is the relative path to the login script within the mountpoint.
The default is .nshrc. This is a relative path and must not
start with '/'.
config NSH_ROMFSDEVNO
int "ROMFS block device minor number"
default 0
---help---
This is the minor number of the ROMFS block device. The default is
'0' corresponding to /dev/ram0.
config NSH_ROMFSSECTSIZE
int "ROMFS sector size"
default 64
---help---
This is the sector size to use with the ROMFS volume. Since the
default volume is very small, this defaults to 64 but should be
increased if the ROMFS volume were to be become large. Any value
selected must be a power of 2.
choice
prompt "ROMFS header location"
default NSH_DEFAULTROMFS
config NSH_DEFAULTROMFS
bool "Default ROMFS header path"
---help---
Selects the default header located in the source directory of the
NSH library.
config NSH_ARCHROMFS
bool "Architecture-specific ROMFS path"
---help---
Enable this option to provide an architecture-specific ROMFS
header at arch/<boardname>/nsh_romfsimg.h. Note that this header
will be linked (or copied) from nuttx/configs/<boardname>/include
and should be stored at that location in the nuttx configs/
sub-directory.
config NSH_CUSTOMROMFS
bool "Custom ROMFS header path"
---help---
Enable this option to provide a custom ROMFS header. The path to
the header file can be specified in the option "Custom ROMFS header
file".
endchoice
if NSH_CUSTOMROMFS
config NSH_CUSTOMROMFS_HEADER
string "Custom ROMFS header file path"
default ""
---help---
Specifies the path to the custom ROMFS header file. This must be
either a full path or a path relative to one of the include file
search paths provided in your CFLAGS.
endif #NSH_CUSTOMROMFS
config NSH_FATDEVNO
int "FAT block device minor number"
default 1
depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the minor number of the FAT
FS block device. The default is '1' corresponding to /dev/ram1.
config NSH_FATSECTSIZE
int "FAT sector size"
default 512
depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the sector size use with the
FAT FS. Default is 512.
config NSH_FATNSECTORS
int "FAT number of sectors"
default 1024
depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the number of sectors to use
with the FAT FS. Defualt is 1024. The amount of memory used by the
FAT FS will be NSH_FATSECTSIZE * NSH_FATNSECTORS bytes.
config NSH_FATMOUNTPT
string "FAT mount point"
default "/tmp"
depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the location where the FAT
FS will be mounted. Default is "/tmp".
endif # NSH_ROMFSETC
endmenu # Scripting Support
menu "Console Configuration"
config NSH_CONSOLE
bool "Use console"
default y
---help---
If NSH_CONSOLE is set to 'y', then a character driver
console front-end is selected (/dev/console).
Normally, the serial console device is a UART and RS-232
interface. However, if USBDEV is defined, then a USB
serial device may, instead, be used if the one of
the following are defined:
PL2303 and PL2303_CONSOLE - Set up the Prolifics PL2303
emulation as a console device at /dev/console.
CDCACM and CDCACM_CONSOLE - Set up the CDC/ACM serial
device as a console device at dev/console.
NSH_USBCONSOLE and NSH_USBCONDEV - Sets up some other USB
serial device as the NSH console (not necessarily dev/console).
config NSH_USBCONSOLE
bool "Use a USB serial console"
default n
depends on NSH_CONSOLE && USBDEV && (CDCACM || PL2303)
---help---
If defined, then the an arbitrary USB serial device may be used
to as the NSH console. In this case, NSH_USBCONDEV must be defined
to indicate which USB serial device to use as the console.
if NSH_USBCONSOLE
config NSH_USBCONDEV
string "USB serial console device"
default "/dev/ttyACM0" if CDCACM
default "/dev/ttyUSB0" if !CDCACM
---help---
If NSH_USBCONSOLE is set to 'y', then NSH_USBCONDEV must
also be set to select the USB device used to support the
NSH console. This should be set to the quoted name of a
read-/write-able USB driver. Default: "/dev/ttyACM0".
config USBDEV_MINOR
int "USB serial console device minor number"
default 0
---help---
If there are more than one USB devices, then a USB device
minor number may also need to be provided. Default: 0
endif # NSH_USBCONSOLE
config NSH_ALTCONDEV
bool "Alternative console device"
default n
depends on NSH_CONSOLE && !NSH_USBCONSOLE && !NSH_TELNET
---help---
If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
also be selected to enable use of an alternate character device
to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
then NSH_CONDEV must be set to select the serial device used to
support the NSH console. This may be useful, for example, to
separate the NSH command line from the system console when the
system console is used to provide debug output. Default: stdin
and stdout (probably "/dev/console")
NOTE 1: When any other device other than /dev/console is used
for a user interface, (1) linefeeds (\n) will not be expanded to
carriage return / linefeeds (\r\n). You will need to set
your terminal program to account for this. And (2) input is
not automatically echoed so you will have to turn local echo on.
NOTE 2: This option forces the console of all sessions to use
NSH_CONDEV. Hence, this option only makes sense for a system
that supports only a single session. This option is, in
particular, incompatible with Telnet sessions because each Telnet
session must use a different console device.
if NSH_ALTCONDEV
config NSH_CONDEV
string "Alternative console device name"
default "/dev/console"
---help---
If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
also be selected to enable use of an alternate character device
to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
then NSH_CONDEV must be set to select the serial device used to
support the NSH console. This should be set to the quoted name
of a readable/write-able character driver such as:
NSH_CONDEV="/dev/ttyS1". This is useful, for example, to separate
the NSH command line from the system console when the system console
is used to provide debug output. Default: stdin and stdout
(probably "/dev/console")
NOTE 1: When any other device other than /dev/console is used
for a user interface, (1) linefeeds (\n) will not be expanded to
carriage return / linefeeds (\r\n). You will need to set
your terminal program to account for this. And (2) input is
not automatically echoed so you will have to turn local echo on.
NOTE 2: This option forces the console of all sessions to use
NSH_CONDEV. Hence, this option only makes sense for a system
that supports only a single session. This option is, in
particular, incompatible with Telnet sessions because each Telnet
session must use a different console device.
endif # NSH_ALTCONDEV
config NSH_USBKBD
bool "Use USB keyboard input"
default n
depends on NSH_CONSOLE && USBHOST_HIDKBD && !NSH_USBCONSOLE
---help---
Normally NSH uses the same device for stdin, stdout, and stderr. By
default, that device is /dev/console. If this option is selected,
then NSH will use a USB HID keyboard for stdin. In this case, the
keyboard is connected directly to the target (via a USB host
interface) and the data from the keyboard will drive NSH. NSH
output (stdout and stderr) will still go to /dev/console.
if NSH_USBKBD
config NSH_USBKBD_DEVNAME
string "USB keyboard device"
default "/dev/kbda"
---help---
If NSH_USBKBD is set to 'y', then NSH_USBKBD_DEVNAME must also be
set to select the USB keyboard device used to support the NSH
console input. This should be set to the quoted name of a read-
able keyboard driver. Default: "/dev/kbda".
endif #NSH_USBKBD
endmenu # Console Configuration
menu "USB Device Trace Support"
depends on USBDEV && (DEBUG || USBDEV_TRACE)
config NSH_USBDEV_TRACE
bool "Enable Builtin USB Trace Support"
default n
---help---
Enable builtin USB trace support in NSH. If selected, buffered USB
trace data will be presented each time a command is provided to NSH.
The USB trace data will be sent to the console unless DEBUG set or
unless you are using a USB console. In those cases, the trace data
will go to the SYSLOG device.
If not enabled, the USB trace support can be provided by external
logic such as apps/system/usbmonitor.
if NSH_USBDEV_TRACE
config NSH_USBDEV_TRACEINIT
bool "Show initialization events"
default n
---help---
Show initialization events
config NSH_USBDEV_TRACECLASS
bool "Show class driver events"
default n
---help---
Show class driver events
config NSH_USBDEV_TRACETRANSFERS
bool "Show data transfer events"
default n
---help---
Show data transfer events
config NSH_USBDEV_TRACECONTROLLER
bool "Show controller events"
default n
---help---
Show controller events
config NSH_USBDEV_TRACEINTERRUPTS
bool "Show interrupt-related events"
default n
---help---
Show interrupt-related events
endif # NSH_USBDEV_TRACE
endmenu # USB Device Trace Support
config NSH_ARCHINIT
bool "Have architecture-specific initialization"
default n
---help---
Set if your board provides architecture specific initialization
via the board-specific function nsh_archinitialize(). This
function will be called early in NSH initialization to allow
board logic to do such things as configure MMC/SD slots.
menu "Networking Configuration"
depends on NET
config NSH_NETINIT_THREAD
bool "Network initialization thread"
default n
depends on !DISABLE_PTHREAD
---help---
NSH is brought up through a series of sequential initialization
steps. This includes networking. If the network is available on
reset, then there is really no issue. Negotiating the link will
take only a second or so and the delay to the NSH prompt is
normally acceptable.
But if there is no network connected, then the start-up delay can
be very long depending upon things like the particular PHY, driver
timeout delay times, and numbers of retries. A failed negotiation
can potentially take a very long time, perhaps as much as a
minute... Long enough that you might think that the board would
never come up!
One solution is to enabled by this option. If NSH_NETINIT_THREAD
is selected, the network bring-up will all occur in parallel with
NSH on a separate thread. In this case, the NSH prompt will occur
immediately with the network becoming available some time layer (if
if all). This thread will terminate once it successfully initializes
the network
NOTES: If no network is connected, the network bring-up will fail
and the network initialization thread will simply exit. There are
no retries and no mechanism to know if the network initialization
was successful. Furthermore, there is currently no support for
detecting loss of network connection. Lots of things to do!
if NSH_NETINIT_THREAD
config NSH_NETINIT_MONITOR
bool "Monitor link state"
default n
depends on ARCH_PHY_INTERRUPT && NETDEV_PHY_IOCTL && NET_UDP && !DISABLE_SIGNALS
---help---
By default the net initialization thread will bring-up the network
then exit, freeing all of the resources that it required. This is a
good behavior for systems with limited memory.
If this option is selected, however, then the network initialization
thread will persist forever; it will monitor the network status. In
the event that the network goes down (for example, if a cable is
removed), then the thread will monitor the link status and
attempt to bring the network back up. In this case the resources
required for network initialization are never released.
if NSH_NETINIT_MONITOR
config NSH_NETINIT_SIGNO
int "Notification signal number"
default 18
---help---
The network monitor logic will receive signals when there is any
change in the link status. This setting may be used to customize
that signal number in order to avoid conflicts.
config NSH_NETINIT_RETRYMSEC
int "Network bring-up retry period (msec)"
default 2000
---help---
When the network is down, the initialization thread will periodically
try to bring the network up. This can be a time consuming operation
so is done only periodically with that period specified by this
selection in milliseconds.
endif # NSH_NETINIT_MONITOR
config NSH_NETINIT_THREAD_STACKSIZE
int "Network initialization thread stack size"
default 1568
config NSH_NETINIT_THREAD_PRIORITY
int "Network initialization thread priority"
default 100
endif # NSH_NETINIT_THREAD
config NSH_NETINIT_DEBUG
bool "Network init debug"
default n
depends on DEBUG
---help---
Normally debug output is controlled by DEBUG_NET. However, that
will generate a LOT of debug output, especially if DEBUG_VERBOSE is
also selected. This option is intended to force VERVOSE debug
output from the NSH network initialization logic even if DEBUG_NET
or DEBUG_VERBOSE are not selected. This allows for focused, unit-
level debug of the NSH network initialization logic.
menu "IP Address Configuration"
config NSH_DHCPC
bool "Use DHCP to get IP address"
default n
depends on NETUTILS_DHCPC
---help---
Obtain the IP address via DHCP.
Per RFC2131 (p. 9), the DHCP client must be prepared to receive DHCP
messages of up to 576 bytes (excluding Ethernet, IP, or UDP headers and FCS).
if NET_IPv4
comment "IPv4 Addresses"
config NSH_IPADDR
hex "Target IPv4 address"
default 0x0a000002
depends on !NSH_DHCPC
---help---
If NSH_DHCPC is NOT set, then the static IP address must be provided.
This is a 32-bit integer value in host order. So, as an example,
0x10000002 would be 10.0.0.2.
config NSH_DRIPADDR
hex "Router IPv4 address"
default 0x0a000001
---help---
Default router IP address (aka, Gateway). This is a 32-bit integer
value in host order. So, as an example, 0x10000001 would be 10.0.0.1.
config NSH_NETMASK
hex "IPv4 Network mask"
default 0xffffff00
---help---
Network mask. This is a 32-bit integer value in host order. So, as
an example, 0xffffff00 would be 255.255.255.0.
endif # NET_IPv4
if NET_IPv6 && !NET_ICMPv6_AUTOCONF
comment "Target IPv6 address"
config NSH_IPv6ADDR_1
hex "[0]"
default 0xfc00
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the first of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_2
hex "[1]"
default 0x0000
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the second of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_3
hex "[2]"
default 0x0000
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the third of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_4
hex "[3]"
default 0x0000
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the fourth of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_5
hex "[4]"
default 0x0000
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the fifth of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_6
hex "[5]"
default 0x0000
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the sixth of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_7
hex "[6]"
default 0x0000
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the seventh of the 8-values. The default for
all eight values is fc00::2.
config NSH_IPv6ADDR_8
hex "[7]"
default 0x0002
range 0x0 0xffff
---help---
If NET_ICMPv6_AUTOCONF is NOT set, then the static IP address must be
provided. This is a 16-bit integer value in host order. Each of the
eight values forming the full IP address must be specified
individually. This is the last of the 8-values. The default for
all eight values is fc00::2.
comment "Router IPv6 address"
config NSH_DRIPv6ADDR_1
hex "[0]"
default 0xfc00
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the first of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_2
hex "[1]"
default 0x0000
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the second of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_3
hex "[2]"
default 0x0000
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the third of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_4
hex "[3]"
default 0x0000
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the fourth of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_5
hex "[4]"
default 0x0000
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the fifth of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_6
hex "[5]"
default 0x0000
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the sixth of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_7
hex "[6]"
default 0x0000
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the seventh of the
8-values. The default for all eight values is fc00::1.
config NSH_DRIPv6ADDR_8
hex "[7]"
default 0x0001
range 0x0 0xffff
---help---
Default router IP address (aka, Gateway). This is a 16-bit integer
value in host order. Each of the eight values forming the full IP
address must be specified individually. This is the last of the
8-values. The default for all eight values is fc00::1.
comment "IPv6 Network mask"
config NSH_IPv6NETMASK_1
hex "[0]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the first of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_2
hex "[1]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the second of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_3
hex "[2]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the third of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_4
hex "[3]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the fourth of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_5
hex "[4]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the fifth of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_6
hex "[5]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the sixth of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_7
hex "[6]"
default 0xffff
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the seventh of the 8-values. The default for
all eight values is fe00::0.
config NSH_IPv6NETMASK_8
hex "[7]"
default 0x0000
range 0x0 0xffff
---help---
Network mask. This is a 16-bit integer value in host order. Each
of the eight values forming the full IP address must be specified
individually. This is the eighth of the 8-values. The default for
all eight values is fe00::0.
endif #NET_IPv6 && !NET_ICMPv6_AUTOCONF
endmenu # IP Address Configuration
config NSH_DNS
bool "Use DNS"
default n
depends on NSH_LIBRARY && NETUTILS_DNSCLIENT
---help---
Configure to use a DNS.
config NSH_DNSIPADDR
hex "DNS IP address"
default 0xa0000001
depends on NSH_DNS
---help---
Configure the DNS address. This is a 32-bit integer value in host
order. So, as an example, 0xa0000001 would be 10.0.0.1.
config NSH_NOMAC
bool "Hardware has no MAC address"
default n
depends on NSH_LIBRARY && NET
---help---
Set if your Ethernet hardware has no built-in MAC address.
If set, a bogus MAC will be assigned.
if NSH_NOMAC
choice
prompt "MAC address selection"
default NSH_SWMAC
---help---
If the hardware as no MAC address, then NSH must assign an address
to the hardware before it brings the network up. This choice allows
you select the source of that MAC address.
config NSH_SWMAC
bool "Fixed address"
---help---
With this choice, you can assign a fixed MAC address determined by
a NuttX configuration option.
config NSH_ARCHMAC
bool "Platform-specific"
---help---
This selection will enable a call to an interface exported by
platform-specific code to determine the MAC address. If this option
is selected, the the platform-specific code must provide the
function nsh_arch_macaddress() that will be called by the NSH
initialize logic to obtain the MAC address.
This option might be useful, as an example, if MAC addresses are
retained in Serial FLASH. Such address might be assigned during the
manufacturing process so that each board has a unique MAC address.
endchoice # MAC address selection
config NSH_MACADDR
hex "Fixed MAC address"
default 0x00e0deadbeef
depends on NSH_SWMAC
---help---
If the hardware has no built-in MAC address and if the NSH_SWMAC
option is selected, then the fixed, software-assigned MAC address
MAC address must provided with this selection.
endif # NSH_NOMAC
config NSH_MAX_ROUNDTRIP
int "Max Ping Round-Trip (DSEC)"
default 20
depends on NSH_LIBRARY && NET && !NSH_DISABLE_PING
---help---
This is the maximum round trip for a response to a ICMP ECHO request.
It is in units of deciseconds. The default is 20 (2 seconds).
endmenu # Networking Configuration"
menu "Telnet Configuration"
depends on NETUTILS_TELNETD
config NSH_TELNET
bool "Use Telnet console"
default n if DEFAULT_SMALL
default y if !DEFAULT_SMALL
depends on NETUTILS_TELNETD
---help---
If NSH_TELNET is set to 'y', then a TELENET
server front-end is selected. When this option is provided,
you may log into NuttX remotely using telnet in order to
access NSH.
if NSH_TELNET
config NSH_TELNETD_PORT
int "Telnet port number"
default 23
---help---
The telnet daemon will listen on this TCP port number for connections.
Default: 23
config NSH_TELNETD_DAEMONPRIO
int "Telnet daemon priority"
default 100
---help---
Priority of the Telnet daemon. Default: 100
config NSH_TELNETD_DAEMONSTACKSIZE
int "Telnet daemon stack size"
default 2048
---help---
Stack size allocated for the Telnet daemon. Default: 2048
config NSH_TELNETD_CLIENTPRIO
int "Telnet client priority"
default 100
---help---
Priority of the Telnet client. Default: 100
config NSH_TELNETD_CLIENTSTACKSIZE
int "Telnet client stack size"
default 2048
---help---
Stack size allocated for the Telnet client. Default: 2048
config NSH_IOBUFFER_SIZE
int "Telnet I/O buffer size"
default 512
---help---
Determines the size of the I/O buffer to use for sending/
receiving TELNET commands/reponses. Default: 512
config NSH_TELNET_LOGIN
bool "Telnet Login"
default n
---help---
If defined, then the Telnet user will be required to provide a
username and password to start the NSH shell.
if NSH_TELNET_LOGIN
config NSH_TELNET_USERNAME
string "Login Username"
default "admin"
---help---
Login user name. Default: "admin"
config NSH_TELNET_PASSWORD
string "Login Password"
default "nuttx"
---help---
Login password: Default: "nuttx"
config NSH_TELNET_FAILCOUNT
int "Login Retry Count"
default 3
---help---
Number of login retry attempts.
endif # NSH_TELNET_LOGIN
endif # NSH_TELNET
endmenu # Telnet Configuration
endif # NSH_LIBRARY
|