aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNicolas Schodet2021-10-23 22:53:14 +0200
committerNicolas Schodet2021-10-23 23:12:32 +0200
commitedcb41373afe8faf92225d8fe473bc97872855f7 (patch)
tree2ee129d56fd7817bb0b8a5384aeb5aeaffbde7d9 /doc
parentfe25b27fa63da8a4b30a008c224b3d305190fa49 (diff)
Add manual pages
Manual pages are built using scdoc. This is marked as optional.
Diffstat (limited to 'doc')
-rw-r--r--doc/fwexec.1.scd28
-rw-r--r--doc/fwflash.1.scd43
-rw-r--r--doc/meson.build23
3 files changed, 94 insertions, 0 deletions
diff --git a/doc/fwexec.1.scd b/doc/fwexec.1.scd
new file mode 100644
index 0000000..a0af3b3
--- /dev/null
+++ b/doc/fwexec.1.scd
@@ -0,0 +1,28 @@
+fwexec(1)
+
+# NAME
+
+fwexec - upload firmware image to a connected NXT device and run it from RAM
+
+# SYNOPSIS
+
+*fwflash* _file_ [_load_address_ [_jump_address_]]
+
+# DESCRIPTION
+
+The *fwexec* utility is similar to *fwflash*(1), but the firmware image is
+uploaded to NXT RAM and executed from there. The image must have been compiled
+specially to handle this.
+
+The *fwexec* utility is part of LibNXT.
+
+# SEE ALSO
+
+*fwflash*(1)
+
+# AUTHOR
+
+Maintained by Nicolas Schodet <nico@ni.fr.eu.org>.
+
+Originally written by David Anderson <dave@natulte.net> based on first initial
+version by Lawrie Griffiths.
diff --git a/doc/fwflash.1.scd b/doc/fwflash.1.scd
new file mode 100644
index 0000000..eb83455
--- /dev/null
+++ b/doc/fwflash.1.scd
@@ -0,0 +1,43 @@
+fwflash(1)
+
+# NAME
+
+fwflash - flash firmware image to a connected NXT device
+
+# SYNOPSIS
+
+*fwflash* _file_
+
+# DESCRIPTION
+
+The *fwflash* utility takes a firmware image file and sends it to a connected
+NXT device through USB. It takes only one parameter which is the firmware file
+to send. This file usually has the .bin or .rfw extension and a size of
+262144 octets.
+
+Connect the NXT using a USB cable. Make sure it is detected by the computer
+when powered on. If you run *fwflash* now, it should report that the NXT is
+found, but not running in reset mode.
+
+*The next step will erase the current firmware image!*
+
+Press and hold, for at least five seconds, the reset button which is hidden in
+the pin hole under the USB port. The brick should make a clicking noise and be
+detected by the computer in SAM-BA mode.
+
+You can then use *fwflash* to send the firmware. After a few seconds, it
+should announce successful flashing.
+
+In case of problem, check your USB cable, and your device permissions.
+
+The *fwflash* utility is part of LibNXT.
+
+# SEE ALSO
+
+*fwexec*(1)
+
+# AUTHOR
+
+Maintained by Nicolas Schodet <nico@ni.fr.eu.org>.
+
+Originally written by David Anderson <dave@natulte.net>.
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..92cc033
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,23 @@
+scdoc = find_program('scdoc', required : get_option('build_doc'))
+if scdoc.found()
+ # Need to feed the input on standard input, so use the shell.
+ sh = find_program('sh')
+ custom_target(
+ 'fwflash.1',
+ output : 'fwflash.1',
+ input : 'fwflash.1.scd',
+ command : [sh, '-c', scdoc.full_path() + ' < @INPUT@'],
+ capture : true,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1'),
+ )
+ custom_target(
+ 'fwexec.1',
+ output : 'fwexec.1',
+ input : 'fwexec.1.scd',
+ command : [sh, '-c', scdoc.full_path() + ' < @INPUT@'],
+ capture : true,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1'),
+ )
+endif