				RELEASE NOTES

============================================================================

SRV-1 firmware test build for Blackfin - 19 October 2008 
    includes all changes since srv-blackfin-100508 release
    
    http://www.surveyor.com/blackfin/srv-blackfin-101908.zip

* added complete malloc() and free() functions

* added 'g2' edge detect - predominantly horizontal edges display
  as cyan, vertical edges display as orange.  'T' command changes
  threshold - default is 'T4', range is 'T1' to 'T9'

* subsequently modified 'g2' edge detect to display edges in
  white without horizontal/vertical orientation and to display non-edge 
  pixels using 16-color segmentation
  
============================================================================

SRV-1 firmware build for Blackfin - 5 October 2008 
    http://www.surveyor.com/blackfin/srv-blackfin-100508.zip

* added interface code for Pericynthion SRV1-X IMU/GPS board -
  x? = menu, xA = analog data, xG = GPS, xs = setup, 
  xb = bootloader, xC = console, xf = flash

* changed spi.c $X and $R commands to transfer contents of 
  131kb flash buffer from left to right Blackfin on SVS

* added crc_flash_buffer(), invoked with 'zC'.  will be used to 
  check SPI transfer between Blackfins on SVS

* fixed problem with spi.c in handling binary data

* further experiments with automatic segmentation using 16 colors
  vz0 - clears color tables
  vz1 - combination of Y and U|V (4 Y, 2 U, 2 V)
  vz2 - U|V only (4 levels of U x 4 levels of V)
  vz3 - U|V only (similar to vz2, but thresholds can be adjusted)
  vz4 - Y only (16 levels of Y)
  vz5 - histogram based - needs work
  
* changed 'vh' histogram function to display data more clearly

============================================================================

SRV-1 firmware build for Blackfin - 6 September 2008 
    http://www.surveyor.com/blackfin/srv-blackfin-090608.zip

* added NickK1066's spi.c code for master/slave communication between 
  two Blackfins

* added 'loop' primitive to lisp - loops continuously until enclosed
  function returns false or nil.  

* fixed error in quantization tables when jpeg quality is set to 1
 
* eliminated 80x64 image scaling and corresponding vs, vf, vn, vg and 
  vx commands.  changed vp to support full 1280x1024 resolution

* fixed problem with color index() function which could affect blob()
  results
  
* fixed bug in initTMR4() that caused right motor to turn on after sonar() 
  call in C interpreter
  
* added vd command to dump complete set of camera registers

* changed camera setup for higher capture speed and better quality.  
  capture resolutions are now 160x120, 320x240, 640x480 and 1280x1024
  
* eliminated interface functions for Analog Devices ADXL202 
  accelerometers - new commands will be added for SRV-1X IMU/GPS board.
  also removed the neural net code from the build for now - it will
  be back later.

* added logic to test PORTH3 to determine whether processor is master or
  slave on SVS - display result in Version string.  also added logic and 
  'D' command to check the low-battery circuit on SVS
  
* added vz1, vz2, vz3 commands to test various color segmentation
  schemes - used in conjunction with 'g1' color segmentation display
  
* changed loader structure to locate some code in L1 memory (.L1CODE) 
  and some code in SDRAM.  location of module is defined in bftiny.x 
  script.  to accomplish this, we had to split the init.c code
  (formerly startup.asm) out of the rest of the load image, since init.o
  has to run to set up the processor clock and memory before the rest
  of the code can be loaded.  we now have C and Lisp built into the 
  same image, and will soon be replace the current interpreters with much 
  more capable interpreters.  the code in SDRAM runs slower than in 
  .L1CODE, but next release of test code should have instruction cache 
  enabled.
  
* changed name of ldr script to "load";  added "load2" for 2nd 
  Blackfin on SVS
  
============================================================================

SRV-1 firmware build for Blackfin - 6 May 2008 
    http://www.surveyor.com/blackfin/srv-blackfin-050608.zip

* added 'vz' command to zero all color bins, and 'vx0' / 'vx1' commands
  to disable/enable 80x64 scaling for image processing 

* modified OV9655 register settings for faster "shutter" and smoother
  gain control adjustments
  
