M README => README +4 -0
@@ 62,6 62,10 @@ If you are running a debian based system, you can install them using:
sudo apt install build-essential libusb-1.0-0-dev meson gcc-arm-none-eabi
+To build the optional manual pages, you also need scdoc:
+
+ sudo apt install scdoc
+
When you have all that, build with:
meson build
A doc/fwexec.1.scd => doc/fwexec.1.scd +28 -0
@@ 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.
A doc/fwflash.1.scd => doc/fwflash.1.scd +43 -0
@@ 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>.
A doc/meson.build => doc/meson.build +23 -0
@@ 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
M meson.build => meson.build +2 -0
@@ 1,10 1,12 @@
project('libnxt', 'c',
default_options : 'warning_level=3',
+ meson_version : '>=0.55.0',
version : '0.4.1')
usbdep = dependency('libusb-1.0')
subdir('flash_write')
+subdir('doc')
prog_python = import('python').find_installation('python3')
flash_routine_h = custom_target(
A meson_options.txt => meson_options.txt +2 -0
@@ 0,0 1,2 @@
+option('build_doc', type : 'feature', value : 'auto',
+ description : 'Build man pages')