summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-11 09:36:33 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-11 09:36:33 -0600
commit3da8039196142eec07174a38f11c460ab22f952d (patch)
tree52f6a52c9db5d729bf03693b88f74c1fe4a074ab /nuttx/configs
parenteaedb099b2a38a2c8e13bb8fb8c29648949ee7eb (diff)
downloadnuttx-3da8039196142eec07174a38f11c460ab22f952d.tar.gz
nuttx-3da8039196142eec07174a38f11c460ab22f952d.tar.bz2
nuttx-3da8039196142eec07174a38f11c460ab22f952d.zip
Update README files
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/sim/README.txt91
-rw-r--r--nuttx/configs/stm32f4discovery/README.txt99
2 files changed, 190 insertions, 0 deletions
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt
index 9db5ff534..b0f09e3b1 100644
--- a/nuttx/configs/sim/README.txt
+++ b/nuttx/configs/sim/README.txt
@@ -14,6 +14,7 @@ Contents
- Stack Size Issues
- Networking Issues
- X11 Issues
+ o BASIC
o Configurations
Overview
@@ -166,6 +167,96 @@ XOpenDisplay() aborted the program. UPDATE: This was caused by the small stack
size and can be fixed by increasing the size of the NuttX stack that calls into
X11. See the discussion "Stack Size Issues" above.
+BASIC
+^^^^^
+
+BASIC
+=====
+ I have used the sim/nsh configuration to test Michael Haardt's BASIC interpreter
+ that you can find at apps/interpreters/bas.
+
+ Bas is an interpreter for the classic dialect of the programming language
+ BASIC. It is pretty compatible to typical BASIC interpreters of the 1980s,
+ unlike some other UNIX BASIC interpreters, that implement a different
+ syntax, breaking compatibility to existing programs. Bas offers many ANSI
+ BASIC statements for structured programming, such as procedures, local
+ variables and various loop types. Further there are matrix operations,
+ automatic LIST indentation and many statements and functions found in
+ specific classic dialects. Line numbers are not required.
+
+ There is also a test suite for the interpreter that can be found at
+ apps/examples/bastest.
+
+ Configuration
+ -------------
+ Below are the recommended configuration changes to use BAS with the
+ stm32f4discovery/nsh configuration:
+
+ Dependencies:
+ CONFIG_LIBC_EXECFUNCS=y : exec*() functions are required
+ CONFIG_LIBM=y : Some floating point library is required
+ CONFIG_LIBC_FLOATINGPOINT=y : Floating point printing support is required
+ CONFIG_LIBC_TMPDIR="/tmp" : Writable temporary files needed for some commands
+
+ Enable the BASIC interpreter. Other default options should be okay:
+ CONFIG_INTERPRETERS_BAS=y : Enables the interpreter
+ CONFIG_INTERPREPTER_BAS_VT100=y
+
+ The BASIC test suite can be included:
+ CONFIG_FS_ROMFS=y : ROMFS support is needed
+ CONFIG_EXAMPLES_BASTEST=y : Enables the BASIC test setup
+ CONFIG_EXAMPLES_BASTEST_DEVMINOR=6
+ CONFIG_EXAMPLES_BASTEST_DEVPATH="/dev/ram6"
+
+ Usage
+ -----
+ This setup will initialize the BASIC test (optional): This will mount
+ a ROMFS file system at /mnt/romfs that contains the BASIC test files:
+
+ nsh> bastest
+ Registering romdisk at /dev/ram6
+ Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram6
+ nsh>
+
+ The interactive interpreter is started like:
+
+ nsh> bas
+ bas 2.4
+ Copyright 1999-2014 Michael Haardt.
+ This is free software with ABSOLUTELY NO WARRANTY.
+ >
+
+ Ctrl-D exits the interpreter.
+
+ The test programs can be ran like this:
+
+ nsh> bastest
+ Registering romdisk at /dev/ram0
+ Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
+ nsh> bas /mnt/romfs/test01.bas
+ 1
+ hello
+ 0.0002
+ 0.0000020
+ 0.0000002
+
+ nsh>
+
+ Or you can load a test into memory and execute it interactively:
+
+ nsh> bas
+ bas 2.4
+ Copyright 1999-2014 Michael Haardt.
+ This is free software with ABSOLUTELY NO WARRANTY.
+ > load "/mnt/romfs/test01.bas"
+ > run
+ 1
+ hello
+ 0.0002
+ 0.0000020
+ 0.0000002
+ >
+
Configurations
^^^^^^^^^^^^^^
diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt
index 8e2de23e4..c16c55bbd 100644
--- a/nuttx/configs/stm32f4discovery/README.txt
+++ b/nuttx/configs/stm32f4discovery/README.txt
@@ -36,6 +36,7 @@ Contents
- SSD1289
- UG-2864AMBAG01 / UG-2864HSWEG01
- STM32F4Discovery-specific Configuration Options
+ - BASIC
- Configurations
Development Environment
@@ -1042,6 +1043,104 @@ STM32F4Discovery-specific Configuration Options
CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB
packets. Depends on CONFIG_DEBUG.
+BASIC
+=====
+ I have used the stm32f4discovery/nsh configuration to test Michael Haardt's
+ BASIC interpreter that you can find at apps/interpreters/bas.
+
+ Bas is an interpreter for the classic dialect of the programming language
+ BASIC. It is pretty compatible to typical BASIC interpreters of the 1980s,
+ unlike some other UNIX BASIC interpreters, that implement a different
+ syntax, breaking compatibility to existing programs. Bas offers many ANSI
+ BASIC statements for structured programming, such as procedures, local
+ variables and various loop types. Further there are matrix operations,
+ automatic LIST indentation and many statements and functions found in
+ specific classic dialects. Line numbers are not required.
+
+ There is also a test suite for the interpreter that can be found at
+ apps/examples/bastest.
+
+ Configuration
+ -------------
+ Below are the recommended configuration changes to use BAS with the
+ stm32f4discovery/nsh configuration:
+
+ Dependencies:
+ CONFIG_LIBC_EXECFUNCS=y : exec*() functions are required
+ CONFIG_LIBM=y : Some floating point library is required
+ CONFIG_LIBC_FLOATINGPOINT=y : Floating point printing support is required
+ CONFIG_LIBC_TMPDIR="/tmp" : Writable temporary files needed for some commands
+ CONFIG_FS_FAT=y : With FAT you create a RAMDISK at /tmp
+ CONFIG_FAT_LFN=y : FAT is difficult to use with long file names
+
+ Enable the BASIC interpreter. Other default options should be okay:
+ CONFIG_INTERPRETERS_BAS=y : Enables the interpreter
+ CONFIG_INTERPREPTER_BAS_VT100=y
+
+ The BASIC test suite can be included:
+ CONFIG_FS_ROMFS=y : ROMFS support is needed
+ CONFIG_EXAMPLES_BASTEST=y : Enables the BASIC test setup
+ CONFIG_EXAMPLES_BASTEST_DEVMINOR=0
+ CONFIG_EXAMPLES_BASTEST_DEVPATH="/dev/ram0"
+
+ Usage
+ -----
+ This setup will initialize the BASIC test (optional): This will mount
+ a ROMFS file system at /mnt/romfs that contains the BASIC test files:
+
+ nsh> bastest
+ Registering romdisk at /dev/ram0
+ Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
+ nsh>
+
+ These steps will create and mount a RAMDISK at /tmp (required only for a
+ few BASIC commands). This will create a RAMDISK device at /dev/ram1 with
+ size = 512 * 64 = 32KiB and mount it at /tmp:
+
+ nsh> mkrd -m 1 -s 512 64
+ nsh> mkfatfs /dev/ram1
+ nsh> mount -t vfat /dev/ram1 /tmp
+ nsh>
+
+ The interactive interpreter is started like:
+
+ nsh> bas
+ bas 2.4
+ Copyright 1999-2014 Michael Haardt.
+ This is free software with ABSOLUTELY NO WARRANTY.
+ >
+
+ Ctrl-D exits the interpreter.
+
+ The test programs can be ran like this:
+
+ nsh> bastest
+ Registering romdisk at /dev/ram0
+ Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
+ nsh> bas /mnt/romfs/test01.bas
+ 1
+ hello
+ 0.0002
+ 0.0000020
+ 0.0000002
+
+ nsh>
+
+ Or you can load a test into memory and execute it interactively:
+
+ nsh> bas
+ bas 2.4
+ Copyright 1999-2014 Michael Haardt.
+ This is free software with ABSOLUTELY NO WARRANTY.
+ > load "/mnt/romfs/test01.bas"
+ > run
+ 1
+ hello
+ 0.0002
+ 0.0000020
+ 0.0000002
+ >
+
Configurations
==============