* added pseudo-random number generator function - rand(), which is also
  callable from the C interpreter.  rand() returns a value between 0 
  and 65535 (0x0 - 0xFFFF)

* added "robot" command to Lisp interpreter.  initial support for
  forward, back, left, right, stop, and time e.g. "robot forward" sends the 
  robot forward, "robot time" reads the robot's millisecond RTC 
  
* added "rand" function to Lisp interpreter, which randomly returns 
  T or nil

* changed 'g' frame differencing command to 'g0', and added 'g1' to
  visualize color segmentation.  'G' still disables frame differencing as
  well as color segmentation.
  
============================================================================

SRV-1 firmware build for Blackfin - 12 April 2008 
    http://www.surveyor.com/blackfin/srv-blackfin-041208.zip

* fixed conflict between I2C and SDDB commands that caused the OV9655 to 
  become unresponsive after 'ir', 'iR' or 'iw' commands were issued
  
* added Veider's code for processing images at higher resolutions
  in vblob() and vhist(), adding resolution() and scaling() functions
  to C interpreter
  
* changed caption overlay to support current development work on YARB 1.0
  (Yet Another Robotic Blimp), which displays Honeywell HMC6352 i2c compass
  heading and Maxbotics ultrasonic ranging
  
* added simplified grab_and_send_frame() function to separate grab_frame()
  from send_frame()
  
* made small change to ##vhist output to support higher resolutions

* added 'h' command temporarily to support on-the-fly uart0 bitrate
  changes for tests of higher bitrates on Matchport

* fixed issue in send_frame() where sending of frame header wasn't
  processing flow control signals, causing possible loss of frame
  
* added bitwise XOR to C interpreter

* added small lisp interpreter, which runs code from the flash buffer
  (same as C interpreter) and invoked with 'P'
  
* added malloc() and began building a string library
  
* changed stack size from 1kb (!!!)  to 4kb.  

* found bug in ldr that prevented loading code images larger the 32kb.  
  bug has been fixed in recent version of ldr-utils, which can be downloaded 
  from
    svn checkout svn://sources.blackfin.uclinux.org/toolchain/trunk/ldr-utils ldr-utils
  or 
    http://www.surveyor.com/blackfin/ldr-utils.zip
  or
    http://www.surveyor.com/blackfin/ldr-for-windows.zip
  
* modified Makefile to split builds of srv1-lisp.ldr and srv1-c.ldr.  added 
  stubs in c.c and lisp.c to indicate if interpreter isn't present
  
* moved hardware serial flow control into uart0SendChar() in uart.c to solve 
  buffer overrun problems in 'zd' flash buffer dump and other data dumps 
  (e.g. ##vhist)

* added 'vm'  ##vmean command to compute mean values for Y, U and V

* added show_stack_ptr() and show_heap_ptr() display functions

* changed from Lithp interpreter to Chaitin Lisp interpreter 
  (http://www.umcs.maine.edu/~chaitin/rov.html).  added new command '!'
  to run interpreter from console instead of flash buffer.  the new
  interpreter needs garbage collection and robot specific functions, but it
  is very fast and has a lot of capability
  
* reorganized memory usage - allocated 13MB for heap, got rid of 'zz' command
  which is no longer used
  
* started using bfin-elf-gcc toolchain version 2008R1_RC8 instead of older
  2006R2_RC6 - this corrected issues the compiler was having with the Lisp 
  interpreter
  
============================================================================

SRV-1 firmware build for Blackfin - 11 March 2008 
    http://www.surveyor.com/blackfin/srv-blackfin-031108.zip

* added 'iR' command to read two bytes from i2c device ('ir' command only
  reads single byte).  corresponding C-func is readi2c2();

* added silent_console flag to disable console output during execution of
  interpreted C programs
  
* changed C-func blob() to retrieve multiple blobs - blob(colorbin#, blob#).  
  first call to blob(color, 0) will trigger new blob search, with blobs
  sorted by size.  cnt = blob(color, 1) will retrieve the 2nd largest blob,
  etc.
  
* added C-func imgrcap() to capture a reference frame and imgdiff() to 
  compute difference between reference frame and current frame
  
* added bp.c backprop neural net library, but haven't connected it to any
  inputs or outputs yet

* fixed bug that turned off servo2 (timer 6/7) if PWM mode was initialized
  on timer 2/3

* added 'zc' command to clear flash buffer

* added 'E' command to launch flash buffer line editor - commands are
  (T)op (B)ottom (P)revious line (N)ext line (L)ist (I)nsert until ESC 
  (D)elete (H)elp (X)exit
  
* added 'y' command to invert (flip) video feed from upside-down camera,
 'Y' command to restore video orientation
  
* changed definition of imgdiff() to enable/disable frame differencing -
  imgdiff(1) turns on frame differencing in C, imgdiff(0) turns it off
  
* added 'vh' histogram function to display distributions of Y, U and V

* added motion estimation code which will be used for optical flow, 
  but haven't linked the code to any callable functions yet

============================================================================

SRV-1 firmware build for Blackfin - 26 February 2008 
    http://www.surveyor.com/blackfin/srv-blackfin-022608.zip
	
* added 'S' and 's' commands to SRV_protocol to control PPM-based servos and
  speed controllers.  'M' command still controls timers 2/3 in PWM mode. 'S' 
  controls timers 2/3, corresponding to s-32 bus pins 7/8, and 's' controls 
  timers 6/7, corresponding to bus pins 5/6
  
* disabled keypad commands '0' - '9' if motor controller is in 'S' PPM mode
  rather than 'M' PWM mode.  If in PWM mode, an 'M' command is required 
  before the keypad commands become active.
  
* added '+', '-', '<', '>' commands for trimming motor speeds defined by 'S' 
  and 'M'. '+' and '-' increase/decrease speeds of both channels, while '<'
  and '>' change the balance between the two channels
  
* added 'F' and 'f' commands for failsafe operation.  The 'F' command is
  followed by two bytes representing the power level (0x00 - 0x64) for
  each motor.  It enables failsafe mode, which sets the motors to those
  levels in case no communication is received from host within
  2 seconds.  'f' disables failsafe mode

* added 'ir' and 'iw' commands to read and write I2C devices - syntax is
  'irxy' - where x is device id (0x00-0x7F) and y is register, returns 
  ##ir zz - where zz is the register value
  'iwxyz' - write value z to register y of device x - returns ##iw

* 'u' command to read ADXL 202EB accelerometers
* 'U' command to lock 's' channel servos to accelerometers (work in progress)

* added 'vp' command to sample individual YUV pixel.  format is 'vpxxyy'
  where xx is the x coordinate (00-79) and yy is the y coordinate (00-63).
  yy = '00' corresponds to pixels on the bottom row of the image

* added 'p' command to ping Maxbotics sonar modules.  supports up to 4 modules
  on S-32 pin 27, 28, 29, 30, with trigger signal on pin 18.  return value
  is currently # inches * 100 (2500 = 25 inches).  return value of 0 means
  that no module was attached to a particular channel.  we will change to 
  metric or other scalings based on user feedback

* in C interpreter, fixed blob() and scan() functions;  added color(), 
  count(), readi2c(), writei2c(), sonar(), servo(), servo2()

* added 'g' and 'G' commands for frame differencing.  'g' grabs a reference
  frame and puts SRV-1 into frame differencing mode, so images requested
  by the 'I' command show a computed difference of all pixels in the
  most recent frame versus the reference frame.  'G' disables frame 
  differencing.  Every time 'g' is sent, the reference frame is updated.
  
============================================================================

SRV-1 firmware build for Blackfin - 16 December 2007
	http://www.surveyor.com/blackfin/srv-blackfin-121607.zip

* reorganized code structure for easier maintenance and extension - this
  work was actually done by the Transterpreter development group -
  http://www.transterpreter.org - who are in process of porting the
  Transterpreter Virtual Machine and OccamPi programming language to the
  SRV-1 Blackfin.  a source code repository has been created for svn 
  access to the SRV-1 code - access is currently private, but public
  checkout access is planned.
  
* added vision functions to firmware: 
      vc = set colors
      vg = grab color sample
      vs = scan each pixel column until color mismatch
      vf = search each pixel column until color is found
      vn = count number of pixels that match color in each pixel column
      vb = find blobs
      vr = recall colors
  parameters are now decimal instead of hex (as in ARM7 version), this
  is less compact but a lot easier to read.  the functions are still based
  on an 80-column model, but are independent of capture resolution.  note 
  that with higher resolutions, we are just sub-sampling pixels, so more
  consistent results will be achieved by reducing capture resolution, since
  the camera averages rather than subsamples when scaling.  syntax 
  definition for these commands is found at
      http://www.surveyor.com/SRV_protocol_bf.html

* added a couple of color functions to the C interpreter:
      scan(color) - divides field of view into 3 overlapping groups 
          of 40 columns, returned in _x, _y, _z
      blob(color) - searches for blob by color, returns center point _x, _y 
          and width _z

* changed the motor settings so sufficient power is provided to motors 
  during cw/ccw rotation commands.
  
* tested new version of ldr-utils that support Blackfin UART boot mode via
  the Matchport.  to boot the Blackfin via UART, set Matchport serial 1 to
  115200 8N1 with no flow control and jumper 7-8 on J1 needs to 
  be removed (this jumper sets SPI flash boot mode), and ldr command is 
  issued -
      ldr -l srv1.ldr 192.168.0.15:10001  (SRV-1 IP address)
  when ldr indicates autoboot, the Blackfin is reset by briefly shorting
  pins 1-2 of J1, and program should load.  note that this only puts a
  running version of firmware into program memory, but does not store 
  anything to boot flash.  this requires another step, using the X command
  for XMODEM transfer and the 'zZ' command to write the boot image to flash

* linux - though on a separate development track from this firmware, code
  has been checked into the official uClinux code repository - 
      svn co svn://firewall-sources.blackfin.uclinux.org:80/svn/uclinux-dist/trunk uclinux-dist
      make menuconfig, select Surveyor/SRV1
      make
    
* zigbee - discovered that XBee modules are not compatible with Blackfin at
  115kbps.  this is a problem on XBee side - their 115k is actually 112k, 
  the Blackfin UART does not tolerate the difference (the ARM7 was more 
  forgiving).  solution is to run the Blackfin and XBee at 57600 baud

* work items:
      range finder - if the robot isn't moving, we can look at difference 
          between consecutive frames with lasers turned on or off.  if
          the robot is moving, we have to search for the laser 
          reflections.  to support this, we will likely add some frame
          storage commands along with supporting operations
      back-emf - the current robot motor control boards have circuits to
          measure motor rotation speed, but no firmware support has
          yet been added for speed control
      serial port passthrough - we need to add protocol support for UART1
          communication

============================================================================

SRV-1 firmware build for Blackfin - 5 November 2007
	http://www.surveyor.com/blackfin/srv-blackfin-110707.zip

* changed definition of 'zd' flash dump command - zd now dumps the
  contents of the flash buffer in SDRAM, not the flash sector in SPI
  flash. to dump the flash sector, use 'zr' to read the sector into 
  the buffer, and then 'zd' to dump the contents.  this is useful 
  because the 'X' command transfers data from the host to the flash
  buffer, and the contents of the flash buffer can be confirmed before
  the data is committed to flash storage

* added zZ command to write flash boot sectors (0-1) from flash buffer.  
  also added srv1.ldr, a version of srv1.bin that loads without u-boot. 
  ldr-utils for building srv1.ldr are downloaded from 
  http://www.surveyor.com/blackfin/ldr-utils.zip
  srv1.ldr.115k and srv1.ldr.921k version of srv1.ldr are included with
  this distribution

* tested XMODEM file transfer using lsz and sx commands on Linux and 
  OS/X, mxOSX on OS/X, and ShamCom (www.shamrock.de) on Windows.  The 
  syntax for using sx or lsz to send srv1.ldr is 
      sx -X -k -b --tcp-client 192.168.0.15:10001 srv1.ldr

  sx has a -c option to send a command, so ideally, we could issue
      sx -c "X" -X -k -b --tcp-client 192.168.0.15:10001 srv1.ldr
  
  in order to start the X command to receive a file via XMODEM, but
  we haven't been able to get that to work, so we have to use telnet
  to send the 'X' command, then exit to start the sx command.  If 
  someone knows a better way to do this, we would appreciate the 
  guidance.  unfortunately, c-kermit doesn't support 8-bit data in
  file transfers within a telnet session

* added 'l' and 'L' commands to the SRV protocol to turn lasers on and 
  off on SRV-1 robot

* fixed problem in C interpreter with processing of ^Z

============================================================================

SRV-1 firmware build for Blackfin - 31 October 2007
	http://www.surveyor.com/blackfin/srv-blackfin-103107.zip

* two versions of firmware built - srv1.bin.115k and srv1.bin.921k

* numerous improvements to camera code - double-buffering now supported
  (eliminates "image tearing" artifacts), problem with camera sync when
  changing resolution is resolved, and colors are a lot more stable
  
* boot image (srv1.bin) can now be transferred via xmodem and written to
  flash with the new "zz" command
  
* caption overlay function added - currently displays frame count, but
  can easily be modified.  turned off with 'O', on with 'o'
  
* Work items:
    - WLAN throughput is only 600kbps with 921kbps setting - need to try
         higher baud rate on Matchport
    - need to add adjustment for shutter speed to reduce motion blurring
    - no image processing functions yet added (blob, scan, etc)
    - still need to add back-emf speed control and laser ranging
    - add character scaling, position and color to caption overlay function
    
============================================================================

SRV-1 firmware build for Blackfin - 16 October 2007
	http://www.surveyor.com/blackfin/srv-blackfin-101607.zip

* Makefile has compiler optimizations (-O2) enabled

* UART0 baud rate set to 921600 in config.h

* OV9655 hardware scaling now works - support for on-the-fly resolution
  change.  note that at higher resolutions, SRV1Console will timeout
  on transfers taking more than 1 second or requiring more than 100kbytes.
  this can be fixed in SRV1Console, but should be noted if testing with a
  low UART speed

* memory pointers are now #define'd instead of hardwired

* flash memory and xmodem commands all work with same memory buffer - it's
  possible to transfer a file from the host with xmodem-1k (up to 1 flash
  sector = 65536 bytes) with 'X', write the file to the user flash segment
  (0x00040000) with 'zw', read the flash segment back into memory with 'zr',
  and dump the buffer contents to the console with 'zd'
  
* C interpreter also runs from the flash buffer, so a C program can be
  transferred from the host, written to flash, read from flash, and/or
  executed

* Work items:
    - need to tweak the automatic gain control settings for the OV9655
    - "image tearing" solution is currently disabled - looking at
        alternatives
    - C interpreter error handling isn't quite right and can cause
        crashes
    - no image processing functions yet added (blob, scan, etc)
    - still room for JPEG speedups - DCT is optimized, but huffman isn't
    - still need to add back-emf speed control and laser ranging
    
    
============================================================================

SRV-1 firmware build for Blackfin - 14 October 2007 -
	http://www.surveyor.com/blackfin/srv-blackfin-101407.zip

This is work-in-progress - most core functions have been added but are not
fully integrated into SRV_protocol command structure ...

* Makefile has compiler optimizations (-O2) disabled, and includes -g gdb
debug symbols

* works with SRV1Console, though some buttons need to be redefined in
srv.config to test various functions (e.g. lasers).

* supports UYVY image capture at 1280x1024 with software scaling in even
multiples to lower resolution.  default scaling to 320x256.  hardware scaling
in OV9655 not yet implemented.

* UART0 baud rate is set to 115200 in config.h.  runs at 921600 baud.  haven't
tested higher rates (requires other firmware in Matchport/Wiport).

* C interpreter works, but generates some error messages on set() and get()
commands when using const values in place of pointers.

* motor commands work, but back-emf speed control hasn't been added.

* lasers can be switched on and off, but laser ranging function hasn't been
added.

* no image processing functions yet supported (e.g. blob, scan) besides JPEG
compression.

* Xmodem-1k file transfer and flash read/write are implemented, but not
fully integrated into the command structure.


